aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/debug.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-03usb: dwc3: debug: Print GET_STATUS(device) tracepointThinh Nguyen1-0/+3
DWC3 is missing the printing of control request GET_STATUS(device) tracepoint. This patch prints that. Signed-off-by: Thinh Nguyen <thinhn@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2019-02-05usb: dwc3: debug: purge usage of strcatFelipe Balbi1-5/+9
Now that buffer size is always passed around, we don't need to rely on strcat anymore. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2019-02-04usb: dwc3: trace: pass trace buffer size to decoding functionsFelipe Balbi1-66/+76
Instead of assuming that our buffer is big enough, let's pass the buffer size around so printing functions can make sure they won't overflow the buffer. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2018-11-26usb: dwc3: debugfs: Properly print/set link state for HSThinh Nguyen1-0/+29
Highspeed device and below has different state names than superspeed and higher. Add proper checks and printouts of link states for highspeed and below. Signed-off-by: Thinh Nguyen <thinhn@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2018-05-21usb: dwc3: debug: decode uFrame from event tooFelipe Balbi1-3/+7
XferNotReady and XferInProgress give us the uFrame number we're currently in. Printing that out on tracepoints may help us find bugs in transfer scheduling. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2018-05-21usb: dwc3: trace: print out event status tooFelipe Balbi1-4/+16
This will make it easier to figure out the reason for the event. That information really helps debugging certain problems. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-12-11usb: dwc3: debug: decode a few more featuresFelipe Balbi1-0/+9
We were missing U1, U2 and LTM Enable features. Let's decode them. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-11-07USB: dwc3: Remove redundant license textGreg Kroah-Hartman1-9/+0
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: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-04USB: add SPDX identifiers to all remaining files in drivers/usb/Greg Kroah-Hartman1-0/+1
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-02usb: dwc3: trace: decode ctrl requestFelipe Balbi1-0/+234
Instead of *always* dumping raw ctrl bytes, let's decode standard requests which will make the lives of those debugging DWC3 quite a bit easier. Output will now look like so: irq/34-dwc3-1594 [000] d..1 107.573081: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 107.573694: dwc3_ctrl_req: Set Address(Addr = 01) irq/34-dwc3-1594 [000] d..1 107.588319: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 107.588816: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9) irq/34-dwc3-1594 [000] d..1 107.589191: dwc3_ctrl_req: Set Configuration(Config = 3) irq/34-dwc3-1594 [000] d..1 107.589846: dwc3_ctrl_req: Get BOS Descriptor(Index = 0, Length = 5) irq/34-dwc3-1594 [000] d..1 107.590146: dwc3_ctrl_req: Get BOS Descriptor(Index = 0, Length = 22) irq/34-dwc3-1594 [000] d..1 107.590546: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9) irq/34-dwc3-1594 [000] d..1 107.590840: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 69) irq/34-dwc3-1594 [000] d..1 107.591138: dwc3_ctrl_req: Get Configuration Descriptor(Index = 1, Length = 9) irq/34-dwc3-1594 [000] d..1 107.591541: dwc3_ctrl_req: Get Configuration Descriptor(Index = 1, Length = 32) irq/34-dwc3-1594 [000] d..1 107.591834: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.701005: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.721080: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.722709: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.728979: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.730544: dwc3_ctrl_req: Get Device Qualifier Descriptor(Index = 0, Length = 10) irq/34-dwc3-1594 [000] d..1 115.776018: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9) irq/34-dwc3-1594 [000] d..1 115.776760: dwc3_ctrl_req: Set Configuration(Config = 0) irq/34-dwc3-1594 [000] d..1 115.777676: dwc3_ctrl_req: Get Configuration(Length = 1) irq/34-dwc3-1594 [000] d..1 115.924797: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 115.929025: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500) irq/34-dwc3-1594 [000] d..1 115.929566: dwc3_ctrl_req: Get String Descriptor(Index = 1, Length = 500) irq/34-dwc3-1594 [000] d..1 115.930911: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500) irq/34-dwc3-1594 [000] d..1 115.931528: dwc3_ctrl_req: Get String Descriptor(Index = 2, Length = 500) irq/34-dwc3-1594 [000] d..1 115.932950: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500) irq/34-dwc3-1594 [000] d..1 115.933533: dwc3_ctrl_req: Get String Descriptor(Index = 3, Length = 500) Note that Class and Vendor requests won't be decoded for obvious reasons. Those will be printed as a raw sequence of bytes. This patch has been tested against a normal host (both Linux and Windows) and USB30CV Chapter 9 tests. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-06-02usb: dwc3: debug: remove static char buffer from dwc3_decode_event()Felipe Balbi1-7/+6
Instead, we can require caller to pass a buffer for the function to use. This cleans things quite a bit. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-04-11usb: dwc3: expose dwc3_trb_type_string()Felipe Balbi1-0/+28
That helper can be used from our tracepoint interface with very minor edits. Let's do so. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-08usb: dwc3: trace: purge dwc3_trace()Felipe Balbi1-7/+0
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>
2016-11-03usb: dwc3: don't compile dwc3_trace() unless CONFIG_FTRACE=yFelipe Balbi1-0/+6
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 <felipe.balbi@linux.intel.com>
2016-10-31usb: dwc3: trace: print out ep0state also from XferCompleteFelipe Balbi1-3/+8
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>
2016-10-31usb: dwc3: debug: move dwc3_ep0_state_string() to debug.hFelipe Balbi1-0/+16
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>
2016-10-31usb: dwc3: debug: decode control endpoint phase tooFelipe Balbi1-0/+13
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 <felipe.balbi@linux.intel.com>
2016-08-25usb: dwc3: debug: fix ep name on trace outputFelipe Balbi1-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>
2016-06-20usb: dwc3: gadget: improve gcmd traceFelipe Balbi1-0/+14
Just like we did for endpoint commands, let's have a single trace output for the command and its status. This will improve trace readability Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20usb: dwc3: trace: print ep cmd status with a single traceFelipe Balbi1-0/+16
Instead of printing command's status with a separate trace printout, let's print it within a single call. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-20usb: dwc3: trace: fully decode IRQ eventsFelipe Balbi1-22/+88
This will make it more human-friendly to read trace output from dwc3. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-04-19usb: dwc3: make dwc3_debugfs_init return value be voidDu, Changbin1-3/+3
Debugfs init failure is not so important. We can continue our job on this failure. Also no break need for debugfs_create_file call failure. Signed-off-by: Du, Changbin <changbin.du@intel.com> [felipe.balbi@linux.intel.com : - remove out-of-memory message, we get that from OOM. - switch dev_err() to dev_dbg() ] Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2014-09-05usb: dwc3: add tracepoints to aid debuggingFelipe Balbi1-0/+2
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>
2014-09-05usb: dwc3: debug: add dwc3_gadget_event_type_stringFelipe Balbi1-0/+34
this new helper will return a pretty string for DWC3 Gadget Events. Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-09-05usb: dwc3: move all string helper functions to debug.hFelipe Balbi1-1/+163
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>
2013-07-29usb: dwc3: switch to GPL v2 onlyFelipe Balbi1-27/+7
This is a Linux-only driver which makes use of GPL-only symbols. It makes no sense to maintain Dual BSD/GPL licensing for this driver. Considering that the amount of work to use this driver in any different operating system would likely be as large as developing the driver from scratch and considering that we depend on GPL-only symbols, we will switch over to a GPL v2-only license. Cc: Anton Tikhomirov <av.tikhomirov@samsung.com> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-10-04usb: dwc: remove "All rights reserved" statement.Sebastian Andrzej Siewior1-1/+0
Some people think that this line is not compatible with the GPL. The statement was required due to the Buenos Aires Convention and is now deprecated. I remove it because it is said that it is pointless nowdays. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-22usb: Introduce DesignWare USB3 DRD DriverFelipe Balbi1-0/+51
The DesignWare USB3 is a highly configurable IP Core which can be instantiated as Dual-Role Device (DRD), Peripheral Only and Host Only (XHCI) configurations. Several other parameters can be configured like amount of FIFO space, amount of TX and RX endpoints, amount of Host Interrupters, etc. The current driver has been validated with a virtual model of version 1.73a of that core and with an FPGA burned with version 1.83a of the DRD core. We have support for PCIe bus, which is used on FPGA prototyping, and for the OMAP5, more adaptation (or glue) layers can be easily added and the driver is half prepared to handle any possible configuration the HW engineer has chosen considering we have the information on one of the GHWPARAMS registers to do runtime checking of certain features. More runtime checks can, and should, be added in order to make this driver even more flexible with regards to number of endpoints, FIFO sizes, transfer types, etc. While this supports only the device side, for now, we will add support for Host side (xHCI - see the updated series Sebastian has sent [1]) and OTG after we have it all stabilized. [1] http://marc.info/?l=linux-usb&m=131341992020339&w=2 Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>