summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorMian Yousaf Kaukab <yousaf.kaukab@intel.com>2015-01-30 09:09:34 +0100
committerFelipe Balbi <balbi@ti.com>2015-01-30 10:33:39 -0600
commitccb34a9101b340885b1ca3ec766e8544a6a433a7 (patch)
tree4e1231e4aa5e8ecd350b41c914e9bed0e4aac3fc /drivers/usb
parent86e37bf9f5d7f1e634ba5ca6bbc02aa85d004d2f (diff)
downloadtalos-obmc-linux-ccb34a9101b340885b1ca3ec766e8544a6a433a7.tar.gz
talos-obmc-linux-ccb34a9101b340885b1ca3ec766e8544a6a433a7.zip
usb: dwc2: gadget: fix debug message for zlp
Print debug message according to zlp direction. Always saying "Sending" is misleading. Tested-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc2/gadget.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 50903003f4d9..38ba0221482e 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -1335,7 +1335,12 @@ static void s3c_hsotg_program_zlp(struct dwc2_hsotg *hsotg,
u32 epctl_reg = hs_ep->dir_in ? DIEPCTL(index) : DOEPCTL(index);
u32 epsiz_reg = hs_ep->dir_in ? DIEPTSIZ(index) : DOEPTSIZ(index);
- dev_dbg(hsotg->dev, "Sending zero-length packet on ep%d\n", index);
+ if (hs_ep->dir_in)
+ dev_dbg(hsotg->dev, "Sending zero-length packet on ep%d\n",
+ index);
+ else
+ dev_dbg(hsotg->dev, "Receiving zero-length packet on ep%d\n",
+ index);
writel(DXEPTSIZ_MC(1) | DXEPTSIZ_PKTCNT(1) |
DXEPTSIZ_XFERSIZE(0), hsotg->regs +
OpenPOWER on IntegriCloud