# eth0 stopped working after update to gentoo-sources-3.6.11

## Deepak420

Like the title says, I was updating to gentoo-sources-3.6.11 from 3.4.0 with a make oldconfig. Ethernet adapter used to work fine.

Had to update to udev-197 which I did, and didn't mess with anything in the rules.d directory - which I'm assuming should preserve old device naming behaviour. Can't boot old kernel without rolling udev back at this point, though the ethernet adapter works with a LiveCD.

Brought the new system up and I cannot start net.eth0 with an error stating the device does not exist.

Config has DEVTMPFS enabled

https://dl.dropbox.com/u/11588285/config

https://dl.dropbox.com/u/11588285/dmesg

https://dl.dropbox.com/u/11588285/lspci

Any suggestions?

----------

## Hu

What is the output of ifconfig -a?

----------

## Deepak420

The output of ifconfig -a is:

```

eth1      Link encap:Ethernet  HWaddr 14:da:e9:01:3e:32  

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

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:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

```

And the HWaddr value from dmesg:

```
[    1.749127] r8169 0000:0e:00.0: eth0: RTL8168evl/8111evl at 0xffffc9000679e000, 14:da:e9:01:3e:32, XID 0c900800 IRQ 55
```

Near the bottom of dmesg eth0 seems to be renamed to eth1, but if I try to start eth1 I get a timeout and an IP is never leased.

----------

## SamuliSuominen

Post output of

```

# ls -l /etc/udev/rules.d

# ls -l /lib/udev/rules.d/80-net-*.rules

```

If you want to keep eth* naming then /etc/udev/rules.d/ should only have dummy (empty) 80-net-name-slot.rules file, or it should be a symlink to /dev/null

The old 70- starting preserved rules can and should be removed -- if you for some reason can't do this, then you need to read the udev upgrade news item

and follow from there to the bug which has workaround script to "restore eth* renaming capability"

----------

## Deepak420

So I read the bug, but didn't use the script because I don't have iproute2 installed.

The 80 net name slot file is a symlink to /dev/null but I do still have the 70 persistent net name file in that directory.  Is the fix as simple as deleting that file and restarting udev, or do I need to use the script?

----------

## SamuliSuominen

 *Deepak420 wrote:*   

> 
> 
> The 80 net name slot file is a symlink to /dev/null but I do still have the 70 persistent net name file in that directory.  Is the fix as simple as deleting that file and restarting udev, or do I need to use the script?

 

If you haven't edited 70- starting persistent rules to something custom yourself, then you should delete them straight off. And I was hoping you tell me if this helped and if restarting udev was enough, or did you have to reboot?

----------

## Deepak420

 *ssuominen wrote:*   

>  *Deepak420 wrote:*   
> 
> The 80 net name slot file is a symlink to /dev/null but I do still have the 70 persistent net name file in that directory.  Is the fix as simple as deleting that file and restarting udev, or do I need to use the script? 
> 
> If you haven't edited 70- starting persistent rules to something custom yourself, then you should delete them straight off. And I was hoping you tell me if this helped and if restarting udev was enough, or did you have to reboot?

 

So I removed 70-blah and restarted udev, then the machine. So progress in the fact that the eth0 node is back, but I'm still timing out when running dhcpcd 'ERROR: net.eth0 failed to start'

Edit: also I tried to be cheeky and assign an ip manually using ifconfig & route, but no luck there either. The cable is plugged in and the lights on the port are on.

----------

## Deepak420

So I swapped the cable onto my other card, and have a network connection now. Still not sure why the original adapter is not working, but at least I can update the rest of the system while I try to figure this issue out.

----------

## allan

I think there is a problem with the r8169 driver for 3.6.11, and in fact it may have started with an earlier kernel.

I was trying to figure it out for a week, (jumped from 3.2.1-gentoo-r2 to 3.6.11) and finally got it working tonight, by rebuilding my kernel/modules, but by taking an older version of the r8169 driver code, and copying it into the 3.6.11 kernel.  Tried the driver code from 3.5.7, and it didn't work.  Moved on to the driver code from 3.4.9, and my NIC worked again.  So somewhere between 3.4.9, and 3.5.7 the r8169 driver was broken.  At least for my revision of the hardware (8111/8168 rev 02).

Basic steps are to cd into /usr/src/linux/drivers/net/ethernet/realtek, rename r8169.c to some other name to preserve the file, copy in the r8169.c file from an older kernel (as I mentioned above, I used 3.4.9), and then rebuild and re-install your kernel and modules.

Perhaps, a newer version than 3.4.9 will work, but I didn't have any source for the kernels between 3.4.9, and 3.5.7 to try.

----------

## Deepak420

 *allan wrote:*   

> I think there is a problem with the r8169 driver for 3.6.11, and in fact it may have started with an earlier kernel.
> 
> I was trying to figure it out for a week, (jumped from 3.2.1-gentoo-r2 to 3.6.11) and finally got it working tonight, by rebuilding my kernel/modules, but by taking an older version of the r8169 driver code, and copying it into the 3.6.11 kernel.  Tried the driver code from 3.5.7, and it didn't work.  Moved on to the driver code from 3.4.9, and my NIC worked again.  So somewhere between 3.4.9, and 3.5.7 the r8169 driver was broken.  At least for my revision of the hardware (8111/8168 rev 02).
> 
> Basic steps are to cd into /usr/src/linux/drivers/net/ethernet/realtek, rename r8169.c to some other name to preserve the file, copy in the r8169.c file from an older kernel (as I mentioned above, I used 3.4.9), and then rebuild and re-install your kernel and modules.
> ...

 

Thanks Allan! I haven't tried this yet, but when I have a chance I'll report back with my results.

----------

