Bug 468064 - Can't set RealTech 8111b/8168 speed, duplex or autoneg via kernel dist
Summary: Can't set RealTech 8111b/8168 speed, duplex or autoneg via kernel dist
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Ivan Vecera
QA Contact: Martin Jenner
URL: http://www.centos.org/modules/newbb/v...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-22 16:22 UTC by Alon
Modified: 2009-02-23 14:16 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-04 09:29:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
CentOS 3210 0 None None None Never

Description Alon 2008-10-22 16:22:18 UTC
Hi All,

I have an ASUS P5QL-EM with Q9550, 4GB OCZ Ram.
CentOS 5.2 x86_64
All is working great.

The network card is the onboard card and when I run: ethtool eth0 I get the following:

Settings for eth0:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: Not reported
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
Link detected: yes


I need to downgrade the speed to hard setup of 10Mb/s or 100Mb/s
Also, I want to disable auto-negotiation and set duplex to Full.

I type:

ethtool -s eth0 speed 100 duplex full autoneg off

And nothing happens.
This command is disregarded / ignored entirely.

How do I force the downgrade or specifics on this card?

lspci shows:
...
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)

If I add another card, an old 8139C 10/100 and apply the command above, it obeys it immediatly.

lspci shows:

...
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
02:00.0 IDE interface: Marvell Technology Group Ltd. 88SE6121 SATA II Controller (rev b2)
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)


[root@localhost ~]# ethtool eth1
Settings for eth1:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
[root@localhost ~]# ethtool -s eth1 speed 100 duplex full autoneg off
[root@localhost ~]# ethtool eth1
Settings for eth1:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
[root@localhost ~]#

[root@localhost ~]# mii-tool

eth1: 100 Mbit, full duplex, link ok
[root@localhost ~]# ethtool -s eth1 speed 10 duplex full autoneg off
[root@localhost ~]# mii-tool
eth1: 10 Mbit, full duplex, link ok
[root@localhost ~]# ethtool eth1
Settings for eth1:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: No
Speed: 10Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes



Is it hopeless? can I not have

Any pointers on how to set the Gigbit card to lower speed?

EDIT:
====


When the link is down (cable disconnected) the values that I see are:

[root@localhost ~]# ethtool eth0
Settings for eth0:
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: Unknown! (0)
Duplex: Half
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
Link detected: no

So,. now I see the supported link modes,. and they clearly show the 100BaseT/Full option.
But how do I force it to be working when I connect the network cable?
Notice the Supported ports [ TP ], it changes to [ FIBRE ] instead of [ TP MII ]

Also, I can't run mii-tool for the Giganet Card, only ethtool, whereas with the 8139C card the utility works well.

thanks for any input.




=================================================================

In CentOS Support forums I recieved information that helped me resolve this issue:



1. as I'm using CentOS 5.2 x86_64 I downloaded the following file from the link you provided.

wget http://www.pperry.f2s.com/linux/ajb/r8168/kmod-r8168-8.008.00-2.x86_64.rpm [^]

2. I used an editor (my favorite is vi):

vi /etc/sysconfig/modules/local.modules (this file did not exists before)

3. Pasted the following into the file:

#!/bin/sh

#
# Load the r8168 module (after the r8169 is unloaded).
#
/sbin/modinfo -F filename r8168 >/dev/null 2>&1
if [ $? -eq 0 ]
then
        modprobe -r r8169 >/dev/null 2>&1
        modprobe r8168 >/dev/null 2>&1
fi




4. chmod 755 /etc/sysconfig/modules/local.modules

5. rpm -i kmod-r8168-8.008.00-2.x86_64.rpm

6. reboot the server.

Done!

Now,. I can manage:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

and Append at the end of the file:

ETHTOOL_OPTS="speed 10 duplex full autoneg off"

and it works fine.

Comment 1 Ivan Vecera 2008-10-23 07:31:54 UTC
Hi Alon,

1) what exact kernel version do you have on your system?

2) please download proposed kernel for 5.3 from:
http://people.redhat.com/dzickus/el5/120.el5/
and test it please. Driver r8169 has undergone major changes so I need to know if the latest driver version for RHEL 5.3 has this problem.

Ivan

Comment 2 Alon 2008-10-23 14:35:15 UTC
I was using:   

2.6.18-92.el5 #1 SMP Tue Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux


I've d/l and installed:  

2.6.18-120.el5 #1 SMP Fri Oct 17 18:00:55 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

Dramatic improvement!
Now it recognizes the NIC interface with no problem:

[root@localhost ~]# ethtool -s eth0 speed 10 duplex full autoneg off

[root@localhost ~]# 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/Full 
        Advertised auto-negotiation: Yes
        Speed: 10Mb/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: yes
[root@localhost ~]# lspci
...
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)



[root@localhost ~]# mii-tool
eth0: negotiated 10baseT-FD flow-control, link ok

This definatly closes this issue.

Thanks,

-Alon.

Comment 3 Alan Bartlett 2008-11-04 16:13:59 UTC
I see the status is now set CLOSED NEXTRELEASE.

May I please have clarification as to what is defined as the next release. Do you mean RHEL 5.3 or RHEL 6?

Comment 4 Ivan Vecera 2008-11-04 18:42:55 UTC
Appropriate patch is already present in RHEL 5.3 beta kernels so 5.3 is target release.


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