summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
Commit message (Collapse)AuthorAgeFilesLines
* usb: dwc3: omap: Replace deprecated API of extconChanwoo Choi2015-07-291-19/+13
| | | | | | | | | | | | | | | This patch removes the deprecated notifier API of extcon framwork and then use the new extcon API with the unique id to indicate the each external connector (USB, USB-HOST). Alter deprecated API as following: - extcon_register_interest() -> extcon_register_notifier() - extcon_get_cable_state(*edev, char *) -> extcon_get_cable_state_(*edev, id) Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: drop CONFIG_USB_DWC3_DEBUGFelipe Balbi2015-07-292-9/+0
| | | | | | | | | | | | now that we have no users of dev_dbg() in dwc3, we can safely remove CONFIG_USB_DWC3_DEBUG. If dev_dbg() is ever strictly necessary - and I don't see why it would, considering we want to rely on tracepoints for debug - we will depend on DYNAMIC_PRINTK to enable such messages. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: st: remove two unnecessary messagesFelipe Balbi2015-07-291-4/+0
| | | | | | | | the mode of operation is exposed through debugfs at all times. Because of that, we're removing the unnecessary messages. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: qcom: switch dev_dbg() to dev_info()Felipe Balbi2015-07-291-2/+2
| | | | | | | | | those two messages are informing that the clock doesn't exist; that, however, is a valid situation and driver continues just fine by ignoring the error. Reviewed-by: Andy Gross <agross@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: exynos: switch dev_dbg() to dev_info()Felipe Balbi2015-07-291-1/+1
| | | | | | | | that message is informing that the clock is missing. However, that's a valid condition for some setups; driver even ignores the error and continues just fine. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: keystone: convert dev_dbg() to dev_err()Felipe Balbi2015-07-291-1/+1
| | | | | | | | that's an error condition, not a debugging message. Let's promote it appropriately. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: omap: drop dev_dbg() usageFelipe Balbi2015-07-291-39/+4
| | | | | | | | Some of the messages were plain unnecessary and some were actually errors. Fix it all up. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: Reset the transfer resource index on SET_INTERFACEJohn Youn2015-07-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue introduced in commit b23c843992b6 (usb: dwc3: gadget: fix DEPSTARTCFG for non-EP0 EPs) that made sure we would only use DEPSTARTCFG once per SetConfig. The trick is that we should use one DEPSTARTCFG per SetConfig *OR* SetInterface. SetInterface was completely missed from the original patch. This problem became aparent after commit 76e838c9f776 (usb: dwc3: gadget: return error if command sent to DEPCMD register fails) added checking of the return status of device endpoint commands. 'Set Endpoint Transfer Resource' command was caught failing occasionally. This is because the Transfer Resource Index was not getting reset during a SET_INTERFACE request. Finally, to fix the issue, was we have to do is make sure that our start_config_issued flag gets reset whenever we receive a SetInterface request. To verify the problem (and its fix), all we have to do is run test 9 from testusb with 'testusb -t 9 -s 2048 -a -c 5000'. Tested-by: Huang Rui <ray.huang@amd.com> Tested-by: Subbaraya Sundeep Bhatta <subbaraya.sundeep.bhatta@xilinx.com> Fixes: b23c843992b6 (usb: dwc3: gadget: fix DEPSTARTCFG for non-EP0 EPs) Cc: <stable@vger.kernel.org> # v3.2+ Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: core: avoid NULL pointer dereferenceFelipe Balbi2015-07-061-2/+4
| | | | | | | | | | | | | | commit 3e10a2ce98d1 ("usb: dwc3: add hsphy_interface property") introduced a possible NULL pointer dereference because dwc->hsphy_interface can be NULL. In order to fix it, all we have to do is guard strncmp() against a NULL argument. Fixes: 3e10a2ce98d1 ("usb: dwc3: add hsphy_interface property") Tested-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: Use ASCII space in KconfigThierry Reding2015-06-121-1/+1
| | | | | | | | | | The USB_DWC3_ULPI Kconfig entry uses a UTF-8 non-breaking space (0xca20) instead of a regular ASCII space (0x20). Commit 2e0d737fc76f ("kconfig: don't silently ignore unhandled characters") exposes this by warning about unhandled characters. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 4.1-rc7 into usb-nextGreg Kroah-Hartman2015-06-081-2/+2
|\ | | | | | | | | | | | | This resolves a merge issue in musb_core.c and we want the fixes that were in Linus's tree in this branch as well for testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macrosSubbaraya Sundeep Bhatta2015-05-261-2/+2
| | | | | | | | | | | | | | | | | | Fixed the incorrect macro definitions correctly as per databook. Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com> Fixes: b09bb64239c8 (usb: dwc3: gadget: implement Global Command support) Cc: <stable@vger.kernel.org> #v3.5+ Signed-off-by: Felipe Balbi <balbi@ti.com>
* | Merge tag 'usb-for-v4.2' of ↵Greg Kroah-Hartman2015-06-028-26/+258
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v4.2 merge window - dwc2 adds hibernation support - preparation for sunxi glue to musb driver - new ULPI bus - new ULPI PHY driver for TUSB1210 - musb patches to support multiple DMA engines on same binary - support for R-Car E2 on renesas_usbhs Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: gadget: don't clear EP_BUSY too earlyFelipe Balbi2015-05-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of non-Isochronous transfers, we don't want to clear DWC3_EP_BUSY flag until XferComplete event. That's because XferInProgress was only enabled so we can recycle TRBs and usb_requests quicker, but there are still other pending requests being transferred. In order to make sure we don't allow for another StartTransfer command while the HW is still processing other transfers, we must keep DWC3_EP_BUSY flag set and this what this patch does. Fixes: f3af36511e60 (usb: dwc3: gadget: always enable IOC on bulk/interrupt transfers) Cc: <stable@vger.kernel.org> # v3.15+ Reported-by: sundeep subbaraya <sundeep.lkml@gmail.com> Tested-by: sundeep subbaraya <sundeep.lkml@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: gadget: return error if command sent to DEPCMD register failsSubbaraya Sundeep Bhatta2015-05-261-0/+2
| | | | | | | | | | | | | | | | | | | | We need to return error to caller if command is not sent to controller succesfully. Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com> Fixes: 72246da40f37 (usb: Introduce DesignWare USB3 DRD Driver) Cc: <stable@vger.kernel.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: gadget: return error if command sent to DGCMD register failsSubbaraya Sundeep Bhatta2015-05-261-0/+2
| | | | | | | | | | | | | | | | | | | | We need to return error to caller if command is not sent to controller succesfully. Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com> Fixes: b09bb64239c8 (usb: dwc3: gadget: implement Global Command support) Cc: <stable@vger.kernel.org> #v3.5+ Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: add ULPI interface supportHeikki Krogerus2015-05-135-3/+147
| | | | | | | | | | | | | | | | | | Registers DWC3's ULPI interface with the ULPI bus when it's available. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: pci: add quirk for BaytrailsHeikki Krogerus2015-05-131-0/+36
| | | | | | | | | | | | | | | | | | On some BYT platforms the USB2 PHY needs to be put into operational mode by the controller driver with GPIOs controlling the PHYs reset and cs signals. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: add hsphy_interface propertyHeikki Krogerus2015-05-133-0/+25
| | | | | | | | | | | | | | | | | | | | | | Platforms that have configured DWC_USB3_HSPHY_INTERFACE with value 3, i.e. UTMI+ and ULPI, need to inform the driver of the actual HSPHY interface type with the property. "utmi" if the interface is UTMI+ or "ulpi" if the interface is ULPI. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: setup phys earlierHeikki Krogerus2015-05-131-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows dwc3_phy_setup() to be more useful later. There is nothing preventing the PHY configuration registers from being programmed early. They do not loose their context in soft reset. There are however other PHY related operations that should be executed before the driver request handles to the PHYs, such as registering DWC3's ULPI interface, which can now be done in dwc3_phy_setup(). Also, if there ever was need for the two 100ms delays in dwc3_phy_setup() there isn't anymore. The PHYs are now reset after the PHY interfaces are setup. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: soft reset to it's own functionHeikki Krogerus2015-05-131-16/+30
| | | | | | | | | | | | | | | | So it can be called from other places later. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: cache hwparams earlierHeikki Krogerus2015-05-131-2/+1
| | | | | | | | | | | | | | | | So they are available when ULPI interface support is added. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: store driver data earlierHeikki Krogerus2015-05-131-1/+2
| | | | | | | | | | | | | | | | | | We need to store it before phys are handled, so we can later use it in ULPI interface support code. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: ULPI or UTMI+ selectHeikki Krogerus2015-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | Make selection between ULPI and UTMI+ interfaces possible by providing definition for the bit in Global USB2 PHY Configuration Register that controls it. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: USB2 PHY register access bitsHeikki Krogerus2015-05-131-0/+8
| | | | | | | | | | | | | | | | | | Definitions for Global USB2 PHY Vendor Control Register bits. We will need them to access ULPI PHY registers later. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: dwc3: dwc3-omap: correct the register macrosBin Liu2015-04-271-47/+47
|/ | | | | | | | The macros related to register UTMI_OTG_CTRL and UTMI_OTG_STATUS are swapped. Correct them for readability. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: make LPM configurable in DTRobert Baldyga2015-03-105-10/+7
| | | | | | | | | | | | This patch removes "Enable USB3 LPM Capability" option from Kconfig and adds snps,usb3_lpm_capable devicetree property instead of it. USB3 LPM (Link Power Management) capability is hardware property, and it's platform dependent, so if our hardware supports this feature, we want rather to configure it in devicetree than having it as Kconfig option. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: move definition of PCI_VENDOR_ID_SYNOPSYS to linux/pci_ids.hJoseph Kogut2015-03-101-2/+0
| | | | | | | | Removed FIXME from usb/dwc3/dwc3-pci.c by moving definition of PCI_VENDOR_ID_SYNOPSYS shared with usb/dwc2 to linux/pci_ids.h. Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: gadget: drop unnecessary loop when cleaning up TRBsFelipe Balbi2015-03-091-21/+16
| | | | | | | | | Now that we're using XFERINPROGRESS for all endpoint types (except Control), we will *always* be completing one TRB at a time, so it's safe to remove the loop from dwc3_cleanup_done_reqs. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: omap: call of_platform_depopulate() insteadFelipe Balbi2015-03-091-10/+1
| | | | | | | | | | | | | | | | | This patch fixes a bug where removing dwc3-omap.ko would not trigger removal of dwc3.ko. of_platform_depopulate() already bakes an easy to use API for removing all our children which were populated during probe(); Let's use that one instead of cooking our own solution. Note that this is kind of a revert of commit c5a1fbc (usb: dwc3: dwc3-omap: Fix the crash on module removal) although we can't simply revert that because a direct call to platform_device_unregister would also be flakey. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: core: only reset res->start in case of errorFelipe Balbi2015-03-091-22/+34
| | | | | | | | | | | That trick is only needed if we end up with an error, so there's no point in messing that outside of an error path. In fact doing so causes problems when removing dwc3.ko, problems which commit c5a1fbc (usb: dwc3: dwc3-omap: Fix the crash on module removal) mistakenly tried to fix. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: dwc3-omap: Fix disable IRQGeorge Cherian2015-02-231-2/+28
| | | | | | | | | | | | | | In the wrapper the IRQ disable should be done by writing 1's to the IRQ*_CLR register. Existing code is broken because it instead writes zeros to IRQ*_SET register. Fix this by adding functions dwc3_omap_write_irqmisc_clr() and dwc3_omap_write_irq0_clr() which do the right thing. Fixes: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver") Cc: <stable@vger.kernel.org> # v3.2+ Signed-off-by: George Cherian <george.cherian@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: gadget: use common is_selfpoweredPeter Chen2015-01-293-4/+2
| | | | | | | Delete private selfpowered variable, and use common one. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: gadget: add missing spin_lock()Felipe Balbi2015-01-291-0/+1
| | | | | | | | | | | | commit 8e74475b0e0a (usb: dwc3: gadget: use udc-core's reset notifier) added support for the new UDC core's reset notifier to dwc3 but while at it, it removed a spin_lock() from dwc3_reset_gadget() which might cause an unbalanced spin_unlock() further down the line Fixes: 8e74475b0e0a (usb: dwc3: gadget: use udc-core's reset notifier) Cc: <stable@vger.kernel.org> # v3.19 Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: remove reliance on dev_vdbg()Felipe Balbi2015-01-274-35/+39
| | | | | | | | By moving all dev_vdbg() to tracepoints, we can finally get rid of dev_vdbg() usage from dwc3. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: trace: add trace logs for core and gadgetFelipe Balbi2015-01-271-0/+10
| | | | | | | | | Sometimes we want to just print a formatted string without passing any extra data. The following will be used for removing reliance on dev_vdbg() from dwc3. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: gadget: WARN() in case of unknown IRQFelipe Balbi2015-01-271-1/+1
| | | | | | | | | if an unknown IRQ event is triggered, that means the HW is really misbehaving. Instead of printing a debug message, let's WARN() so users report when that happens. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: gadget: avoid variable shadowingFelipe Balbi2015-01-271-6/+1
| | | | | | | We already have both ret and dwc defined in this same function. Signed-off-by: Felipe Balbi <balbi@ti.com>
* Merge tag 'v3.19-rc5' into nextFelipe Balbi2015-01-192-2/+8
|\ | | | | | | | | | | | | | | Linux 3.19-rc5 Conflicts: drivers/usb/dwc2/gadget.c drivers/usb/gadget/udc/bdc/bdc_ep.c
| * usb: dwc3: gadget: Stop TRB preparation after limit is reachedAmit Virdi2015-01-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DWC3 gadget sets up a pool of 32 TRBs for each EP during initialization. This means, the max TRBs that can be submitted for an EP is fixed to 32. Since the request queue for an EP is a linked list, any number of requests can be queued to it by the gadget layer. However, the dwc3 driver must not submit TRBs more than the pool it has created for. This limit wasn't respected when SG was used resulting in submitting more than the max TRBs, eventually leading to non-transfer of the TRBs submitted over the max limit. Root cause: When SG is used, there are two loops iterating to prepare TRBs: - Outer loop over the request_list - Inner loop over the SG list The code was missing break to get out of the outer loop. Fixes: eeb720fb21d6 (usb: dwc3: gadget: add support for SG lists) Cc: <stable@vger.kernel.org> # v3.9+ Signed-off-by: Amit Virdi <amit.virdi@st.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: gadget: Fix TRB preparation during SGAmit Virdi2015-01-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When scatter gather (SG) is used, multiple TRBs are prepared from one DWC3 request (dwc3_request). So while preparing TRBs, the 'last' flag should be set only when it is the last TRB being prepared from the last dwc3_request entry. The current implementation uses list_is_last to check if the dwc3_request is the last entry from the request_list. However, list_is_last returns false for the last entry too. This is because, while preparing the first TRB from a request, the function dwc3_prepare_one_trb modifies the request's next and prev pointers while moving the URB to req_queued. Hence, list_is_last always returns false no matter what. The correct way is not to access the modified pointers of dwc3_request but to use list_empty macro instead. Fixes: e5ba5ec833aa (usb: dwc3: gadget: fix scatter gather implementation) Signed-off-by: Amit Virdi <amit.virdi@st.com> Cc: <stable@vger.kernel.org> # v3.9+ Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: pci: add support for Intel Sunrise Point PCHHeikki Krogerus2014-12-221-0/+4
| | | | | | | | | | | | | | Add PCI IDs for Intel Sunrise Point PCH. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: dwc3: pci: code cleanupHeikki Krogerus2015-01-151-54/+42
| | | | | | | | | | | | | | | | | | Removing a few items that are not needed anymore and adding separate function for quirks. Acked-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: dwc3: pci: rely on default PM callbacks from PCI driver utilityHeikki Krogerus2015-01-151-34/+0
| | | | | | | | | | | | | | | | | | | | There is nothing specific being done in the suspend and resume callbacks that is not already taken care of in PCI driver core, so dropping the functions. Acked-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: dwc3: pci: remove registration of NOP PHYsHeikki Krogerus2015-01-151-68/+0
| | | | | | | | | | | | | | | | | | | | None of the PCI platforms need the NOP transceivers, and since we can now live without the PHYs, removing registration of the platform devices for them. Acked-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: dwc3: Remove current_trb as it is unusedAmit Virdi2015-01-121-3/+0
| | | | | | | | | | | | | | This field was introduced but never used. So, remove it. Signed-off-by: Amit Virdi <amit.virdi@st.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: dwc3: gadget: Remove redundant checkAmit Virdi2015-01-121-3/+0
| | | | | | | | | | | | | | | | dwc3_gadget_init_hw_endpoints calls dwc3_alloc_trb_pool only if epnum is not equal to 0 or 1. Hence, rechecking it in the called function is redundant. Signed-off-by: Amit Virdi <amit.virdi@st.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: dwc3: Fixed a typo in commentsMickael Maison2015-01-121-1/+1
|/ | | | | | | Fixed a typo in comments Signed-off-by: Mickael Maison <mickael.maison@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* Merge 3.18-rc7 into usb-nextGreg Kroah-Hartman2014-11-301-4/+4
|\ | | | | | | | | | | | | We need the xhci fixes here and this resolves a merge issue with drivers/usb/dwc3/ep0.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: dwc3: ep0: fix for dead codeFelipe Balbi2014-11-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 6856d30 (usb: dwc3: ep0: return early on NULL requests) tried to fix a minor corner case where we could dereference a NULL pointer but it also ended up introducing some dead code. Unfortunately, that dead code, if reached, could end up starving the endpoint request list because a request would never be given back when it should. Fix this by moving the check for empty request list before its first use. Reported-by: Dave Jones <davej@redhat.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
OpenPOWER on IntegriCloud