Bug 174022 - Unable to use Realtek 8169 NIC (r8169)
Unable to use Realtek 8169 NIC (r8169)
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
4
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Andy Gospodarek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-23 14:48 EST by James Martin
Modified: 2014-06-29 18:57 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-05-16 10:49:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
dmesg for netdev (17.76 KB, text/plain)
2005-12-06 11:06 EST, James Martin
no flags Details
dmesg for plain, non-working fc4 kernel (16.98 KB, text/plain)
2005-12-06 11:08 EST, James Martin
no flags Details
lspci output (2.00 KB, text/plain)
2005-12-06 11:09 EST, James Martin
no flags Details
Allows duplex to be correctly set when auto-negotiate is disabled. (372 bytes, patch)
2006-01-24 16:44 EST, Andy Gospodarek
no flags Details | Diff
Reformatted patch suitable for upstream. (579 bytes, patch)
2006-01-25 09:51 EST, Andy Gospodarek
no flags Details | Diff
Updated netdev kernel with r8169 patch included. (14.45 MB, patch)
2006-01-25 10:58 EST, Andy Gospodarek
no flags Details | Diff

  None (edit)
Description James Martin 2005-11-23 14:48:07 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

Description of problem:
I'm assuming this is a kernel issue..  I have a Realtek 8169 NIC installed on the HP 9600NX laptop.  It detects the link, but cannot fetch an IP address from the DHCP server.  The DHCP server sees the request and attempts to give it an address, but the 8169 never seems to receive the reply.  If I assign the address statically, it cannot ping anything.

Oddly enough, when booting a Knoppix CD, the DHCP works properly and I have a working NIC.

Version-Release number of selected component (if applicable):
2.6.14-1.1637_FC4smp and older

How reproducible:
Always

Steps to Reproduce:
1.Install Realtek 8169
2.Try to either assign an IP or attempt to fetch one through DHCP.
3.
  

Actual Results:  If using DHCP, I never receive an address.
If I assign a static IP, I can't ping anything.

Expected Results:  I should be able to get an IP Address from the DHCP server or assign one manually.  The latest Knoppix CD works without any problems and fetches a DHCP address just fine.

Additional info:
Comment 1 John W. Linville 2005-11-29 15:13:23 EST
Would you mind trying the kernels here: 
 
   http://people.redhat.com/linville/kernels/fedora-netdev/ 
 
and posting the results here?  Thanks! 
Comment 2 James Martin 2005-11-30 11:01:08 EST
Hi,  I tried the lastest netdev kernel and it worked! Thanks.  The NIC now
works, but not optimally-- I can't seem to set the duplex/speed via ethtool. 
I've tried the specific "media=0x08" module option, and it doesn't work either.
 modinfo r8169 tells me that the media options are deprecated and to use
ethtool.  I'm guessing the driver hasn't been patched yet to work with ethtool?
Comment 3 John W. Linville 2005-12-02 12:42:10 EST
Hmmm...actually, r8169 has fairly extensive ethtool support.  What sort of 
output does ethtool produce? 
Comment 4 James Martin 2005-12-05 11:12:26 EST
Here's a dump of a bunch of commands.. I hope the output is useful:


[root@snarky ~]# uname -a
Linux snarky 2.6.14-1.1637_FC4.netdev.2 #1 Wed Nov 16 08:08:07 EST 2005 i686
i686 i386 GNU/Linux
[root@snarky ~]# cat /etc/modprobe.conf
alias eth0 r8169
alias usb-controller ehci-hcd
alias usb-controller1 uhci-hcd
alias ieee1394-controller ohci1394


alias snd-card-0 snd-intel8x0
options snd-card-0 index=0
install snd-intel8x0 /sbin/modprobe --ignore-install snd-intel8x0 &&
/usr/sbin/alsactl restore >/dev/null 2>&1 || :
remove snd-intel8x0 { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; };
/sbin/modprobe -r --ignore-remove snd-intel8x0
[root@snarky ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:C0:9F:DB:A6:5A
          inet addr:156.132.110.142  Bcast:156.132.111.255  Mask:255.255.254.0
          inet6 addr: fe80::2c0:9fff:fedb:a65a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:906 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:396866 (387.5 KiB)  TX bytes:2044 (1.9 KiB)
          Interrupt:7 Base address:0xe400

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1095 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1095 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1261796 (1.2 MiB)  TX bytes:1261796 (1.2 MiB)

[root@snarky ~]# 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: 100Mb/s
        Duplex: Half
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Current message level: 0x00000033 (51)
        Link detected: yes
[root@snarky ~]# ethtool -s eth0 speed 100 duplex full autoneg off
[root@snarky ~]# 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:  100baseT/Half 100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Half
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Current message level: 0x00000033 (51)
        Link detected: yes

Comment 5 James Martin 2005-12-05 11:14:09 EST
And yes, the network cable tests fine to 100-Full on another machine.
Comment 6 John W. Linville 2005-12-05 12:23:59 EST
Francois, do you have any suggestions for this (apparent) link speed 
negotiation problem? 
Comment 7 Francois Romieu 2005-12-05 19:49:26 EST
[...]
> Francois, do you have any suggestions for this (apparent) link speed 
> negotiation problem ?

The link management side of the r8169 has not changed since linux kernel
2.6.11 (on which Knoppix is based if I am right). It should not be necessary
to disable autoneg (it is never really disabled) and, provided the cable is
not ridiculously long/damaged/connected to a special device/whatever, the
driver should set the link correctly without any media option nor ethtool
command.

Are the dmesg of fedora-netdev and non-working fedora kernels the same ?

--
Ueimor
Comment 8 John W. Linville 2005-12-06 10:43:28 EST
James, please attach the outputs of running 'dmesg' both directly after 
booting the current fedora-netdev kernel and after booting the non-working 
fedora kernel...thanks! 
Comment 9 James Martin 2005-12-06 11:04:14 EST
The problem is the folks that run our network do not have the switches setup
properly-- that is why I'm disabling autoneg.  Yes the switches all support
100-FD, as all my machines are running it, but they have to be forced to.  There
is nothing wrong with the cable as I've hooked it up to other machines (both
Windows & Linux) and have had them run in 100-FD with no problem.

Giving a working machine the command:

ethtool -s eth0 speed 100 duplex full 

does not work unless autoneg is turned off, so clearly autoneg is doing
something(at least on the e100 drivers)..

Attachments for netdev, plan, and lspci output below..
Comment 10 James Martin 2005-12-06 11:05:21 EST
sorry, that should be netdev kernle, plain (non-working) kernel, and lspci.
Comment 11 James Martin 2005-12-06 11:06:55 EST
Created attachment 121913 [details]
dmesg for netdev

Yeah, if only I could spell properly.
Comment 12 James Martin 2005-12-06 11:08:00 EST
Created attachment 121915 [details]
dmesg for plain, non-working fc4 kernel
Comment 13 James Martin 2005-12-06 11:09:04 EST
Created attachment 121916 [details]
lspci output

thought this may come in handy..
Comment 14 James Martin 2005-12-07 10:06:02 EST
As a side note, not related to the speed/duplex issue, I failed to mention I was
able to perform a network install, which is odd because I wasn't able to get the
network working after the install.  Maybe there was something different in the
install-time kernel.. 
Comment 17 John W. Linville 2006-01-06 13:06:11 EST
So, as long as you use the fedora-netdev kernel, the NIC works for you?  The 
remaining complaint is just that setting link parameters with ethtool doesn't 
act the way you expect.  Is that correct? 
Comment 18 James Martin 2006-01-06 15:58:54 EST
Correct, if I used fedora-netdev the nic works, but I can't set the link
parameters with ethtool.  I guess we need an ethtool bug now?
Comment 19 Andy Gospodarek 2006-01-24 09:38:04 EST
I have an ethtool fix for you to try, but I'm searching for a place to put the
kernels.  Can you tell me which arch and whether or not you need an smp kernel?
 If I can't get my people page setup quickly enough I can try and just attach it
to the BZ.
Comment 20 Andy Gospodarek 2006-01-24 16:44:35 EST
Created attachment 123636 [details]
Allows duplex to be correctly set when auto-negotiate is disabled.
Comment 21 Francois Romieu 2006-01-24 17:16:06 EST
Andy, can you add a Signed-off-By line to your patch ?

--
Ueimor
Comment 22 Andy Gospodarek 2006-01-25 09:51:58 EST
Created attachment 123672 [details]
Reformatted patch suitable for upstream.

Old patch removed and newly formatted one added.  

If this helps the customer I can submit it upstream.  I'd test it myself, but I
can't seem to find any hardware around here.
Comment 23 James Martin 2006-01-25 10:44:07 EST
That would be great if you can submit it upstream.  It would speed up things on
my end -- I'd much rather get the package than rebuild the src rpm.
Comment 24 Andy Gospodarek 2006-01-25 10:58:50 EST
Created attachment 123675 [details]
Updated netdev kernel with r8169 patch included.

James,

Here is a test-kernel for you to try.  Let me know if you need another
processor family (i586, x86_64, etc) or if you need an SMP kernel to test as
well.

-andy
Comment 25 Andy Gospodarek 2006-01-26 10:41:03 EST
I found a NIC with this chipset and verified that ethtool now reports only
100Full capability (before it reported 100H and 100F), so I'm guessing this
patch will work.  Waiting for feedback from the reporter before pushing upstream. 
Comment 26 James Martin 2006-01-26 14:04:59 EST
Andy,

I tried out the kernel you posted.. No luck.  The NIC stays at 100/half even
when I attempt to force it to 100 Fulla nd disable autoneg.  It seems like the
issue is that ethtool is not taking it out of autoneg mode.

BTW, the NIC is "functioning" with the 2.6.14-1.1653_FC4 kernel (functioning =
100/half), so I don't think I need to be on the netdev branch..

Thanks,

James
Comment 27 Andy Gospodarek 2006-01-26 14:55:16 EST
James,

This seems interesting because I tested it this morning and got this for output:

# ethtool -s eth0 speed 100 duplex full autoneg off
# 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:  100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Current message level: 0x00000033 (51)
        Link detected: yes

Of course I was plugged into a switch that autonegotiates because I don't really
have access to one that has the ability to turn it off.  Did you notice that the
       "Advertised link modes" printed only "100baseT/Full" or was
"100baseT/Half" printed in that section as well?

-andy
Comment 28 Andy Gospodarek 2006-01-26 14:59:17 EST
Also, apparently there is no real way to turn off autonegotiate on the r8169
chip, so the driver will always report autonegotiate is enabled even when you
turn it off with ethtool.  That is why you should see the "Advertised link
modes" change and not the "Supported link modes" section.
Comment 29 Dave Jones 2006-02-03 01:37:29 EST
This is a mass-update to all currently open kernel bugs.

A new kernel update has been released (Version: 2.6.15-1.1830_FC4)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO_REPORTER state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

Thank you.
Comment 30 Andy Gospodarek 2006-04-11 08:06:45 EDT
James,

The patch I submitted for this bugzilla made its way into the offical 2.6.16. 
Is there anything else I can do to help resolve this issue before 2.6.16 makes
its way down into FC4 kernels?  (I'm assuming it will sometime soon.)

-andy
Comment 31 James Martin 2006-04-11 10:31:03 EDT
It's good on my end.  Thanks for the hard work!
Comment 32 Andy Gospodarek 2006-05-16 10:49:46 EDT
Fixed upstream in 2.6.16

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