summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
Commit message (Collapse)AuthorAgeFilesLines
* usb: dwc3: st: add missing <linux/pinctrl/consumer.h> includeFelipe Balbi2016-10-311-0/+1
| | | | | | | | | dwc3-st uses pinctrl_pm_select_*_state() however it doesn't include the necessary header. Fix the build break caused by that, by simply including the missing header. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: Fix error handling for core initVivek Gautam2016-10-311-3/+2
| | | | | | | | | | | | | | Fixing the sequence of events in dwc3_core_init() error exit path. dwc3_core_exit() call is also removed from the error path since, whatever it's doing is already done. Fixes: c499ff7 usb: dwc3: core: re-factor init and exit paths Cc: Felipe Balbi <felipe.balbi@linux.intel.com> Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Stable <stable@vger.kernel.org> # 4.8+ Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: Fix size used in dma_free_coherent()Christophe JAILLET2016-10-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 2abd9d5fa60f9 ("usb: dwc3: ep0: Add chained TRB support"), the size of the memory allocated with 'dma_alloc_coherent()' has been modified but the corresponding calls to 'dma_free_coherent()' have not been updated accordingly. This has been spotted with coccinelle, using the following script: //////////////////// @r@ expression x0, x1, y0, y1, z0, z1, t0, t1, ret; @@ * ret = dma_alloc_coherent(x0, y0, z0, t0); ... * dma_free_coherent(x1, y1, ret, t1); @script:python@ y0 << r.y0; y1 << r.y1; @@ if y1.find(y0) == -1: print "WARNING: sizes look different: '%s' vs '%s'" % (y0, y1) //////////////////// Fixes: 2abd9d5fa60f9 ("usb: dwc3: ep0: Add chained TRB support") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: gadget: never pre-start Isochronous endpointsFelipe Balbi2016-10-171-3/+11
| | | | | | | | | | We cannot pre-start isochronous endpoints because we rely on the micro-frame number passed via XferNotReady command for proper Isochronous scheduling. Fixes: 08a36b543803 ("usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue()") Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: gadget: properly account queued requestsFelipe Balbi2016-10-171-3/+5
| | | | | | | | | | Some requests could be accounted for multiple times. Let's fix that so each and every requests is accounted for only once. Cc: <stable@vger.kernel.org> # v4.8 Fixes: 55a0237f8f47 ("usb: dwc3: gadget: use allocated/queued reqs for LST bit") Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* Merge tag 'usb-for-v4.9' of ↵Greg Kroah-Hartman2016-09-145-213/+280
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v4.9 merge window This time around we have 92 non-merge commits. Most of the changes are in drivers/usb/gadget (40.3%) with drivers/usb/gadget/function being the most active directory (27.2%). As for UDC drivers, only dwc3 (26.5%) and dwc2 (12.7%) have really been active. The most important changes for dwc3 are better support for scatterlist and, again, throughput improvements. While on dwc2 got some minor stability fixes related to soft reset and FIFO usage. Felipe Tonello has done some good work fixing up our f_midi gadget and Tal Shorer has implemented a nice API change for our ULPI bus. Apart from these, we have our usual set of non-critical fixes, spelling fixes, build warning fixes, etc.
| * usb: dwc3: of-simple: add compatible for CaviumFelipe Balbi2016-09-131-0/+1
| | | | | | | | | | | | | | | | Add necessary compatible flag for Cavium's DWC3 so dwc3-of-simple will probe. Tested-by: Steven J. Hill <Steven.Hill@cavium.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: of-simple: allow glues without clocksFelipe Balbi2016-09-131-16/+28
| | | | | | | | | | | | | | | | Instead of erroring out when we don't have clocks, let's just avoid any calls to the clk API. Tested-by: Steven J. Hill <Steven.Hill@cavium.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: of-simple: Fix warning during unbindAnurag Kumar Vulisha2016-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In dwc3_of_simple_remove() we are using clk_unprepare() before doing any clk_disable(). If we enable Common CLK framework (CCF) and try to unbind dwc3-of-simple driver, we see kernel WARN messages. This patch fixes this kernel warning by using clk_disable_unprepare() instead of clk_unprepare(). Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: fix Clear Stall EP command failureLu Baolu2016-09-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 50c763f8c1bac ("usb: dwc3: Set the ClearPendIN bit on Clear Stall EP command") sets ClearPendIN bit for all IN endpoints of v2.60a+ cores. This causes ClearStall command fails on 2.60+ cores operating in HighSpeed mode. In page 539 of 2.60a specification: "When issuing Clear Stall command for IN endpoints in SuperSpeed mode, the software must set the "ClearPendIN" bit to '1' to clear any pending IN transcations, so that the device does not expect any ACK TP from the host for the data sent earlier." It's obvious that we only need to apply this rule to those IN endpoints that currently operating in SuperSpeed mode. Fixes: 50c763f8c1bac ("usb: dwc3: Set the ClearPendIN bit on Clear Stall EP command") Cc: <stable@vger.kernel.org> # v4.7+ Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: avoid -Wmaybe-uninitialized warningArnd Bergmann2016-09-091-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up the loop in dwc3_cleanup_done_reqs() introduced a gcc warning if built with "-Wmaybe-uninitialized": drivers/usb/dwc3/gadget.c: In function 'dwc3_endpoint_transfer_complete': drivers/usb/dwc3/gadget.c:2015:9: 'trb' may be used uninitialized in this function [-Wmaybe-uninitialized] I believe it is a false positive and we always have a valid 'trb' pointer at the end of the function, but neither I nor the compiler are able to prove that. This works around the warning by computing a flag earlier in the function when it's guaranteed to be valid, which tells the compiler that it's safe and makes it easier to understand to me. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 31162af447d7 ("usb: dwc3: gadget: avoid while (1) loop on completion") Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: Fix dr_mode validationThinh Nguyen2016-09-072-12/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch follows the similar fix in dwc2. See commit 5268ed9d2e3b ("usb: dwc2: Fix dr_mode validation") Currently, the dr_mode is only checked against the module configuration. It also needs to be checked against the hardware capablities. The driver now checks if both the module configuration and hardware are capable of the dr_mode value. If not, then it will issue a warning and fall back to a supported value. If it is unable to fall back to a suitable value, then the probe will fail. Behavior summary: module : actual HW config dr_mode : dr_mode --------------------------------- host host any : host host dev any : INVALID host otg any : host dev host any : INVALID dev dev any : dev dev otg any : dev otg host any : host otg dev any : dev otg otg any : dr_mode Signed-off-by: Thinh Nguyen <thinhn@synopsys.com> Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: ulpi: make dwc3_ulpi_ops constantTal Shorer2016-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | ulpi_register_interface() accepts a const struct ulpi_ops and dwc3 doesn't perform any changes to this struct at runtime, so there's no reason it shouldn't be constant. Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Tal Shorer <tal.shorer@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: ulpi: rename operations {read|write}_dev to simply {read|write}Tal Shorer2016-09-061-2/+2
| | | | | | | | | | | | | | | | | | | | With the removal of the old {read|write} operations, we can now safely rename the new api operations {read|write}_dev to use the shorter and clearer names {read|write}, respectively. Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Tal Shorer <tal.shorer@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: ulpi: use new apiTal Shorer2016-09-061-6/+6
| | | | | | | | | | | | | | | | | | | | The old read, write callbacks in struct ulpi_ops have been deprecated in favor of new callbacks that pass the parent device directly. Replace the used callbacks in dwc3's ulpi component with the new api. Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Tal Shorer <tal.shorer@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: stop kicking if we run out of spaceFelipe Balbi2016-08-251-0/+3
| | | | | | | | | | | | | | | | In case our TRB ring is full, we can avoid trying to kick transfers which won't start and just add requests to the queue. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: abolish trbs_leftFelipe Balbi2016-08-251-9/+7
| | | | | | | | | | | | | | Instead, we can always rely on dwc3_calc_trbs_left() directly. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: Add ENDXFER command pollingJohn Youn2016-08-253-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | ENDXFER polling is available on version 3.10a and later of the DWC_usb3 (USB 3.0) controller. With this feature, the software can poll the CMDACT bit in the DEPCMD register after issuing an ENDXFER command. This feature is enabled by writing GUCTL2[14]. This feature is NOT available on the DWC_usb31 (USB 3.1) IP. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: Add revision numbers for the USB 3.0 IPJohn Youn2016-08-251-0/+2
| | | | | | | | | | | | | | Add revision number constants for the 3.00a and 3.10a releases. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: core: Move the mode setting to the right placeBaolin Wang2016-08-251-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | When dwc3 core enters into suspend mode, the system (especially for mobile device) may power off the dwc3 controller for power saving, that will cause dwc3 controller lost the mode operation when resuming dwc3 core. Thus we can move the mode setting into dwc3_core_init() function to avoid this issue. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: of-simple: add compatible for rockchip rk3399William Wu2016-08-251-0/+1
| | | | | | | | | | | | | | | | | | Rockchip platform merely enable usb3 clocks and populate its children. So we can use this generic glue layer to support Rockchip dwc3. Signed-off-by: William Wu <william.wu@rock-chips.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: add dis_del_phy_power_chg_quirkWilliam Wu2016-08-252-0/+8
| | | | | | | | | | | | | | | | | | | | | | Add a quirk to clear the GUSB3PIPECTL.DELAYP1TRANS bit, which specifies whether disable delay PHY power change from P0 to P1/P2/P3 when link state changing from U0 to U1/U2/U3 respectively. Signed-off-by: William Wu <william.wu@rock-chips.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: make usb2 phy utmi interface configurableWilliam Wu2016-08-252-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support to configure the UTMI+ PHY with an 8- or 16-bit interface via DT. The UTMI+ PHY interface is a hardware capability, and it's platform dependent. Normally, the PHYIF can be configured during coreconsultant. But for some specific USB cores(e.g. rk3399 SoC DWC3), the default PHYIF configuration value is false, so we need to reconfigure it by software. Signed-off-by: William Wu <william.wu@rock-chips.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: add dis_u2_freeclk_exists_quirkWilliam Wu2016-08-252-0/+10
| | | | | | | | | | | | | | | | | | | | Add a quirk to clear the GUSB2PHYCFG.U2_FREECLK_EXISTS bit, which specifies whether the USB2.0 PHY provides a free-running PHY clock, which is active when the clock control input is active. Signed-off-by: William Wu <william.wu@rock-chips.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: improve increment request->actualFelipe Balbi2016-08-251-6/+2
| | | | | | | | | | | | | | No functional changes, just a slight cosmetic change. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: remove condition that never happensFelipe Balbi2016-08-251-4/+2
| | | | | | | | | | | | | | We don't use LST bit anymore, so this condition will never trigger. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: add remaining sg entries to ringFelipe Balbi2016-08-251-9/+24
| | | | | | | | | | | | | | | | Upon transfer completion after a full ring, let's add more TRBs to our ring in order to complete our request successfully. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: interrupt on ring full tooFelipe Balbi2016-08-221-1/+4
| | | | | | | | | | | | | | | | If the ring is full and we are processing a big sglist, then let's interrupt so we can, later, add more TRBs to the ring. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: add sg and num_pending_sgs to dwc3_requestFelipe Balbi2016-08-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | These two fields will be used in a follow-up patch to track how many entries of request's sglist we have already processed. The reason is that if a gadget driver sends an sglist with more entries then we can fit in the ring, we will have to continue processing remaining afterwards. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: avoid while (1) loop on completionFelipe Balbi2016-08-221-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We know that we have to iterate over the list of started requests. Instead of looping forever, we can rely on list_for_each_entry(). Likewise, instead of a do {} while loop over all, maybe available, scatterlist entries, we can detect if $this request uses scatterlist and rely on for_each_sg(). This makes the code easier to follow while making sure that we will *always* break out of the loop. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue()Felipe Balbi2016-08-221-76/+7
| | | | | | | | | | | | | | | | | | | | | | Many of the comments in that function are really outdated and don't match what the driver is doing. Moreover, recent patches combined programming model for all non-control endpoints, this gives us an opportunity to get rid of our special cases in __dwc3_gadget_ep_queue(). Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: simplify dwc3_ep_prev_trb()Felipe Balbi2016-08-221-5/+5
| | | | | | | | | | | | | | | | | | We always need to decrement our index by at least one. Simplify the implementation by using a temporary local variable and making sure that we will always decrement one extra if tmp == 0. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: increment dequeue pointer on completionFelipe Balbi2016-08-221-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of waiting until giveback before incrementing the dequeue pointer, we can increment it from dwc3_cleanup_done_reqs(), that way we avoid an extra loop over all TRBs during giveback. While at that, also avoid using req->first_trb_index as that's completely unnecessary. A follow-up patch will clean up further uses of that and remove the field altogether. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: retire LST bit completelyFelipe Balbi2016-08-221-47/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | The only endpoint which actually requires LST bit and XferComplete is ep0/1. Let's save some time by completely removing LST bit support and XferComplete. This simplifies and consolidates endpoint handling for all other 3 transfer types while also avoiding extra interrupts. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* | Merge 4.8-rc6 into usb-nextGreg Kroah-Hartman2016-09-122-2/+7
|\ \ | | | | | | | | | | | | | | | We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usb: dwc3: pci: fix build warning on !PM_SLEEPFelipe Balbi2016-09-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building a kernel with CONFIG_PM_SLEEP=n, we get the following warning: drivers/usb/dwc3/dwc3-pci.c:253:12: warning: 'dwc3_pci_pm_dummy' defined but not used In order to fix this, we should only define dwc3_pci_pm_dummy() when CONFIG_PM_SLEEP is defined. Fixes: f6c274e11e3b ("usb: dwc3: pci: runtime_resume child device") Reported-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | Revert "usb: dwc3: gadget: always decrement by 1"John Youn2016-09-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6f8245b4e37c ("usb: dwc3: gadget: always decrement by 1"). We can't always decrement this value. We should decrement only if the calculation of free slots results in a LINK TRB being among one of the free slots (dequeue < enqueue). Otherwise, if the LINK TRB is not among the free slots then it should not be decremented. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* | | Merge 4.8-rc5 into usb-testingGreg Kroah-Hartman2016-09-054-9/+14
|\| | | | | | | | | | | | | | | | | We want the USB fixes in here for testing and merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usb: dwc3: gadget: always decrement by 1Felipe Balbi2016-08-251-4/+1
| | | | | | | | | | | | | | | | | | | | | We need to decrement in both cases (enq > deq and enq < deq) Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | usb: dwc3: debug: fix ep name on trace outputFelipe Balbi2016-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | There was a typo when generating endpoint name which would be very confusing when debugging. Fix it. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | usb: dwc3: gadget: don't rely on jiffies while holding spinlockNicolas Saenz Julienne2016-08-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __dwc3_gadget_wakeup() is called while holding a spinlock, then depends on jiffies in order to timeout while polling the USB core for a link state update. In the case the wakeup failed, the timeout will never happen and will also cause the cpu to stall until rcu_preempt kicks in. This switches to a "decrement variable and wait" timeout scheme. Signed-off-by: Nicolas Saenz Julienne <nicolassaenzj@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | usb: dwc3: core: allow device to runtime_suspend several timesFelipe Balbi2016-08-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After going through runtime_suspend/runtime_resume cycle once we would be left with an unbalanced pm_runtime_get() call. Fix that by making sure that we try to suspend right after resuming so things are balanced and device can runtime_suspend again. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | usb: dwc3: pci: runtime_resume child deviceFelipe Balbi2016-08-221-1/+8
| |/ | | | | | | | | | | | | | | During runtime_resume of dwc3-pci.c, we need to runtime suspend our child device (which is dwc3 proper) otherwise nothing will happen. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* | Merge 4.8-rc3 into usb-nextGreg Kroah-Hartman2016-08-213-22/+36
|\| | | | | | | | | | | We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: dwc3: gadget: stop processing on HWO setFelipe Balbi2016-08-111-10/+1
| | | | | | | | | | | | | | | | stop consuming TRBs when we reach one with HWO bit already set. This will prevent us from prematurely retiring a TRB. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: don't set last bit for ISOC endpointsJanusz Dziedzic2016-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Synopsys Databook 2.60a, section 8.3.4, it's stated that: The LST bit should be set to 0 (isochronous transfers normally continue until the endpoint is removed entirely, at which time an End Transfer command is used to stop the transfer). This patch makes sure that detail is observed and fixes a regression with Android Audio playback caused by recent changes to DWC3 gadget. Signed-off-by: Janusz Dziedzic <januszx.dziedzic@linux.intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: fix missing platform_set_drvdata() in dwc3_of_simple_probe()Wei Yongjun2016-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | Add missing platform_set_drvdata() in dwc3_of_simple_probe(), otherwise calling platform_get_drvdata() in remove returns NULL. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: pci: add Intel Kabylake PCI IDHeikki Krogerus2016-08-101-0/+2
| | | | | | | | | | | | | | | | | | Intel Kabylake PCH has the same DWC3 than Intel Sunrisepoint. Add the new ID to the supported devices. Cc: <stable@vger.kernel.org> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: always cleanup all TRBsFelipe Balbi2016-08-101-1/+1
| | | | | | | | | | | | | | | | | | If we stop earlier due to short packet, we will not be able to giveback all TRBs. Cc: <stable@vger.kernel.org> Cc: Brian E Rogers <brian.e.rogers@intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * usb: dwc3: gadget: fix for short pkts during chained xfersFelipe Balbi2016-08-101-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DWC3 has one interesting peculiarity with chained transfers. If we setup N chained transfers and we get a short packet before processing all N TRBs, DWC3 will (conditionally) issue a XferComplete or XferInProgress event and retire all TRBs from the one which got a short packet to the last without clearing their HWO bits. This means SW must clear HWO bit manually, which this patch is doing. Cc: <stable@vger.kernel.org> Cc: Brian E Rogers <brian.e.rogers@intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>