diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-05-23 14:02:33 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-06-20 12:32:40 +0300 |
commit | 0933df159c5c82f97c6bb811b149fa1158a26087 (patch) | |
tree | 4961d2b608d9804c972167909adbb78cde3f9d11 /drivers/usb/dwc3/debug.h | |
parent | f6bb225bb3ca7988ff373c62cc298e56cae1eee5 (diff) | |
download | linux-0933df159c5c82f97c6bb811b149fa1158a26087.tar.xz |
usb: dwc3: trace: print ep cmd status with a single trace
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>
Diffstat (limited to 'drivers/usb/dwc3/debug.h')
-rw-r--r-- | drivers/usb/dwc3/debug.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/debug.h b/drivers/usb/dwc3/debug.h index e3e0b4111c53..8eed4c7cc76b 100644 --- a/drivers/usb/dwc3/debug.h +++ b/drivers/usb/dwc3/debug.h @@ -280,6 +280,22 @@ static inline const char *dwc3_decode_event(u32 event) return dwc3_ep_event_string(&evt.depevt); } +static inline const char *dwc3_ep_cmd_status_string(int status) +{ + switch (status) { + case -ETIMEDOUT: + return "Timed Out"; + case 0: + return "Successful"; + case DEPEVT_TRANSFER_NO_RESOURCE: + return "No Resource"; + case DEPEVT_TRANSFER_BUS_EXPIRY: + return "Bus Expiry"; + default: + return "UNKNOWN"; + } +} + void dwc3_trace(void (*trace)(struct va_format *), const char *fmt, ...); #ifdef CONFIG_DEBUG_FS |