summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/ep0.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: dwc3: simplify ZLP handlingFelipe Balbi2017-04-111-20/+29
| | | | | | | | It's much simpler to just add one extra TRB chained to previous TRB to handle ZLP. This helps us reduce pointless allocations and simplifies the code a little bit. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: ep0: improve handling of unaligned OUT requestsFelipe Balbi2017-04-111-47/+18
| | | | | | | | Just like we did for all other endpoint types, let's rely on a chained TRB pointing to ep0_bounce_addr in order to align transfer size. This will make the code simpler. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: ep0: pass dep as argument to internal functionsFelipe Balbi2017-04-111-26/+26
| | | | | | | Instead of constantly recomputing how dwc and epnum relate to dep, just pass dep as argument. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: ep0: use immediate SETUP on TRBFelipe Balbi2017-04-111-5/+6
| | | | | | | | If we pass TRB's own address on bpl/bph fields, we can get our SETUP packet as immediate data on the TRB itself, without having to allocate extra memory for it. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phaseBaolin Wang2017-01-241-0/+14
| | | | | | | | | | | | | | | | When handing the SETUP packet by composite_setup(), we will release the dwc->lock. If we get the 'USB_GADGET_DELAYED_STATUS' result from setup function, which means we need to delay handling the STATUS phase. But during the lock release period, maybe the request for handling delay STATUS phase has been queued into list before we set 'dwc->delayed_status' flag or entering 'EP0_STATUS_PHASE' phase, then we will miss the chance to handle the STATUS phase. Thus we should check if the request for delay STATUS phase has been enqueued when entering 'EP0_STATUS_PHASE' phase in dwc3_ep0_xfernotready(), if so, we should handle it. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: ep0: explicitly call dwc3_ep0_prepare_one_trb()Felipe Balbi2017-01-021-13/+15
| | | | | | | | | | | | | | Let's call dwc3_ep0_prepare_one_trb() explicitly because there are occasions where we will need more than one TRB to handle an EP0 transfer. A follow-up patch will fix one bug related to multiple-TRB Data Phases when it comes to mapping/unmapping requests for DMA. Cc: <stable@vger.kernel.org> Reported-by: Janusz Dziedzic <januszx.dziedzic@linux.intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: ep0: add dwc3_ep0_prepare_one_trb()Felipe Balbi2017-01-021-10/+16
| | | | | | | | | | | | | | For now this is just a cleanup patch, no functional changes. We will be using the new function to fix a bug introduced long ago by commit 0416e494ce7d ("usb: dwc3: ep0: correct cache sync issue in case of ep0_bounced") and further worsened by commit c0bd5456a470 ("usb: dwc3: ep0: handle non maxpacket aligned transfers > 512") Cc: <stable@vger.kernel.org> Reported-by: Janusz Dziedzic <januszx.dziedzic@linux.intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: use bus->sysdev for DMA configurationArnd Bergmann2016-11-181-4/+4
| | | | | | | | | | | The dma ops for dwc3 devices are not set properly. So, use a physical device sysdev, which will be inherited from parent, to set the hardware / firmware parameters like dma. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sriram Dash <sriram.dash@nxp.com> Tested-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: ep0: avoid empty-body warningArnd Bergmann2016-11-181-6/+7
| | | | | | | | | | | | | | Building with W=1, we get a warning about harmless empty statements: drivers/usb/dwc3/ep0.c: In function 'dwc3_ep0_handle_intf': drivers/usb/dwc3/ep0.c:491:4: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] Instead of adding empty braces which would introduce checkpatch.pl warnings, we're just removing the code which doesn't do anything and making sure we return 0 so USBCV tool is happy. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: trace: purge dwc3_trace()Felipe Balbi2016-11-081-36/+10
| | | | | | | | | Finally get rid of dwc3_trace() hack. If any other message is truly needed, we should add proper tracepoints for them instead of hacking around with dwc3_trace() or similar. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: gadget: don't clear RUN/STOP when it's invalid to do soBaolin Wang2016-11-031-0/+2
| | | | | | | | | | | | | | | | | | When we change the USB function with configfs dynamically, we possibly met this situation: one core is doing the control transfer, another core is trying to unregister the USB gadget from userspace, we must wait for completing this control tranfer, or it will hang the controller to set the DEVCTRLHLT flag. [ felipe.balbi@linux.intel.com: several fixes to the patch - call complete() before starting following SETUP transfer - add a macro for ep0_in_setup's timeout - change commit subject slightly - break lines at 72 characters (git adds an 8-character tab) - avoid changes to dwc3_gadget_run_stop() ] Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: ep0: simplify dwc3_ep0_handle_feature()Felipe Balbi2016-11-031-93/+164
| | | | | | | | | By extracting smaller functions from dwc3_ep0_handle_feature(), it becomes far easier to understand what's going on. Cleanup only, no functional changes. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: trace: print out ep0state also from XferCompleteFelipe Balbi2016-10-311-4/+0
| | | | | | | With this extra piece of information, it will be easier to find mismatches between driver and HW. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: debug: move dwc3_ep0_state_string() to debug.hFelipe Balbi2016-10-311-16/+0
| | | | | | | | We will be using dwc3_ep0_state_string() from within our tracepoints, so we need to move that helper to debug.h in order for it to be accessible. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: gadget: remove redundant trace printsFelipe Balbi2016-10-311-16/+1
| | | | | | | | Removing some trace prints which were made redundant when we started decoding events and TRBs completely within their respective trace points. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: remove trailing newline from dwc3_traceFelipe Balbi2016-06-201-2/+2
| | | | | | | | when passing strings to trace, we don't need the trailing newline character. Trace already appends a newline character automatically. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: ep0: Use the correct type for SET_SEL dataJohn Youn2016-06-201-2/+2
| | | | | | | | | u2sel and u2pel should be __le16. Doesn't fix any issue. Found with sparse. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: ep0: Fix endianness of wIndex passed to dwc3_wIndex_to_depJohn Youn2016-06-201-1/+1
| | | | | | | | | | The wIndex passed in here is CPU endianness, but the function expects little endian. Found with sparse. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: trace: fully decode IRQ eventsFelipe Balbi2016-06-201-5/+2
| | | | | | | This will make it more human-friendly to read trace output from dwc3. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: gadget: add a pointer to endpoint registersFelipe Balbi2016-06-201-3/+1
| | | | | | | | | | | | | | By adding a pointer to endpoint registers' base address, we can avoid using our controller-wide struct dwc3 pointer for everything. At some point this will allow us to have per-endpoint locks which will, in turn, let us queue requests to separate endpoints in parallel. Because of this change our debugfs interface and io accessors need to be changed accordingly. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: gadget: pass dep as argument to endpoint commandFelipe Balbi2016-06-201-3/+2
| | | | | | | | | | | | | | | | In all call sites of dwc3_send_gadget_ep_cmd() we already had a valid dep pointer, so instead of passing dwc and dep->number, which would be used to fetch the same pointer we already had, just pass dep directly. In other words, we're changing: struct dwc3_ep *dep = dwc[dep->number]; to just passing struct dwc3_ep *dep as argument. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: ep0: sanity check test mode selectorFei Yang2016-04-281-2/+12
| | | | | | | | | | | In case host sends us an unsupported test mode, we *must* stall this request. This will tell the host that the selector is invalid and we won't put the controller in unsupported test modes which could have undetermined side-effects. Signed-off-by: Fei Yang <fei.yang@intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: gadget: rename busy/free_slot to trb_enqueue/dequeueFelipe Balbi2016-04-181-3/+3
| | | | | | | | | This makes it clear that we're dealing with a queue of TRBs. No functional changes. While at that, also rename start_slot to first_trb_index for similar reasons. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: better name for our request management listsFelipe Balbi2016-04-141-7/+7
| | | | | | | | | | | | | | request_list and req_queued were, well, weird naming choices. Let's give those better names and call them, respectively, pending_list and started_list. These new names better reflect what these lists are supposed to do. While at that also rename req->queued to req->started. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: drop FIFO resizing logicFelipe Balbi2016-04-141-9/+0
| | | | | | | | | | | | | | | That FIFO resizing logic was added to support OMAP5 ES1.0 which had a bogus default FIFO size. I can't remember the exact size of default FIFO, but it was less than one bulk superspeed packet (<1024) which would prevent USB3 from ever working on OMAP5 ES1.0. However, OMAP5 ES1.0 support has been dropped by commit aa2f4b16f830 ("ARM: OMAP5: id: Remove ES1.0 support") which renders FIFO resizing unnecessary. Tested-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: dwc3: Update speed checks for SuperSpeedPlusJohn Youn2016-03-041-3/+6
| | | | | | | | Update various places where the speed is checked so that it takes into account SuperSpeedPlus properly. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
* usb: dwc3: Fix assignment of EP transfer resourcesJohn Youn2016-02-171-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assignement of EP transfer resources was not handled properly in the dwc3 driver. Commit aebda6187181 ("usb: dwc3: Reset the transfer resource index on SET_INTERFACE") previously fixed one aspect of this where resources may be exhausted with multiple calls to SET_INTERFACE. However, it introduced an issue where composite devices with multiple interfaces can be assigned the same transfer resources for different endpoints. This patch solves both issues. The assignment of transfer resources cannot perfectly follow the data book due to the fact that the controller driver does not have all knowledge of the configuration in advance. It is given this information piecemeal by the composite gadget framework after every SET_CONFIGURATION and SET_INTERFACE. Trying to follow the databook programming model in this scenario can cause errors. For two reasons: 1) The databook says to do DEPSTARTCFG for every SET_CONFIGURATION and SET_INTERFACE (8.1.5). This is incorrect in the scenario of multiple interfaces. 2) The databook does not mention doing more DEPXFERCFG for new endpoint on alt setting (8.1.6). The following simplified method is used instead: All hardware endpoints can be assigned a transfer resource and this setting will stay persistent until either a core reset or hibernation. So whenever we do a DEPSTARTCFG(0) we can go ahead and do DEPXFERCFG for every hardware endpoint as well. We are guaranteed that there are as many transfer resources as endpoints. This patch triggers off of the calling dwc3_gadget_start_config() for EP0-out, which always happens first, and which should only happen in one of the above conditions. Fixes: aebda6187181 ("usb: dwc3: Reset the transfer resource index on SET_INTERFACE") Cc: <stable@vger.kernel.org> # v3.2+ Reported-by: Ravi Babu <ravibabu@ti.com> Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
* usb: dwc3: ep0: fix setup_packet_pending initializationFelipe Balbi2015-12-151-3/+5
| | | | | | | | | | | | It just ocurred to me that dwc3 already gives a really hint of when a setup packet is pending and that's the SETUP_PENDING TRB Status for EP0 IRQs. Fix setup_packet_pending initialization based on that. While at that, also make sure the comment in gadget.c matches what code is doing. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: purge dev_dbg() callsFelipe Balbi2015-12-151-2/+2
| | | | | | | | The last few dev_dbg() messages are converted to tracepoints and we can finally ignore dev_dbg() messages during debug sessions. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: handle non maxpacket aligned transfers > 512Kishon Vijay Abraham I2015-07-301-14/+28
| | | | | | | | | | Use chained TRB mechanism to handle non maxpacket aligned transfers greater than bounce buffer size. With this the first TRB will be programmed to receive 'ALIGN(ur->length - maxp, maxp)' data and the second TRB will be programmed to receive the remaining data using bounce buffer. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: Add chained TRB supportKishon Vijay Abraham I2015-07-301-3/+13
| | | | | | | | Add chained TRB support to ep0. Now TRB's can be chained just by invoking _dwc3_ep0_start_trans_ with 'chain' parameter set to true. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3; ep0: Modify _dwc3_ep0_start_trans_ API to take 'chain' parameterKishon Vijay Abraham I2015-07-301-7/+8
| | | | | | | | | No functional change. Added a new parameter in _dwc3_ep0_start_trans_ to indicate whether the TRB is a chained TRB or last TRB. This is in preparation for adding chained TRB support for ep0. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: preparation for handling non maxpacket aligned transfers > 512Kishon Vijay Abraham I2015-07-301-8/+17
| | | | | | | | | | No functional change. This is in preparation for handling non maxpacket aligned transfers greater than bounce buffer size. This is basically to avoid code duplication when using chained TRB transfers to handle non maxpacket aligned transfers greater than bounce buffer size. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: use _roundup_ to calculate the transfer sizeKishon Vijay Abraham I2015-07-301-3/+1
| | | | | | | | | No functional change. Used _roundup_ macro to calculate the transfer size aligned to maxpacket in dwc3_ep0_complete_data. It also makes it similar to how transfer size is calculated in __dwc3_ep0_do_control_data. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytesKishon Vijay Abraham I2015-07-301-2/+10
| | | | | | | | | | | | | | | | DWC3 uses bounce buffer to handle non max packet aligned OUT transfers and the size of bounce buffer is 512 bytes. However if the host initiates OUT transfers of size more than 512 bytes (and non max packet aligned), the driver throws a WARN dump but still programs the TRB to receive more than 512 bytes. This will cause bounce buffer to overflow and corrupt the adjacent memory locations which can be fatal. Fix it by programming the TRB to receive a maximum of DWC3_EP0_BOUNCE_SIZE (512) bytes. Cc: <stable@vger.kernel.org> # 3.4+ Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> 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: gadget: use common is_selfpoweredPeter Chen2015-01-291-1/+1
| | | | | | | 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>
* 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>
* | usb: dwc3: ep0: remove unnecessary break after returnJingoo Han2014-11-051-2/+0
| | | | | | | | | | | | | | | | | | Fix the following checkpatch warning. WARNING: break is not useful after a goto or return Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: dwc3: ep0: trace ep0 TRBs tooFelipe Balbi2014-11-031-0/+6
| | | | | | | | | | | | | | Add TRB tracepoints for ep0 TRBs as that might help finding bugs with ep0 handling. Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: dwc3: trace: remove unnecessary newline characterFelipe Balbi2014-11-031-9/+9
|/ | | | | | tracing infrastructure already adds those for us. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: fix Data Phase for transfer sizes aligned to wMaxPacketSizeFelipe Balbi2014-10-231-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | According to Section 8.5.3.2 of the USB 2.0 specification, a USB device must terminate a Data Phase with either a short packet or a ZLP (if the previous transfer was a multiple of wMaxPacketSize). For reference, here's what the USB 2.0 specification, section 8.5.3.2 says: " 8.5.3.2 Variable-length Data Stage A control pipe may have a variable-length data phase in which the host requests more data than is contained in the specified data structure. When all of the data structure is returned to the host, the function should indicate that the Data stage is ended by returning a packet that is shorter than the MaxPacketSize for the pipe. If the data structure is an exact multiple of wMaxPacketSize for the pipe, the function will return a zero-length packet to indicate the end of the Data stage. " Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: return early on NULL requestsFelipe Balbi2014-10-201-3/+6
| | | | | | | | | | | if our list of requests is empty, return early. There's really nothing to be done in case our request list is empty anyway because the only situation where we our list is empty, is when we're transferring ZLPs. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: gadget: fix set_halt() bug with pending transfersFelipe Balbi2014-10-201-2/+2
| | | | | | | | | | | | | | | | According to our Gadget Framework API documentation, ->set_halt() *must* return -EAGAIN if we have pending transfers (on either direction) or FIFO isn't empty (on TX endpoints). Fix this bug so that the mass storage gadget can be used without stall=0 parameter. This patch should be backported to all kernels since v3.2. Cc: <stable@vger.kernel.org> # v3.2+ Suggested-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: hold our lock in dwc3_gadget_ep0_set_haltFelipe Balbi2014-10-201-1/+15
| | | | | | | | | dwc3_gadget_ep0_set_halt() will be called without locks held in some cases, so we must hold the lock on our own. While at that, also add a version without locks to be called in certain conditions. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: add tracepoints to aid debuggingFelipe Balbi2014-09-051-28/+36
| | | | | | | | | | | | | When we're debugging hard-to-reproduce and time-sensitive use cases, printk() poses too much overhead. That's when the kernel's tracing infrastructure comes into play. This patch implements a few initial tracepoints for the dwc3 driver. More traces can be added as necessary in order to ease the task of debugging dwc3. Reviewed-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: move all string helper functions to debug.hFelipe Balbi2014-09-051-0/+1
| | | | | | | | | | Those functions are only using within debugging messages, grouping them into debug.h makes sense. While at that, also add missing multiple inclusion guard. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: fix implementation of endpoint wedgeAlan Stern2013-11-251-0/+2
| | | | | | | | | | | | | | The dwc3 UDC driver doesn't implement endpoint wedging correctly. When an endpoint is wedged, the gadget driver should be allowed to clear the wedge by calling usb_ep_clear_halt(). Only the host is prevented from resetting the endpoint. This patch fixes the implementation. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Pratyush Anand <pratyush.anand@st.com> Cc: <stable@vger.kernel.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: Remove unnecessary semicolonsJoe Perches2013-10-111-3/+3
| | | | | | | These aren't necessary after switch and if blocks. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>