# e1000 5.2.20 compilation problem with kernel 2.6.0_beta9-mm3

## sebgarden

Hi,

I'm running Gentoo on two machines with the latest mm-sources (2.6.0_beta9-mm3) and I have some problems compiling the e1000 module. One of my machine need it (a i875p-based computer with the Intel 82547EI gigabit LAN controller) and the other do not need it (a PIII-based laptop). The fact is that on both machines, the module doesn't even compile and gives the following output:

```

root@idk-002c307 seb # emerge e1000

Calculating dependencies ...done!

>>> emerge (1 of 1) net-misc/e1000-5.2.20 to /

>>> md5 src_uri ;-) e1000-5.2.20.tar.gz

>>> Unpacking source...

>>> Unpacking e1000-5.2.20.tar.gz to /var/tmp/portage/e1000-5.2.20/work

>>> Source unpacked.

rm -rf e1000.o e1000_main.o e1000_hw.o e1000_param.o e1000_ethtool.o kcompat.o e 1000.7.gz

gcc -march=pentium3 -O3 -pipe -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall -I/u sr/src/linux/include -I.     -c -o e1000_main.o e1000_main.c

In file included from /usr/src/linux/include/asm/processor.h:18,

                 from /usr/src/linux/include/asm/thread_info.h:13,

                 from /usr/src/linux/include/linux/thread_info.h:21,

                 from /usr/src/linux/include/linux/spinlock.h:12,

                 from /usr/src/linux/include/linux/capability.h:45,

                 from /usr/src/linux/include/linux/sched.h:7,

                 from /usr/src/linux/include/linux/module.h:10,

                 from e1000.h:37,

                 from e1000_main.c:29:

/usr/src/linux/include/asm/system.h: In function `__set_64bit_var':

/usr/src/linux/include/asm/system.h:193: warning: dereferencing type-punned poin ter will break strict-aliasing rules

/usr/src/linux/include/asm/system.h:193: warning: dereferencing type-punned poin ter will break strict-aliasing rules

In file included from /usr/src/linux/include/linux/irq.h:20,

                 from /usr/src/linux/include/asm/hardirq.h:6,

                 from /usr/src/linux/include/linux/interrupt.h:11,

                 from /usr/src/linux/include/linux/netdevice.h:497,

                 from e1000.h:46,

                 from e1000_main.c:29:

/usr/src/linux/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory

In file included from /usr/src/linux/include/asm/hardirq.h:6,

                 from /usr/src/linux/include/linux/interrupt.h:11,

                 from /usr/src/linux/include/linux/netdevice.h:497,

                 from e1000.h:46,

                 from e1000_main.c:29:

/usr/src/linux/include/linux/irq.h: At top level:

/usr/src/linux/include/linux/irq.h:70: error: `NR_IRQS' undeclared here (not in a function)

In file included from /usr/src/linux/include/linux/irq.h:72,

                 from /usr/src/linux/include/asm/hardirq.h:6,

                 from /usr/src/linux/include/linux/interrupt.h:11,

                 from /usr/src/linux/include/linux/netdevice.h:497,

                 from e1000.h:46,

                 from e1000_main.c:29:

/usr/src/linux/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)

/usr/src/linux/include/asm/hw_irq.h:31: error: `NR_IRQS' undeclared here (not in  a function)

[color=red][b]make: *** [e1000_main.o] Error 1[/b][/color]

 

>>> Install e1000-5.2.20 into /var/tmp/portage/e1000-5.2.20/image/ category net- misc

install: cannot stat `/var/tmp/portage/e1000-5.2.20/work/e1000-5.2.20/src/e1000. o': No such file or directory

 *

 * In case you have problems, loading the module, try to run depmod -A

 *

man:

prepallstrip:

strip:

>>> Completed installing into /var/tmp/portage/e1000-5.2.20/image/

 

>>> Merging net-misc/e1000-5.2.20 to /

--- /lib/

--- /lib/modules/

--- /lib/modules/2.6.0-test9-mm3/

--- /lib/modules/2.6.0-test9-mm3/kernel/

--- /lib/modules/2.6.0-test9-mm3/kernel/drivers/

--- /lib/modules/2.6.0-test9-mm3/kernel/drivers/net/

--- /usr/

--- /usr/share/

--- /usr/share/doc/

--- /usr/share/doc/e1000-5.2.20/

>>> /usr/share/doc/e1000-5.2.20/README.gz

>>> /usr/share/doc/e1000-5.2.20/e1000.spec.gz

>>> /usr/share/doc/e1000-5.2.20/SUMS.gz

>>> /usr/share/doc/e1000-5.2.20/ldistrib.txt.gz

>>> /usr/share/doc/e1000-5.2.20/LICENSE.gz

--- /usr/share/man/

--- /usr/share/man/man7/

>>> /usr/share/man/man7/e1000.7.gz

 

>>> Safely unmerging already-installed instance...

--- !mtime obj /usr/share/man/man7/e1000.7.gz

--- !mtime obj /usr/share/doc/e1000-5.2.20/ldistrib.txt.gz

--- !mtime obj /usr/share/doc/e1000-5.2.20/e1000.spec.gz

--- !mtime obj /usr/share/doc/e1000-5.2.20/SUMS.gz

--- !mtime obj /usr/share/doc/e1000-5.2.20/README.gz

--- !mtime obj /usr/share/doc/e1000-5.2.20/LICENSE.gz

<<<        dir /lib/modules/2.6.0-test9-mm3/kernel/drivers/net

<<<        dir /lib/modules/2.6.0-test9-mm3/kernel/drivers

--- !empty dir /usr/share/man/man7

--- !empty dir /usr/share/man

--- !empty dir /usr/share/doc/e1000-5.2.20

--- !empty dir /usr/share/doc

--- !empty dir /usr/share

--- !empty dir /usr

--- !empty dir /lib/modules/2.6.0-test9-mm3/kernel

--- !empty dir /lib/modules/2.6.0-test9-mm3

--- !empty dir /lib/modules

--- !empty dir /lib

>>> original instance of package unmerged safely.

>>> Regenerating /etc/ld.so.cache...

 * Caching service dependencies...

 *  Services 'procparam' and 'checkroot' have circular

 *  dependency of type 'ibefore';  continuing...

 *  Services 'bootsplash' and 'local' have circular

 *  dependency of type 'iafter';  continuing...                           [ ok ]

>>> net-misc/e1000-5.2.20 merged.

 

>>> clean: No packages selected for removal.

 

>>> Regenerating /etc/ld.so.cache...

 * Caching service dependencies...

 *  Services 'procparam' and 'checkroot' have circular

 *  dependency of type 'ibefore';  continuing...

 *  Services 'bootsplash' and 'local' have circular

 *  dependency of type 'iafter';  continuing...                           [ ok ]

>>> Auto-cleaning packages ...

 

>>> No outdated packages were found on your system.

 

 

 * GNU info directory index is up-to-date.

 

root@idk-002c307 voyages #

```

The 5.2.16 version of this driver doesn't compile too, supposingly because of the changes in the last 2.6 kernels. Does someone has an idea where I can get help or if there is an existing patch ?

Regards,

Sébastien.

----------

## sebgarden

Anyway, what I want is just a working system. I would be happy to leave mm-sources for a working ethernet card and a poorer kernel. Because having gentoo without internet connection sucks.

Does anybody of you, owner of an Asus P4c800 Deluxe mobo have a working kernel with this card ?

Cheers,

Sébastien.

----------

## sebest

i thought (almost sure) that the driver for the card based on the e1000 chipset are included in the 2.6 kernel

did you check in the gigabit section of the networking configuration?

----------

## sebgarden

 *sebest wrote:*   

> i thought (almost sure) that the driver for the card based on the e1000 chipset are included in the 2.6 kernel
> 
> did you check in the gigabit section of the networking configuration?

 

I did it of course ! even twice. The drivers are included in the Gigabit section of the kernel but the one provided with the kernel are too old for my card, I suppose. What makes me supposing that is:

1. I verified that my ethernet card is really working ... it works under Windows on the same machine with exactly the same configuration.

2. My ethernet controller is of type 82547EI, which is NOT part of the list of the supported chips provided in the last kernel by default (82546 is supported however).

3. My ethernet card doesn't come to life at boot with the kernel provided in the kernel:

```

* Bringing eth0 up...

SIOCSIFADDR: No such device

eth0: unknown interface: No such device

SIOCSIFBRDADDR: No such device

eth0: unknown interface: No such Device

SIOCSIFNETMASK: No such device

* Failed to bring eth0 up

```

This topic is also related the same Asus mobo but Rhino uses apparently another ethernet card that the one on board (?) and I don't know how DuDE got his one working (I pmed him to know it).

These are other related topics:

https://forums.gentoo.org/viewtopic.php?t=106797&highlight=e1000

https://forums.gentoo.org/viewtopic.php?t=80582&highlight=e1000

I need libata for my sata drive, which is a quite new feature (included maybe one month ago in the kernel development tree) and I also want my ethernet card to work (this brokenness seems to be related to quite recent changes to the irq code that happened in the kernel 2.6 branch).

```

$ lspci -v

...

02:01.0 Ethernet controller: Intel Corp. Unknown device 1019

Subsystem Asustek computer, Inc.: Unknown device 80f7

Flags: bus master, 66 MHz, medium devsel, latency 32

Memory at fe9e0000 (32-bit, prefetchable) [size=256M]

I/O ports at cf80 [size=32]

Capabilities: [dc] Power management version 2

...

```

So, besides a broken driver and a too old one, what can I try  :Confused:  ?

Regards,

Sébastien.

----------

## sebest

i look in the kernel source

in the subdir of your kernel -> drivers/net/e1000/*

there are really few differences between the intel driver and the driver in ther kernel

And about "old version" i think it's the same version: 5.2.20

i have linux-2.6.0-test9-mm1 and the included version is 5.2.20-k1

and from the "struct pci_device_id" there is no difference in the supported card (look at e1000_main.c)

so i doubt that the e1000 ebuild contains any new supported card...

----------

## sebgarden

Well, the fact is that it doesn't worked neither with 2.6.0_beta9 nor with 2.6.0_beta9-mm3, nor with gentoo-sources nor vanilla-sources. I found a workking configuration with gentoo-test-sources (a patched vanilla 2.4.22 kernel) after emerging e1000.

The problem is now that I cannot reach the proxy: eth0 comes to life, ifconfig is ok:

```

-- ifconfig.81 2003-11-19 16:50:56.321843248 +0100

+++ ifconfig.173        2003-11-19 16:50:08.705082096 +0100

@@ -1,17 +1,17 @@

-eth0      Link encap:Ethernet  HWaddr 00:02:3F:70:80:81

-          inet addr:172.20.208.81  Bcast:172.20.208.255  Mask:255.255.0.0

+eth0      Link encap:Ethernet  HWaddr 00:0C:6E:D7:A3:B4

+          inet addr:172.20.208.173  Bcast:172.20.208.255  Mask:255.255.0.0

           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

-          collisions:0 txqueuelen:1000

-          RX bytes:194978138 (185.9 Mb)  TX bytes:157128280 (149.8 Mb)

-          Interrupt:5 Base address:0xd800

+          RX packets:8177 errors:54744 dropped:54744 overruns:50507 frame:0

+          TX packets:78 errors:0 dropped:0 overruns:0 carrier:41

+          collisions:0 txqueuelen:100

+          RX bytes:725340 (708.3 Kb)  TX bytes:4992 (4.8 Kb)

+          Interrupt:17 Base address:0xcf80 Memory:fe9e0000-fea00000

                                                                                                                              

 lo        Link encap:Local Loopback

           inet addr:127.0.0.1  Mask:255.0.0.0

           UP LOOPBACK RUNNING  MTU:16436  Metric:1

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

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

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

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

           collisions:0 txqueuelen:0

-          RX bytes:182614 (178.3 Kb)  TX bytes:182614 (178.3 Kb)

+          RX bytes:10511 (10.2 Kb)  TX bytes:10511 (10.2 Kb)

```

The ip ending with 81 is a working Gentoo computer of mine on an ethernet connection. The ip ending with 173 is a new computer of mine, which is plugged into its sister connection besides. Both connections basicaly works. I just have problems to configure the settings (proxy ? the proxy on 'my' network is _very_ restrictive).

My /etc/conf.d/net looks likes that: 

```

# This is basically the ifconfig argument without the ifconfig $iface

#

iface_eth0="172.20.208.81 broadcast 172.20.208.255 netmask 255.255.0.0"

# For setting the default gateway

#

gateway="eth0/172.20.254.254"

```

And of course I also did all the commands manually with ifconfig eth0 $IP ...

in /etc/profile:

export http_proxy="http://www-cache.rz.uni-karlsruhe.de:3128"

export ftp_proxy="ftp://www-cache.rz.uni-karlsruhe.de:3128"

I suppose it doesn't hurt to have the same broadcast on two different computers. So what can I do ?

Regards,

Seb.

----------

## sebest

you tested with telnet to see if you can connect to the proxy?

----------

## sebgarden

 *sebest wrote:*   

> you tested with telnet to see if you can connect to the proxy?

 

Icannot ping the proxy, if it is, what you mean. Got a "Destination Host Unreachable".

----------

## sebest

maybe you could try to tcpdump on both host

maybe your driver seems to be working but it fact it doesn't

----------

## Tuna

hmm driver too old shouldnt be the reason. i am using vanilla-test8 and driver version there is 5.2.20-k1.

i think that the normal kernel module provided by portage wont compile because of the differences of the 2.4 and 2.6 kernels.

just tell me.. is this chip on the board or is this a 'normal' pci card?

how can you identify the card? your lspci string only states something about asus and not intel at all. not even a chip number. this is mine on a normal pci card:

```

02:0e.0 Ethernet controller: Intel Corp. 82540EM Gigabit Ethernet Controller (rev 02)

        Subsystem: Intel Corp. PRO/1000 MT Desktop Adapter

        Flags: bus master, 66Mhz, medium devsel, latency 32, IRQ 18

        Memory at e8000000 (32-bit, non-prefetchable) [size=128K]

        Memory at e7800000 (32-bit, non-prefetchable) [size=128K]

        I/O ports at b800 [size=64]

        Expansion ROM at <unassigned> [disabled] [size=128K]

        Capabilities: [dc] Power Management version 2

        Capabilities: [e4] PCI-X non-bridge device.

        Capabilities: [f0] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable-

```

maybe it is some sort of intel chip modified by asus?!

anyway, if you can patch it whatever way and it doesnt work, please give us the output of 'route -n'.

there is also a known issue with e1000 based cards and iptables (more precise: ip_conntrack) in the 2.6 kernels until test3. so if you have loaded the conntrack module try to unload it and see if it gives any improvements.

----------

## sebgarden

 *Tuna wrote:*   

> hmm driver too old shouldnt be the reason. i am using vanilla-test8 and driver version there is 5.2.20-k1.
> 
> i think that the normal kernel module provided by portage wont compile because of the differences of the 2.4 and 2.6 kernels.
> 
> 

 

Yep, I agree.

 *Quote:*   

> 
> 
> just tell me.. is this chip on the board or is this a 'normal' pci card?
> 
> how can you identify the card? your lspci string only states something about asus and not intel at all. not even a chip number.
> ...

 

It is an on-board chip. The information about it is given in the mobo's user guide.

 *Quote:*   

> 
> 
> this is mine on a normal pci card:
> 
> ```
> ...

 

It seems to be what you think it is  :Smile: 

 *Quote:*   

> 
> 
> anyway, if you can patch it whatever way and it doesnt work, please give us the output of 'route -n'.
> 
> there is also a known issue with e1000 based cards and iptables (more precise: ip_conntrack) in the 2.6 kernels until test3. so if you have loaded the conntrack module try to unload it and see if it gives any improvements.

 

I don't use a 2.6 kernel. e1000 is compiled as a module, loaded at startup with /etc/modules.autoload/kernel-2.4 and CONFIG_NET_ETHERNET is not set ("Ethernet (10 or 100Mbit)" section of the kernel .config file), although I'm on a 100Mbit network. Well, right now, eth0 and gateway come to life but ]I cannot ping the proxy.

```

# route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

172.20.0.0      0.0.0.0         255.255.0.0     U     0      0        0 eth0

127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo

0.0.0.0         172.20.254.254  0.0.0.0         UG    1      0        0 eth0

```

Do you have an idea of what is wrong ?

Sébastien

----------

## Skillshot

 *sebgarden wrote:*   

> 
> 
> ```
> 
> * Bringing eth0 up...
> ...

 

Had the same error, my /etc/modules.autoload still pointed to the 2.4er modules. Maybe yours, too?

Bye, Skillshot

----------

