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: John Youn <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Member @mem in struct dwc3 is not used in any places. Clean up it.
Signed-off-by: Lu Baolu <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
We should never kill the machine just because some
USB endpoint type is wrong. WARN about it and move
on.
Signed-off-by: Felipe Balbi <[email protected]>
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: Felipe Balbi <[email protected]>
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: Felipe Balbi <[email protected]>
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 <[email protected]>
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: Felipe Balbi <[email protected]>
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: Felipe Balbi <[email protected]>
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: Felipe Balbi <[email protected]>
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: Felipe Balbi <[email protected]>
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: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Cc: Li Yang <[email protected]>
Cc: <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Cc: Valentina Manea <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Cc: Alan Stern <[email protected]>
Cc: <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Cc: Ashwini Pahuja <[email protected]>
Cc: <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Acked-by: Nicolas Ferre <[email protected]>
Cc: <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove this macro
from the driver.
Cc: Alan Stern <[email protected]>
Cc: <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Cc: Greg Kroah-Hartman <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Cc: Greg Kroah-Hartman <[email protected]>
Cc: <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Cc: Peter Chen <[email protected]>
Cc: <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
usb_endpoint_maxp() is now returning maxpacket
correctly - iow only bits 10:0. We can finaly remove
XHCI's private GET_MAX_PACKET macro.
Signed-off-by: Felipe Balbi <[email protected]>
We have introduced a helper to calculate multiplier
value from wMaxPacketSize. Start using it.
Cc: Bin Liu <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
We have introduced a helper to calculate multiplier
value from wMaxPacketSize. Start using it.
Cc: Mathias Nyman <[email protected]>
Cc: <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
We have introduced a helper to calculate multiplier
value from wMaxPacketSize. Start using it.
Cc: Ashwini Pahuja <[email protected]>
Cc: <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
We have introduced a helper to calculate multiplier
value from wMaxPacketSize. Start using it.
Acked-by: Nicolas Ferre <[email protected]>
Cc: <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
We have introduced a helper to calculate multiplier
value from wMaxPacketSize. Start using it.
Acked-by: Peter Chen <[email protected]>
Cc: <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
According to Dave Miller "the networking stack has a
hard requirement that all SKBs which are transmitted
must have their completion signalled in a fininte
amount of time. This is because, until the SKB is
freed by the driver, it holds onto socket,
netfilter, and other subsystem resources."
In summary, this means that using TX IRQ throttling
for the networking gadgets is, at least, complex and
we should avoid it for the time being.
Cc: <[email protected]>
Reported-by: Ville Syrjälä <[email protected]>
Tested-by: Ville Syrjälä <[email protected]>
Suggested-by: David Miller <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
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 <[email protected]>
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 <[email protected]>
DWC3 can tell us which phase of a setup transfer
we're getting into. Let's decode it from the event
to make it easier to debug.
Signed-off-by: Felipe Balbi <[email protected]>
Link State Change events are only needed for
debugging and to apply certain workarounds on known
errata. Let's save a few cycles by disabling these
events completely on working revisions of the core.
Signed-off-by: Felipe Balbi <[email protected]>