Page 1 of 1

WORKAROUND; intermittent disconnects with r8152 chipset USB adapters

Posted: Tue Jun 18, 2019 8:38 am
by pootle
For some of my pi Zeros I use wired ethernet through an adapter like:

https://shop.pimoroni.com/products/thre ... -connector

or

https://www.amazon.co.uk/dp/B00RM3KXAU/ ... TE_3p_dp_1

And I tend to get intermittent LAN dropouts (see dmesg printout below)

A bit of internet digging found a few things like this.

Forcing the settings via the switch seems to fix the problem.

Code: Select all

Up 	100M Full 	100M 	Disable 
And I'm now running with

Code: Select all

sudo ethtool -s eth0 speed 100 duplex full
called at boot, which is looking good too.

Here's the tail of dmesg:

Code: Select all

[   12.414591] Indeed it is in host mode hprt0 = 00001101
[   12.476538] usbcore: registered new interface driver r8152
[   12.587259] usbcore: registered new interface driver cdc_ether
[   12.883135] usb 1-1: reset high-speed USB device number 2 using dwc_otg
[   12.883388] Indeed it is in host mode hprt0 = 00001101
[   13.480749] r8152 1-1:1.0 eth0: v1.09.9
[   20.959417] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   20.979459] r8152 1-1:1.0 eth0: carrier on
[   20.980386] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   31.264073] NFSD: starting 90-second grace period (net c09c0a48)
[   33.741130] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[  125.855442] r8152 1-1:1.0 eth0: carrier off
[  128.564423] r8152 1-1:1.0 eth0: carrier on
[  130.396088] r8152 1-1:1.0 eth0: carrier off
[  133.107800] r8152 1-1:1.0 eth0: carrier on
[  148.125673] r8152 1-1:1.0 eth0: carrier off
[  150.963953] r8152 1-1:1.0 eth0: carrier on
[  180.763941] r8152 1-1:1.0 eth0: carrier off
[  183.443757] r8152 1-1:1.0 eth0: carrier on
[  239.532457] r8152 1-1:1.0 eth0: carrier off
[  242.243468] r8152 1-1:1.0 eth0: carrier on
[  263.402947] r8152 1-1:1.0 eth0: carrier off
[  266.148464] r8152 1-1:1.0 eth0: carrier on
[  292.571964] r8152 1-1:1.0 eth0: carrier off
[  295.316019] r8152 1-1:1.0 eth0: carrier on
[  464.971218] r8152 1-1:1.0 eth0: carrier off
[  467.620986] r8152 1-1:1.0 eth0: carrier on
[  493.640408] r8152 1-1:1.0 eth0: carrier off
[  496.389015] r8152 1-1:1.0 eth0: carrier on
[  556.940630] r8152 1-1:1.0 eth0: carrier off
[  559.621019] r8152 1-1:1.0 eth0: carrier on
[  582.430421] r8152 1-1:1.0 eth0: carrier off
[  585.141319] r8152 1-1:1.0 eth0: carrier on
[  592.449589] r8152 1-1:1.0 eth0: carrier off
[  595.125173] r8152 1-1:1.0 eth0: carrier on
[  672.599874] r8152 1-1:1.0 eth0: carrier off
[  675.317558] r8152 1-1:1.0 eth0: carrier on
[  691.839778] r8152 1-1:1.0 eth0: carrier off
[  694.485376] r8152 1-1:1.0 eth0: carrier on
[  815.260746] r8152 1-1:1.0 eth0: carrier off
[  817.909581] r8152 1-1:1.0 eth0: carrier on
[  824.827891] r8152 1-1:1.0 eth0: carrier off
[  826.965802] r8152 1-1:1.0 eth0: carrier on