[BUG] igb: reconnecting of cable not always detected

From: Thomas Netousek
Date: Sat Jun 09 2018 - 13:31:13 EST


I have a similar problem.
If I disconnect and reconnect the ethernet cable on a Intel Ethernet
card then the device does not come up again.

For me this problem happens on the first pull of the LAN cable all the time.

It is reproducible on Supermicro X8, X9 and X10 dual CPU mainboards with
onboard networking providing two PHY interfaces using Intel 82576 and
I350 chips.
It is not reproducible on a Supermicro X10SLL single mainboard with
onboard I210 chip providing one PHY for eth0 (tested) and one
I217-LM powered by the e1000e driver (not connected, not tested).

It is reproducible using kernel 4.9.107 and 4.17.0.
It is not reproducible using kernels 4.1.48, 4.4.136.
So it might be related to the changes in the igb versions from 5.3.0-k
(good) to 5.4.0-k (bad).

After pulling and re-plugging the cable, with the bad driver I get:

# ip -d link show eth0
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state
DOWN mode DEFAULT group default qlen 1000
ÂÂÂ link/ether 0c:c4:7a:69:9d:3e brd ff:ff:ff:ff:ff:ff promiscuity 0
numtxqueues 8 numrxqueues 8 gso_max_size 65536 gso_max_segs 65535

# ethtool -i eth0ÂÂÂÂ
Cannot get driver information: No such device

The last lines in the dmesg output are:

[ÂÂ 13.127730] igb 0000:01:00.0 eth0: igb: eth0 NIC Link is Up 1000 Mbps
Full Duplex, Flow Control: RX/TX
[ÂÂ 13.747735] igb 0000:01:00.1 eth1: igb: eth1 NIC Link is Up 1000 Mbps
Full Duplex, Flow Control: RX/TX
[Â 147.760943] igb 0000:01:00.0 eth0: igb: eth0 NIC Link is Down
[Â 608.211864] igb 0000:01:00.0 eth0: PCIe link lost, device now detached

Please note that the "PCIe link lost" message arrives 8 minutes after
re-plugging the LAN cable.

I hope that information helps pinning down this bug and fixing it.

Kind regards
Thomas