mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
To: Sascha Hauer <sha@pengutronix.de>
Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>,
	Andrew Lunn <andrew@lunn.ch>, Chris Healy <cphealy@gmail.com>,
	barebox@lists.infradead.org
Subject: [PATCH] usbnet: increase bulk message timeout
Date: Thu, 26 Apr 2018 16:02:48 +0300	[thread overview]
Message-ID: <216a62f9-5450-5ed6-945f-b3d26d65ae3e@cogentembedded.com> (raw)

Timeout of 1ms is too low for case when device operates in Full Speed
mode. This causes most incoming frames to be lost.

Since timeout is only used to get out of polling loop in case of no
response from hardware, increasing it should be safe for all platforms.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Tested-By: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/usb/usbnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 33d900b70..60e67ff1a 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -125,7 +125,7 @@ static int usbnet_recv(struct eth_device *edev)
  	len = dev->rx_urb_size;
 -	ret = usb_bulk_msg(dev->udev, dev->in, rx_buf, len, &alen, 1);
+	ret = usb_bulk_msg(dev->udev, dev->in, rx_buf, len, &alen, 100);
 	if (ret)
 		return ret;
 -- 2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2018-04-26 13:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26 13:02 Nikita Yushchenko [this message]
2018-05-02 10:15 ` Sascha Hauer

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=216a62f9-5450-5ed6-945f-b3d26d65ae3e@cogentembedded.com \
    --to=nikita.yoush@cogentembedded.com \
    --cc=andrew@lunn.ch \
    --cc=barebox@lists.infradead.org \
    --cc=cphealy@gmail.com \
    --cc=sha@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox