NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bge/brg: no carrier after cable disconnect/reconnect



 Hi, all.

On 2015/01/09 4:53, Sverre Froyen wrote:

On 2015-01-07, at 15:31, Sverre Froyen <sverre%viewmark.com@localhost> wrote:


On 2015-01-06, at 21:14, Masanobu SAITOH <msaitoh%execsw.org@localhost> wrote:

Hello, Sverre.

On 2015/01/06 5:33, Sverre Froyen wrote:
Hi,

I was performing some network maintenance and noticed that after disconnecting and reconnecting bge/brgphy interfaces, the interfaces are stuck in a “no carrier” state. I’m pretty sure this used not to be case but I have no idea how long ago that was. It appears that the only way to revive a stuck interface it to reboot the computer.

Here’s some data for the computer:

NetBSD 6.1_STABLE (VM) #12: Fri Jan  2 09:32:36 MST 2015
Dell Computer Corporation PowerEdge 2650

bge0 at pci1 dev 6 function 0: Broadcom BCM5701 Gigabit Ethernet
bge0: interrupting at ioapic1 pin 12
bge0: HW config 00000019, 00000000, 00000000, 00000000 00000000
bge0: ASIC BCM5701 B5 (0x105), Ethernet address 00:06:5b:fd:79:a6
brgphy0 at bge0 phy 1: BCM5701 1000BASE-T media interface, rev. 0
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto

The interface is connected (twisted pair) to a 100Mb/s switch (also Dell).

The sources were updated 2 Jan.

ifconfig output (in the running state):

bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	capabilities=3f00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx>
	enabled=3f00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx>
	address: xx:xx:xx:xx:xx:xx
	media: Ethernet autoselect (100baseTX full-duplex,flowcontrol,rxpause,txpause)
	status: active
	inet xxx.xxx.xxx.xxx netmask 0xffffffc0 broadcast xxx.xxx.xxx.xxx
	inet6 fe80::206:5bff:fefd:79a6%bge0 prefixlen 64 scopeid 0x1

I believe this also happens with bnx/brgphy interfaces (on amd64).

Any suggestions?

It might be my fault. If the problem is caused by brgphy, one of
a way to debug is to comment out brgphy entry from your kernel
configuration file to use ukphy. Could you try it?

Thanks.


Booting a kernel without brgphy restores the expected behavior (status returns to active when cable reattached). Here’s the corresponding dmsg output:

bge0 at pci1 dev 6 function 0: Broadcom BCM5703X Gigabit Ethernet
bge0: interrupting at ioapic1 pin 12
bge0: HW config 00000115, 00000000, 00000000, 00000000 00000000
bge0: ASIC BCM5702/5703 A2 (0x1002), Ethernet address 00:0f:1f:6e:f3:2d
ukphy0 at bge0 phy 1: OUI 0x001018, model 0x0016, rev. 2
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto

(I tested this on a another computer but I verified that its brgphy behavior was the same as the one I used above.)

I also dug some old kernels out of my backups. It looks like a kernel from 2013-08-06 works OK and one from 2013-11-28 fails. Sources were cvs updated from the netbsd-6 branch on or shortly before those dates.

Another datapoint:

The problem does not exist with NetBSD 7.0_BETA (GENERIC.201501071540Z) i386.

 This change was cause by a problem that brgphy.c rev. 1.64 was not pulled up
and other changes after 1.64 were pulled up. I sent a pullup request to fix it.

 Thanks Sverre Froyen who reported it and helped debugging with me.

--
-----------------------------------------------
                SAITOH Masanobu (msaitoh%execsw.org@localhost
                                 msaitoh%netbsd.org@localhost)


Home | Main Index | Thread Index | Old Index