usb: s3c-otg: Fix remaining bytes in debug messages
authorRoger Quadros <rogerq@ti.com>
Fri, 22 Apr 2016 09:02:06 +0000 (11:02 +0200)
committerMarek Vasut <marex@denx.de>
Mon, 25 Apr 2016 15:56:30 +0000 (17:56 +0200)
Remaining bytes means bytes that are not yet transferred
and not the bytes that were transferred in the last transfer.

Reported-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Tested-by: Steve Rae <srae@broadcom.com>
[Test HW: bcm28155_ap board]

drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c

index 9aa0f338104900291048fc5ba35e33c4b85da612..12f5c85c310e09cd3750f1bdd26f63c84270c66d 100644 (file)
@@ -235,7 +235,7 @@ static void complete_rx(struct dwc2_udc *dev, u8 ep_num)
                   "%s: RX DMA done : ep = %d, rx bytes = %d/%d, "
                   "is_short = %d, DOEPTSIZ = 0x%x, remained bytes = %d\n",
                   __func__, ep_num, req->req.actual, req->req.length,
-                  is_short, ep_tsr, xfer_size);
+                  is_short, ep_tsr, req->req.length - req->req.actual);
 
        if (is_short || req->req.actual == req->req.length) {
                if (ep_num == EP0_CON && dev->ep0state == DATA_STATE_RECV) {
@@ -292,7 +292,7 @@ static void complete_tx(struct dwc2_udc *dev, u8 ep_num)
                "%s: TX DMA done : ep = %d, tx bytes = %d/%d, "
                "is_short = %d, DIEPTSIZ = 0x%x, remained bytes = %d\n",
                __func__, ep_num, req->req.actual, req->req.length,
-               is_short, ep_tsr, xfer_size);
+               is_short, ep_tsr, req->req.length - req->req.actual);
 
        if (ep_num == 0) {
                if (dev->ep0state == DATA_STATE_XMIT) {