Bug 14069 - r8169 driver doesn't work at 1000 Mb/s
Summary: r8169 driver doesn't work at 1000 Mb/s
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Francois Romieu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-26 20:55 UTC by rodolphe
Modified: 2012-06-13 15:40 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.30
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Phy parameters from version 8.023.00 of Realtek's driver (1.25 KB, patch)
2011-06-21 12:24 UTC, Francois Romieu
Details | Diff

Description rodolphe 2009-08-26 20:55:59 UTC
I can set the speed with ethtool at 10 Mb/s or 100 Mb/s but not at 1000 Mb/s :

detritus:~% sudo ethtool -s eth0 speed 1000 autoneg off
detritus:~% sudo ethtool eth0
Settings for eth0:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Supports auto-negotiation: Yes
	Advertised link modes:  1000baseT/Half 1000baseT/Full 
	Advertised auto-negotiation: Yes
	Speed: 1000Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: pumbg
	Wake-on: g
	Current message level: 0x00000033 (51)
	Link detected: no

detritus:~% sudo lspci -vvv
[…]
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
	Subsystem: ASUSTeK Computer Inc. P5B
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 25
	Region 0: I/O ports at ee00 [size=256]
	Region 2: Memory at fdfff000 (64-bit, non-prefetchable) [size=4K]
	[virtual] Expansion ROM at fdc00000 [disabled] [size=128K]
	Capabilities: [40] Power Management version 2
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1+,D2+,D3hot+,D3cold+)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [48] Vital Product Data
		Unknown small resource type 00, will not decode more.
	Capabilities: [50] MSI: Enable+ Count=1/2 Maskable- 64bit+
		Address: 00000000fee0300c  Data: 4159
	Capabilities: [60] Express (v1) Endpoint, MSI 00
		DevCap:	MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <1us, L1 unlimited
			ExtTag+ AttnBtn+ AttnInd+ PwrInd+ RBE- FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 4096 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
			ClockPM- Surprise- LLActRep- BwNot-
		LnkCtl:	ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
	Capabilities: [84] Vendor Specific Information <?>
	Capabilities: [100] Advanced Error Reporting
		UESta:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UEMsk:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UESvrt:	DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
		CESta:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
		AERCap:	First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
	Capabilities: [12c] Virtual Channel <?>
	Capabilities: [148] Device Serial Number 1a-00-00-00-10-ec-81-68
	Capabilities: [154] Power Budgeting <?>
	Kernel driver in use: r8169
[…]

detritus:~% sudo modinfo r8169                                                                        Err 1
filename:       /lib/modules/2.6.30-1-amd64/kernel/drivers/net/r8169.ko
version:        2.3LK-NAPI
license:        GPL
description:    RealTek RTL-8169 Gigabit Ethernet driver
author:         Realtek and the Linux r8169 crew <netdev@vger.kernel.org>
srcversion:     C47A8AADF43294F4B95E0A8
alias:          pci:v00000001d00008168sv*sd00002410bc*sc*i*
alias:          pci:v00001737d00001032sv*sd00000024bc*sc*i*
alias:          pci:v000016ECd00000116sv*sd*bc*sc*i*
alias:          pci:v00001259d0000C107sv*sd*bc*sc*i*
alias:          pci:v00001186d00004300sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008169sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008168sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008167sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008136sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008129sv*sd*bc*sc*i*
depends:        mii
vermagic:       2.6.30-1-amd64 SMP mod_unload modversions 
parm:           rx_copybreak:Copy breakpoint for copy-only-tiny-frames (int)
parm:           use_dac:Enable PCI DAC. Unsafe on 32 bit PCI slot. (int)
parm:           debug:Debug verbosity level (0=none, ..., 16=all) (int)

Let me know if you need more infos (in fact i have no idea of what is usefull :) )
Comment 1 Zenith88 2011-06-03 16:25:40 UTC
Same problem here!
Any chance the solution can be expedited to this problem affecting the most widespread onboard chipset since at least 2006, please?
This very chip can pump up to 100 MB/s under XP/Win7 with 7kb MTU.

Please!!!

$ sudo ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Half 1000baseT/Full 
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Half 1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Link partner advertised link modes:  10baseT/Half 10baseT/Full 
                                             100baseT/Half 100baseT/Full 
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes

$ sudo ethtool -s eth0 speed 1000 autoneg off
Cannot set new settings: Invalid argument
  not setting speed
  not setting autoneg

$ sudo modinfo r8169
filename:       /lib/modules/2.6.35.13/kernel/drivers/net/r8169.ko
version:        2.3LK-NAPI                                                                                                                                     
license: GPL
  
description:    RealTek RTL-8169 Gigabit Ethernet driver
author:         Realtek and the Linux r8169 crew <netdev@vger.kernel.org>
srcversion:     F4271B31294C4EB0D82840D
alias:          pci:v00000001d00008168sv*sd00002410bc*sc*i*
alias:          pci:v00001737d00001032sv*sd00000024bc*sc*i*
alias:          pci:v000016ECd00000116sv*sd*bc*sc*i*
alias:          pci:v00001259d0000C107sv*sd*bc*sc*i*
alias:          pci:v00001186d00004300sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008169sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008168sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008167sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008136sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008129sv*sd*bc*sc*i*
depends:        mii
vermagic:       2.6.35.13 SMP mod_unload
parm:           rx_copybreak:Copy breakpoint for copy-only-tiny-frames (int)
parm:           use_dac:Enable PCI DAC. Unsafe on 32 bit PCI slot. (int)
parm:           debug:Debug verbosity level (0=none, ..., 16=all) (int)
Comment 2 Zenith88 2011-06-03 16:26:34 UTC
$ uname -a
Linux host1 2.6.35.13 #1 SMP Fri May 20 16:03:14 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
Comment 3 Francois Romieu 2011-06-06 20:35:59 UTC
rodolphe@damsy.net :
[...]

You should use a recent kernel (the more, the better). If it does not help,
please send its dmesg including a line with the 'XID' pattern as lspci
is not specific enough to identify the 8168.

Thanks.

-- 
Ueimor
Comment 4 rodolphe 2011-06-06 21:19:51 UTC
(In reply to comment #3)
> rodolphe@damsy.net :
> [...]
> You should use a recent kernel (the more, the better). 

chicard:~% uname -a
Linux chicard 2.6.39-1-amd64 #1 SMP Tue May 24 14:34:19 UTC 2011 x86_64 GNU/Linux

This is the most recent kernel that I can use for the moment and this chipset still do not work at 1000Mb (it works at 100Mb)

> If it does not help,
> please send its dmesg including a line with the 'XID' pattern as lspci
> is not specific enough to identify the 8168.

[    1.296039] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    1.296082] r8169 0000:02:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[    1.296129] r8169 0000:02:00.0: setting latency timer to 64
[    1.296186] r8169 0000:02:00.0: irq 41 for MSI/MSI-X
[    1.296304] r8169 0000:02:00.0: eth0: Features changed: 0x00004980 -> 0x00004180
[    1.296775] r8169 0000:02:00.0: eth0: RTL8168b/8111b at 0xffffc90000618000, 00:1b:fc:75:18:f9, XID 18000000 IRQ 41

Thx
Comment 5 Francois Romieu 2011-06-07 10:49:52 UTC
Thanks for testing Rodolphe.

The same chipset (XID) works here : Peabird 8168 add-on pci-e adapter,
Intel 64 (i5 760 + dp55kg), old pci 64 e1000 in a 32 bits slot, ten
meters of random cable, ip link set eth1 up, ip link set eth2 up
-> instant link up.

Is there something like a "green ethernet" or a power saving reduced
speed option enabled in the bios or in a secondary OS ?

Is the r8169 modular or included in a monolithic kernel ?

Please send an updated 'ethtool eth0' to check if the advertised modes of
the link partner are sane or not. For instance, those in comment #1 are not :
the 816x claims that the link partner does not advertises gigabit speed.

-- 
Ueimor
Comment 6 Zenith88 2011-06-07 13:39:04 UTC
Check this out.
Does below answer all your questions?

$ sudo ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Half 1000baseT/Full 
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Half 1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Link partner advertised link modes:  10baseT/Half 10baseT/Full 
                                             100baseT/Half 100baseT/Full 
                                             1000baseT/Full 
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes
$ sudo ethtool -s eth0 speed 1000
Cannot advertise speed 1000
$ sudo ethtool -s eth0 speed 100
Cannot advertise speed 100
$ sudo ethtool -s eth0 speed 10
Cannot advertise speed 10
$ sudo modinfo r8169
filename:       /lib/modules/2.6.35.13/kernel/drivers/net/r8169.ko
version:        2.3LK-NAPI
license:        GPL
description:    RealTek RTL-8169 Gigabit Ethernet driver
author:         Realtek and the Linux r8169 crew <netdev@vger.kernel.org>
srcversion:     F4271B31294C4EB0D82840D
alias:          pci:v00000001d00008168sv*sd00002410bc*sc*i*
alias:          pci:v00001737d00001032sv*sd00000024bc*sc*i*
alias:          pci:v000016ECd00000116sv*sd*bc*sc*i*
alias:          pci:v00001259d0000C107sv*sd*bc*sc*i*
alias:          pci:v00001186d00004300sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008169sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008168sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008167sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008136sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008129sv*sd*bc*sc*i*
depends:        mii
vermagic:       2.6.35.13 SMP preempt mod_unload 
parm:           rx_copybreak:Copy breakpoint for copy-only-tiny-frames (int)
parm:           use_dac:Enable PCI DAC. Unsafe on 32 bit PCI slot. (int)
parm:           debug:Debug verbosity level (0=none, ..., 16=all) (int)
$ sudo lspci|grep Real
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
$ ls -l ~/1 ; time cp ~/1 .
-rw-rw-r-- 1 zen zen 1071644672 Jun  7 09:17 ~/1

real    0m13.473s
user    0m0.004s
sys     0m2.928s

$ time cp ./1 ~

real    3m21.058s
user    0m0.035s
sys     0m7.311s
Comment 7 rodolphe 2011-06-08 10:04:09 UTC
(In reply to comment #5)
> Thanks for testing Rodolphe.

Thanks to you for the great job you do! ;)

> The same chipset (XID) works here : Peabird 8168 add-on pci-e adapter,
> Intel 64 (i5 760 + dp55kg), old pci 64 e1000 in a 32 bits slot, ten
> meters of random cable, ip link set eth1 up, ip link set eth2 up
> -> instant link up.

My config : chipset embedded on an (old) asus m2a-vm hdmi board, 1 meter of cable, gb switch netgear GS105.
I bought a pci card with a rtl-8169 chipset which works fine with the 5 ports of the switch.

> Is there something like a "green ethernet" or a power saving reduced
> speed option enabled in the bios or in a secondary OS ?

I do not find anything in the bios relate to the network except the "enable network" option.
 
> Is the r8169 modular or included in a monolithic kernel ?

This is the r8169 module from standard debian kernel.

> Please send an updated 'ethtool eth0' to check if the advertised modes of
> the link partner are sane or not. For instance, those in comment #1 are not :
> the 816x claims that the link partner does not advertises gigabit speed.

chicard:~% sudo ethtool eth0
Settings for eth0:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: Yes
	Link partner advertised link modes:  10baseT/Half 10baseT/Full 
	                                     100baseT/Half 100baseT/Full 
	Link partner advertised pause frame use: Symmetric Receive-only
	Link partner advertised auto-negotiation: Yes
	Speed: 100Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: pumbg
	Wake-on: g
	Current message level: 0x00000033 (51)
			       drv probe ifdown ifup
	Link detected: yes

Rodolphe
Comment 8 Francois Romieu 2011-06-21 12:24:01 UTC
Created attachment 63102 [details]
Phy parameters from version 8.023.00 of Realtek's driver

The driver claims in comment #7 that the link partner does not advertise
gigabit.

Rodolphe, may I assume that the same hardware was proven able to stand
faster than non-gigabit ethernet transfert rate with a different OS/driver
so as to rule out a broken cable ?

You can try the attached patch on top of current -rc. It could either make
a difference or say that there is a problem. both complete 'dmesg' and
'mii-tool -v ethX' will be welcome.

-- 
Ueimor

Note You need to log in before you can comment on or make changes to this bug.