All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: Paul Zimmerman <Paul.Zimmerman@synopsys.com>,
	Felipe Balbi <balbi@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Nick Hudson <skrll@netbsd.org>,
	linux-usb@vger.kernel.org,
	Minas Harutyunyan <hminas@synopsys.com>
Cc: linux@roeck-us.net, dianders@chromium.org,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] usb: dwc2: Make "trimming xfer length" a debug message
Date: Wed, 13 Jan 2021 12:20:51 +0100	[thread overview]
Message-ID: <20210113112052.17063-4-nsaenzjulienne@suse.de> (raw)
In-Reply-To: <20210113112052.17063-1-nsaenzjulienne@suse.de>

From: Guenter Roeck <linux@roeck-us.net>

With some USB network adapters, such as DM96xx, the following message
is seen for each maximum size receive packet.

dwc2 ff540000.usb: dwc2_update_urb_state(): trimming xfer length

This happens because the packet size requested by the driver is 1522
bytes, wMaxPacketSize is 64, the dwc2 driver configures the chip to
receive 24*64 = 1536 bytes, and the chip does indeed send more than
1522 bytes of data. Since the event does not indicate an error condition,
the message is just noise. Demote it to debug level.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Fixes: 7359d482eb4d3 ("staging: HCD files for the DWC2 driver")
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
---
 drivers/usb/dwc2/hcd_intr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc2/hcd_intr.c b/drivers/usb/dwc2/hcd_intr.c
index 12819e019e13..d5f4ec1b73b1 100644
--- a/drivers/usb/dwc2/hcd_intr.c
+++ b/drivers/usb/dwc2/hcd_intr.c
@@ -500,7 +500,7 @@ static int dwc2_update_urb_state(struct dwc2_hsotg *hsotg,
 						      &short_read);
 
 	if (urb->actual_length + xfer_length > urb->length) {
-		dev_warn(hsotg->dev, "%s(): trimming xfer length\n", __func__);
+		dev_dbg(hsotg->dev, "%s(): trimming xfer length\n", __func__);
 		xfer_length = urb->length - urb->actual_length;
 	}
 
-- 
2.29.2


  parent reply	other threads:[~2021-01-13 11:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 11:20 [PATCH 0/3] usb: dwc2: Fixes and improvements Nicolas Saenz Julienne
2021-01-13 11:20 ` [PATCH 1/3] usb: dwc2: Do not update data length if it is 0 on inbound transfers Nicolas Saenz Julienne
2021-01-13 11:20 ` [PATCH 2/3] usb: dwc2: Abort transaction after errors with unknown reason Nicolas Saenz Julienne
2021-01-13 11:20 ` Nicolas Saenz Julienne [this message]
2021-01-13 23:20 ` [PATCH 0/3] usb: dwc2: Fixes and improvements Doug Anderson
2021-01-14  3:07   ` Guenter Roeck
2021-01-14  9:26     ` Nicolas Saenz Julienne
2021-01-14 16:29       ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210113112052.17063-4-nsaenzjulienne@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=Paul.Zimmerman@synopsys.com \
    --cc=balbi@ti.com \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hminas@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=skrll@netbsd.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.