Bug 5078
Summary: | r8169: eth0: PHY reset until link up | ||
---|---|---|---|
Product: | Drivers | Reporter: | Faris Xiao (atzlinux) |
Component: | Network | Assignee: | Francois Romieu (romieu) |
Status: | CLOSED PATCH_ALREADY_AVAILABLE | ||
Severity: | low | ||
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.12.5 | Subsystem: | |
Regression: | --- | Bisected commit-id: |
Description
Faris Xiao
2005-08-17 02:19:08 UTC
- does the driver finally negotiate the link ? - what happens if you do not specify a media option ? - Debian Sarges uses gcc-3.3 or above, right ? -- Ueimor - does the driver finally negotiate the link ? O! God save me! I don't open the switch's power.Sorry! When I turn on the power of the switch,the dmesg output is: r8169: eth1: PHY reset until link up r8169: eth1: PHY reset until link up r8169: eth1: PHY reset until link up r8169: eth1: PHY reset until link up r8169: eth1: PHY reset until link up r8169: eth1: link up The following is the output of ethtool: # ethtool eth1 Settings for eth1: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: Twisted Pair PHYAD: 0 Transceiver: internal Auto-negotiation: on Link detected: yes when I turn off the power of the switch again,there is not more dmesg output. I don't get the any "r8169: eth1: PHY reset until link up" again. I think,it should be not always output "r8169: eth1: PHY reset until link up" when the power of the switch turn off before the computer boot,isn't it? - what happens if you do not specify a media option ? If I am not specify the media option in /etc/modules, The string "r8169: eth0: PHY reset until link up" still output when I turn off the switch power before my computer boot. - Debian Sarges uses gcc-3.3 or above, right ? yes,Debian Sarges uses 3.3.5. debian:~# gcc -v Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,jc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/inf--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atet --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=u --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gi486-linux Thread model: posix gcc version 3.3.5 (Debian 1:3.3.5-13) > When I turn on the power of the switch,the dmesg output is: > r8169: eth1: PHY reset until link up [...] > r8169: eth1: PHY reset until link up > r8169: eth1: link up > > The following is the output of ethtool: [snip] Ok, everything works. [...] > when I turn off the power of the switch again,there is not more dmesg output. > I don't get the any "r8169: eth1: PHY reset until link up" again. > > I think,it should be not always output "r8169: eth1: PHY reset until link up" > when the power of the switch turn off before the computer boot,isn't it? You can control the displayed message via the "msglvl" option of ethtool, see include/linux/netdevice.h: [...] enum { NETIF_MSG_DRV = 0x0001, NETIF_MSG_PROBE = 0x0002, NETIF_MSG_LINK = 0x0004, NETIF_MSG_TIMER = 0x0008, NETIF_MSG_IFDOWN = 0x0010, NETIF_MSG_IFUP = 0x0020, NETIF_MSG_RX_ERR = 0x0040, NETIF_MSG_TX_ERR = 0x0080, NETIF_MSG_TX_QUEUED = 0x0100, NETIF_MSG_INTR = 0x0200, NETIF_MSG_TX_DONE = 0x0400, NETIF_MSG_RX_STATUS = 0x0800, NETIF_MSG_PKTDATA = 0x1000, NETIF_MSG_HW = 0x2000, NETIF_MSG_WOL = 0x4000, }; -> you can pass the same value via the "debug" option of the module. > - what happens if you do not specify a media option ? > If I am not specify the media option in /etc/modules, > The string "r8169: eth0: PHY reset until link up" still output when > I turn off the switch power before my computer boot. Ok. I assume that the link ends established the same, does it not ? [...] > yes,Debian Sarges uses 3.3.5. Fine. Slow but safe. -- Ueimor Sorry,I just a normal linux user.I can't understand the source code. You said "You can control the displayed message via the "msglvl" option of ethtool",I man ethtool,I know that I should use "ethtool -s ethX msglvl N",but I don't know which digital I should set. When I use command: debian:~# ethtool -s eth1 msglvl 8 Cannot set new msglvl: Operation not supported Why Operation not supported? -> you can pass the same value via the "debug" option of the module. Could you tell how to do it more detail?Thank you! I recompiled the r8169.ko use EXTRA_CFLAGS += -DRTL8169_DEBUG obj-m += r8169.o in the Makefile. The following is the output: r8169 Gigabit Ethernet driver 2.2LK loaded ACPI: PCI Interrupt 0000:02:09.0[A] -> GSI 20 (level, low) -> IRQ 20 r8169: mac_version == RTL_GIGA_MAC_VER_E (0002) r8169: phy_version == RTL_GIGA_PHY_VER_E (0000) eth1: Identified chip type is 'RTL8169s/8110s'. eth1: RTL8169 at 0xe09b8000, 00:0f:ea:0b:85:04, IRQ 20 r8169: mac_version == RTL_GIGA_MAC_VER_E (0002) r8169: phy_version == RTL_GIGA_PHY_VER_E (0000) r8169: MAC version != 0 && PHY version == 0 or 1 r8169: Do final_reg2.cfg r8169: Set MAC Reg C+CR Offset 0x82h = 0x01h r8169: <6>r8169: Set MAC Reg C+CR Offset 0xE0. Bit-3 and bit-14 MUST be 1 r8169: eth1: PHY reset until link up r8169: eth1: PHY reset until link up r8169: eth1: PHY reset until link up r8169: eth1: PHY reset until link up r8169: eth1: PHY reset until link up > debian:~# ethtool -s eth1 msglvl 8 > Cannot set new msglvl: Operation not supported My bad. The msglvl feature for the r8169 has been added in the 2.6.12 -> 2.6.13 cycle. Since 2.6.12.5 includes post 2.6.12 bugfixes only, you do not have the feature. [...] > I know that I should use > "ethtool -s ethX msglvl N", but I don't know which digital I should set. The driver tries to follow the NETIF_MSG_XXX. Say I want to suppress the link up messages as in: [ 899.671755] r8169: eth1: link up -> it is controlled by netif_msg_ifup and NETIF_MSG_IFUP = 0x0020, Whence: $ modprobe r8169 $ ethtool -s eth1 msglvl 0xffdf The phy reset message is controlled by netif_msg_link/NETIF_MSG_LINK/0x0004. ["debug" option of the module] > Could you tell how to do it more detail? Thank you! You give it the expected value like any usual kernel option. You can check the result/difference with ethtool. -- Ueimor |