mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] usbnet: increase bulk message timeout
@ 2018-04-26 13:02 Nikita Yushchenko
  2018-05-02 10:15 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Nikita Yushchenko @ 2018-04-26 13:02 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Nikita Yushchenko, Andrew Lunn, Chris Healy, barebox

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] usbnet: increase bulk message timeout
  2018-04-26 13:02 [PATCH] usbnet: increase bulk message timeout Nikita Yushchenko
@ 2018-05-02 10:15 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2018-05-02 10:15 UTC (permalink / raw)
  To: Nikita Yushchenko; +Cc: Andrew Lunn, Chris Healy, barebox

On Thu, Apr 26, 2018 at 04:02:48PM +0300, Nikita Yushchenko wrote:
> 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>
> ---

Applied, thanks.

The patch is whitespace damaged, I fixed this up manually this time.

Sascha

>  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
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-02 10:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-26 13:02 [PATCH] usbnet: increase bulk message timeout Nikita Yushchenko
2018-05-02 10:15 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox