- 03 11月, 2016 40 次提交
-
-
由 Felipe Balbi 提交于
We'll be tracking a little more information for PCI drivers, it's about time we add a private structure for that. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
When we get a half-way processed request, we should make sure to try to prepare further TRBs for it or for any possibly queued up request held in our pending_list. This will make sure our controller is kept busy for as long as possible. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Say we have three requests prepared to the HW (reqA, reqB, and reqC). All of them are composed of SG-lists with several entries and they all requests interrupt only on last TRBs of the SG-list. When we get interrupt for reqA, it could be that reqB is already half-way transferred and some of its TRBs will have HWO already cleared. It's okay to free up TRBs without HWO bit set, but we need to guarantee we don't giveback a request that's half-way transferred as that will confuse gadget drivers. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
In cases where we're given an SG-list which is longer than the amount of currently available TRBs, we will be left with the same request on started_list and we should prioritize that request over possible new requests on pending_list. That's a way to guarantee requests complete in order. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
This will give us a simpler way of figuring out how many bytes were left in each TRB. It's useful for cases where we queue only part of an SG-list due to amount of available TRBs at the time of kicking the transfer. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
If XferNotReady comes before usb_ep_queue() we will set our PENDING request flag and wait for a request. However, originally, we were assuming usb_ep_queue() would always happen before our first XferNotReady and that causes a corner case where we could try to issue ENDTRANSFER command before STARTTRANSFER. Let's fix that by tracking endpoints which have been started. Reported-by: NJanusz Dziedzic <januszx.dziedzic@intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Baolin Wang 提交于
Instead of just delaying for 100us, we should actually wait for End Transfer Command Complete interrupt before moving on. Note that this should only be done if we're dealing with one of the core revisions that actually require the interrupt before moving on. [ felipe.balbi@linux.intel.com: minor improvements ] Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Torsten Polle 提交于
dev_kfree_skb_any() is used to free packets that are dropped by the network stack. Therefore the function should not be used for packets that have been successfully processed by the network stack. Instead dev_consume_skb_any() has to be used for such consumed packets. This separation helps to identify dropped packets. Signed-off-by: NTorsten Polle <tpolle@de.adit-jv.com> Signed-off-by: NHarish Jenny K N <harish_kandiga@mentor.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Torsten Polle 提交于
Socket buffers should be linked to the (network) device that allocated the buffers. __netdev_alloc_skb performs this task. Signed-off-by: NTorsten Polle <tpolle@de.adit-jv.com> Signed-off-by: NJim Baxter <jim_baxter@mentor.com> Signed-off-by: NHarish Jenny K N <harish_kandiga@mentor.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Torsten Polle 提交于
Socket buffers should be linked to the (network) device that allocated the buffers. Signed-off-by: NTorsten Polle <tpolle@de.adit-jv.com> Signed-off-by: NHarish Jenny K N <harish_kandiga@mentor.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Daniel Wagner 提交于
There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker context reinit_completion() usb_esp_queue() wait_for_completion_interruptible() ffs_ep0_complete() complete() Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NDaniel Wagner <daniel.wagner@bmw-carit.de> Cc: Felipe Balbi <balbi@kernel.org> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Masahiro Yamada 提交于
The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Acked-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Masahiro Yamada 提交于
The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Masahiro Yamada 提交于
The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Joe Perches 提交于
Use the more common logging mechanism. Miscellanea: o Realign multiline statements o Coalesce format Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Juergen Gross 提交于
Let's not reimplement generic kernel helpers, instead call kasprintf(). [ felipe.balbi@linux.intel.com: better commit log ] Signed-off-by: NJuergen Gross <jgross@suse.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 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 提交于
That function is unnecessarily called from dwc3_gadget_reset_interrupt(). Gadget drivers (and thus, functions) are required to dequeue all pending requests when they get notified about a USB Bus Reset. Trying to make sure there are no pending requests only serves the purpose of working around possibly bad gadgets. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
This helper will be responsible for reading and parsing our properties. No functional changes in this patch, cleanup only. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Kernel will give us page aligned memory anyway. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
This little helper will be used to setup anything related to GCTL register. There are no functional changes, this is a cleanup only patch. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
This little helper will be used to make sure we're dealing with a valid Synopsys DWC3 or DWC3.1 core. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 John Youn 提交于
For the usb31 IP and from version 2.90a of the usb3 IP, the core supports HW exit from L1 in HS. Enable it, otherwise the controller may never exit from LPM to do a transfer. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Lu Baolu 提交于
Member @mem in struct dwc3 is not used in any places. Clean up it. Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
We should never kill the machine just because some USB endpoint type is wrong. WARN about it and move on. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
We don't need to know about short packets unless gadget driver told us it's not ok to see them on the bus. In the normal situation we can continue processing the list of requests if we get a Short packet. Also, note that we're making sure ISP is only set for OUT endpoints, where that setting is valid. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
CSP bit is only valid for OUT endpoints. Synopsys databook is unclear if HW ignores CSP for IN endpoints (chances are, it does) but to avoid problems, let's make sure to set CSP only when valid to do so. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Recent changes have turned this field obsolete. Remove it. 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>
-
由 Felipe Balbi 提交于
Cleanup only, no functional changes. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Cleanup only, no functional changes. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
We want to reduce the usage of dwc3_trace() in favor of proper tracepoints which can be enabled/disabled by the user. Let's start with our register accessors. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
We shouldn't have any glue layer which doesn't compile everywhere. In order to make sure this is always the case, make sure COMPILE_TEST is properly added at dependency list of a config entry. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
We don't need dwc3_trace() unless we're building a kernel with CONFIG_FTRACE. This patch reduces dwc3.ko text size a bit while also removing overhead of dwc3_trace() calls. text data bss dec hex filename 50796 581 0 51377 c8b1 drivers/usb/dwc3/dwc3.o 43961 581 0 44542 adfe drivers/usb/dwc3/dwc3.o.patched Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
We can offset the latency of a full Start Transfer command - where we _must_ poll for its completion - to usb_ep_enable() time. This means that once requests start showing up from the gadget driver, we can rely on No Response Update Transfer command - where we don't need to poll for completion. This patch, starts implementing this method for Bulk endpoints, even though, technically, we could extend it to all other endpoints in future commits. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
In case of periodic transfers, let's pretty print the size field as a multiplier followed by length, such as : 3x 1024 instead of: 33555456 Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Li Yang <leoli@freescale.com> Cc: <linuxppc-dev@lists.ozlabs.org> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Valentina Manea <valentina.manea.m@gmail.com> Cc: Shuah Khan <shuah@kernel.org> Cc: <linux-usb@vger.kernel.org> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-