USB fixes for 6.7-rc5
Here are some small USB fixes for 6.7-rc5 to resolve some reported issues. Included in here are: - usb gadget f_hid, and uevent fix - xhci driver revert to resolve a much-reported issue - typec driver fix All of these have been in linux-next with no reported issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZXRuNg8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ymKGgCfSJN2sDwxrExpdUeNkQr0r1DCQpgAn0sx1j65 uldkw4sWZwv7XuuYbx+b =aI4T -----END PGP SIGNATURE----- Merge tag 'usb-6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes for 6.7-rc5 to resolve some reported issues. Included in here are: - usb gadget f_hid, and uevent fix - xhci driver revert to resolve a much-reported issue - typec driver fix All of these have been in linux-next with no reported issues" * tag 'usb-6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: gadget: f_hid: fix report descriptor allocation Revert "xhci: Loosen RPM as default policy to cover for AMD xHC 1.1" usb: typec: class: fix typec_altmode_put_partner to put plugs USB: gadget: core: adjust uevent timing on gadget unbindpull/318/merge
commit
21b73ffcc6
|
|
@ -92,6 +92,7 @@ static void hidg_release(struct device *dev)
|
|||
{
|
||||
struct f_hidg *hidg = container_of(dev, struct f_hidg, dev);
|
||||
|
||||
kfree(hidg->report_desc);
|
||||
kfree(hidg->set_report_buf);
|
||||
kfree(hidg);
|
||||
}
|
||||
|
|
@ -1287,9 +1288,9 @@ static struct usb_function *hidg_alloc(struct usb_function_instance *fi)
|
|||
hidg->report_length = opts->report_length;
|
||||
hidg->report_desc_length = opts->report_desc_length;
|
||||
if (opts->report_desc) {
|
||||
hidg->report_desc = devm_kmemdup(&hidg->dev, opts->report_desc,
|
||||
opts->report_desc_length,
|
||||
GFP_KERNEL);
|
||||
hidg->report_desc = kmemdup(opts->report_desc,
|
||||
opts->report_desc_length,
|
||||
GFP_KERNEL);
|
||||
if (!hidg->report_desc) {
|
||||
ret = -ENOMEM;
|
||||
goto err_put_device;
|
||||
|
|
|
|||
|
|
@ -1646,8 +1646,6 @@ static void gadget_unbind_driver(struct device *dev)
|
|||
|
||||
dev_dbg(&udc->dev, "unbinding gadget driver [%s]\n", driver->function);
|
||||
|
||||
kobject_uevent(&udc->dev.kobj, KOBJ_CHANGE);
|
||||
|
||||
udc->allow_connect = false;
|
||||
cancel_work_sync(&udc->vbus_work);
|
||||
mutex_lock(&udc->connect_lock);
|
||||
|
|
@ -1667,6 +1665,8 @@ static void gadget_unbind_driver(struct device *dev)
|
|||
driver->is_bound = false;
|
||||
udc->driver = NULL;
|
||||
mutex_unlock(&udc_lock);
|
||||
|
||||
kobject_uevent(&udc->dev.kobj, KOBJ_CHANGE);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
|
|
|||
|
|
@ -535,8 +535,6 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
|||
/* xHC spec requires PCI devices to support D3hot and D3cold */
|
||||
if (xhci->hci_version >= 0x120)
|
||||
xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
|
||||
else if (pdev->vendor == PCI_VENDOR_ID_AMD && xhci->hci_version >= 0x110)
|
||||
xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
|
||||
|
||||
if (xhci->quirks & XHCI_RESET_ON_RESUME)
|
||||
xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ static void typec_altmode_put_partner(struct altmode *altmode)
|
|||
if (!partner)
|
||||
return;
|
||||
|
||||
adev = &partner->adev;
|
||||
adev = &altmode->adev;
|
||||
|
||||
if (is_typec_plug(adev->dev.parent)) {
|
||||
struct typec_plug *plug = to_typec_plug(adev->dev.parent);
|
||||
|
|
@ -497,7 +497,8 @@ static void typec_altmode_release(struct device *dev)
|
|||
{
|
||||
struct altmode *alt = to_altmode(to_typec_altmode(dev));
|
||||
|
||||
typec_altmode_put_partner(alt);
|
||||
if (!is_typec_port(dev->parent))
|
||||
typec_altmode_put_partner(alt);
|
||||
|
||||
altmode_id_remove(alt->adev.dev.parent, alt->id);
|
||||
kfree(alt);
|
||||
|
|
|
|||
Loading…
Reference in New Issue