- 11 12月, 2017 1 次提交
-
-
由 Felipe Balbi 提交于
Instead of keeping our own isoch_delay, let's make use of the newly introduced isoch_delay member in struct usb_gadget. The benefit here is that we would be using a generic "API" which other UDCs can use, resulting in a common setup for gadget drivers who may be interested in Isoch Delay value. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 07 11月, 2017 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Kukjin Kim <kgene@kernel.org> Cc: Krzysztof Kozlowski <krzk@kernel.org> Cc: Patrice Chotard <patrice.chotard@st.com> Acked-by: NFelipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 04 11月, 2017 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NFelipe Balbi <felipe.balbi@linux.intel.com> Acked-by: NJohan Hovold <johan@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 19 10月, 2017 1 次提交
-
-
由 Christos Gkekas 提交于
Many variables in ep0 are set but never used, so should be removed. Signed-off-by: NChristos Gkekas <chris.gekas@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 18 9月, 2017 1 次提交
-
-
由 Felipe Balbi 提交于
If we don't assign a TRB to ep0 requests, we won't be able to unmap the request later on resulting in starvation of DMA resources. Fixes: 4a71fcb8 ("usb: dwc3: gadget: only unmap requests from DMA if mapped") Reported-by: NThinh Nguyen <Thinh.Nguyen@synopsys.com> Tested-by: NThinh Nguyen <Thinh.Nguyen@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 13 6月, 2017 1 次提交
-
-
由 Felipe Balbi 提交于
We don't (yet) support PTM_STATUS messages so let's not reply to them erroneously. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 02 6月, 2017 1 次提交
-
-
由 Felipe Balbi 提交于
No functional changes, just making sure we can use these for ReST docs later. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 11 4月, 2017 4 次提交
-
-
由 Felipe Balbi 提交于
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: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
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: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Instead of constantly recomputing how dwc and epnum relate to dep, just pass dep as argument. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
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: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 24 1月, 2017 1 次提交
-
-
由 Baolin Wang 提交于
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: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 02 1月, 2017 2 次提交
-
-
由 Felipe Balbi 提交于
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: NJanusz Dziedzic <januszx.dziedzic@linux.intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
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 0416e494 ("usb: dwc3: ep0: correct cache sync issue in case of ep0_bounced") and further worsened by commit c0bd5456 ("usb: dwc3: ep0: handle non maxpacket aligned transfers > 512") Cc: <stable@vger.kernel.org> Reported-by: NJanusz Dziedzic <januszx.dziedzic@linux.intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 18 11月, 2016 2 次提交
-
-
由 Arnd Bergmann 提交于
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: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NSriram Dash <sriram.dash@nxp.com> Tested-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Arnd Bergmann 提交于
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: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 08 11月, 2016 1 次提交
-
-
由 Felipe Balbi 提交于
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: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 03 11月, 2016 2 次提交
-
-
由 Baolin Wang 提交于
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: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
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: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 31 10月, 2016 3 次提交
-
-
由 Felipe Balbi 提交于
With this extra piece of information, it will be easier to find mismatches between driver and HW. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
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: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Removing some trace prints which were made redundant when we started decoding events and TRBs completely within their respective trace points. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 20 6月, 2016 6 次提交
-
-
由 Felipe Balbi 提交于
when passing strings to trace, we don't need the trailing newline character. Trace already appends a newline character automatically. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 John Youn 提交于
u2sel and u2pel should be __le16. Doesn't fix any issue. Found with sparse. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 John Youn 提交于
The wIndex passed in here is CPU endianness, but the function expects little endian. Found with sparse. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
This will make it more human-friendly to read trace output from dwc3. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
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: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
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: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 28 4月, 2016 1 次提交
-
-
由 Fei Yang 提交于
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: NFei Yang <fei.yang@intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 18 4月, 2016 1 次提交
-
-
由 Felipe Balbi 提交于
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: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 14 4月, 2016 2 次提交
-
-
由 Felipe Balbi 提交于
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: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
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 aa2f4b16 ("ARM: OMAP5: id: Remove ES1.0 support") which renders FIFO resizing unnecessary. Tested-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 04 3月, 2016 1 次提交
-
-
由 John Youn 提交于
Update various places where the speed is checked so that it takes into account SuperSpeedPlus properly. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
- 17 2月, 2016 1 次提交
-
-
由 John Youn 提交于
The assignement of EP transfer resources was not handled properly in the dwc3 driver. Commit aebda618 ("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: aebda618 ("usb: dwc3: Reset the transfer resource index on SET_INTERFACE") Cc: <stable@vger.kernel.org> # v3.2+ Reported-by: NRavi Babu <ravibabu@ti.com> Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
- 15 12月, 2015 2 次提交
-
-
由 Felipe Balbi 提交于
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: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
The last few dev_dbg() messages are converted to tracepoints and we can finally ignore dev_dbg() messages during debug sessions. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 31 7月, 2015 4 次提交
-
-
由 Kishon Vijay Abraham I 提交于
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: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Kishon Vijay Abraham I 提交于
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: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Kishon Vijay Abraham I 提交于
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: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Kishon Vijay Abraham I 提交于
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: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-