usb: fixes for v3.17-rc4
Some late fixes for dwc3 so we have something more stable on v3.17-final. Most bugs have been there for quite a while and nobody noticed, except for TRB completion when multiple TRBs are started. Patches were tested on AM437x SK and J6 EVM and are passing my tests. Signed-of-by: Felipe Balbi <balbi@ti.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJUEhtjAAoJEIaOsuA1yqREmoIP/AxYZMK/EU06WaOIGkKr0JA4 nAJLVIivJva4A6M4Pln8fXnwOj4Nfyo25CqU51czyAKEn2qBjStXOe5Tr6xiFU9e omlhHFltnDbIukDpqX0lJitFbHxZU7mKl4JZ3+XxEIVvYNS4eGhd4cmWC7Lin9Jy gEaIhErnRUofx9/+Mdn+E0ReV0ZY1ZM771CbI+Bzl/bL5cppqEYuegW8APguYVoF /NyHnQ6CL0wjcXcekqIsErlhNUqa9Y1YNUqfMBJdoWSpLCEb55yH3SLES+hpiYT7 RjD39wmyCcn6FxUlcv2n0kAEcLJPFjXswHzexnMZetGAcSxb2A3oMN7WbU437b2m PXigtEcTKq6Nn73bpJu+z3WHElpYLICurtU2zjZt6LxD6MKhLWVJ7LdKpPu941uy D6AxGUSSYrTwTId5pzx0iqmyKttQbWHWBim0950/XgF6KC8uV0ativ2K0GO+C8ao PzUQOprcFHaW+hE5RHsGdr+PWHHriFpsAx6CYZDpgXmdBZcFu8jFZBEf6KJu/fDZ ZrLX3c4F3SBTtYQPogf2f2Ta36V91m3iUhcotK45YXsFvqc6sUbA+A1wfgXOAuzO cqR18TEN+qv3VNvcitc0b6jznIsbvcFPK3c7FmAPS4fi9zMGIGBdad9FyFObly5R aLvfAMPOcJcF+BUVk1bF =CdSO -----END PGP SIGNATURE----- Merge tag 'fixes-for-v3.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v3.17-rc4 Some late fixes for dwc3 so we have something more stable on v3.17-final. Most bugs have been there for quite a while and nobody noticed, except for TRB completion when multiple TRBs are started. Patches were tested on AM437x SK and J6 EVM and are passing my tests. Signed-of-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
commit
e2c60989dc
|
@ -799,20 +799,21 @@ static int dwc3_remove(struct platform_device *pdev)
|
|||
{
|
||||
struct dwc3 *dwc = platform_get_drvdata(pdev);
|
||||
|
||||
dwc3_debugfs_exit(dwc);
|
||||
dwc3_core_exit_mode(dwc);
|
||||
dwc3_event_buffers_cleanup(dwc);
|
||||
dwc3_free_event_buffers(dwc);
|
||||
|
||||
usb_phy_set_suspend(dwc->usb2_phy, 1);
|
||||
usb_phy_set_suspend(dwc->usb3_phy, 1);
|
||||
phy_power_off(dwc->usb2_generic_phy);
|
||||
phy_power_off(dwc->usb3_generic_phy);
|
||||
|
||||
dwc3_core_exit(dwc);
|
||||
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
dwc3_debugfs_exit(dwc);
|
||||
dwc3_core_exit_mode(dwc);
|
||||
dwc3_event_buffers_cleanup(dwc);
|
||||
dwc3_free_event_buffers(dwc);
|
||||
dwc3_core_exit(dwc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -576,9 +576,9 @@ static int dwc3_omap_remove(struct platform_device *pdev)
|
|||
if (omap->extcon_id_dev.edev)
|
||||
extcon_unregister_interest(&omap->extcon_id_dev);
|
||||
dwc3_omap_disable_irqs(omap);
|
||||
device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core);
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -527,7 +527,7 @@ static int dwc3_gadget_set_ep_config(struct dwc3 *dwc, struct dwc3_ep *dep,
|
|||
dep->stream_capable = true;
|
||||
}
|
||||
|
||||
if (usb_endpoint_xfer_isoc(desc))
|
||||
if (!usb_endpoint_xfer_control(desc))
|
||||
params.param1 |= DWC3_DEPCFG_XFER_IN_PROGRESS_EN;
|
||||
|
||||
/*
|
||||
|
@ -1225,16 +1225,17 @@ static int dwc3_gadget_ep_queue(struct usb_ep *ep, struct usb_request *request,
|
|||
|
||||
int ret;
|
||||
|
||||
spin_lock_irqsave(&dwc->lock, flags);
|
||||
if (!dep->endpoint.desc) {
|
||||
dev_dbg(dwc->dev, "trying to queue request %p to disabled %s\n",
|
||||
request, ep->name);
|
||||
spin_unlock_irqrestore(&dwc->lock, flags);
|
||||
return -ESHUTDOWN;
|
||||
}
|
||||
|
||||
dev_vdbg(dwc->dev, "queing request %p to %s length %d\n",
|
||||
request, ep->name, request->length);
|
||||
|
||||
spin_lock_irqsave(&dwc->lock, flags);
|
||||
ret = __dwc3_gadget_ep_queue(dep, req);
|
||||
spin_unlock_irqrestore(&dwc->lock, flags);
|
||||
|
||||
|
@ -2041,12 +2042,6 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
|
|||
dwc3_endpoint_transfer_complete(dwc, dep, event);
|
||||
break;
|
||||
case DWC3_DEPEVT_XFERINPROGRESS:
|
||||
if (!usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
|
||||
dev_dbg(dwc->dev, "%s is not an Isochronous endpoint\n",
|
||||
dep->name);
|
||||
return;
|
||||
}
|
||||
|
||||
dwc3_endpoint_transfer_complete(dwc, dep, event);
|
||||
break;
|
||||
case DWC3_DEPEVT_XFERNOTREADY:
|
||||
|
|
Loading…
Reference in a new issue