[tulip] Error building Tulip driver on Mandrake 9 : 'tulip.c:3249: `NETIF_MSG_RXFILTER' undeclared (first use in this function)'

Peter McClure mcclurep@yahoo.com
Mon Nov 25 13:14:01 2002


I have just upgraded from Mandrake 7.0 to Mandrake 9.  I am having problems
with (I think), I tulip driver that comes with Mandrake 9 (secure kernel)  I
can only get 80 KB/s from a link to a 10 Mb/s (FD) laptop.  In addition, the
networking just 'dies' after transferring about 60 MB and it needs an
'ifconfig eth0 down; ifconfig eth0 up' to restart it.

The laptop tests OK with netperf and I get about 6 Mbps from a connection to
another 100 Mb/s box.  Thus, I conclude that it's the Linux box and thus the
driver that I'm having problems with.

I have downloaded to tulip drivers from http://www.scyld.com/ and I'm having
problems compiling them.


1) Error during compile .....

[root@lin133 RPM]# cd BUILD
[root@lin133 BUILD]# cd net*
[root@lin133 netdrivers-3.1]# make tulip.o
gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -I/lib/modules/2.4.1
9-16mdksecure/build/include -pipe -fno-strength-reduce -DMODVERSIONS   -c -o
tulip.o tulip.c
tulip.c: In function `set_rx_mode':
tulip.c:3249: `NETIF_MSG_RXFILTER' undeclared (first use in this function)
tulip.c:3249: (Each undeclared identifier is reported only once
tulip.c:3249: for each function it appears in.)
tulip.c:3291: warning: operation on `setup_frm' may be undefined
tulip.c:3299: warning: operation on `setup_frm' may be undefined
tulip.c:3300: warning: operation on `setup_frm' may be undefined
tulip.c:3301: warning: operation on `setup_frm' may be undefined
tulip.c:3309: warning: operation on `setup_frm' may be undefined
tulip.c:3310: warning: operation on `setup_frm' may be undefined
tulip.c:3311: warning: operation on `setup_frm' may be undefined
make: *** [tulip.o] Error 1

Finding this value (NETIF_MSG_RXFILTER) :-

[root@lin133 netdrivers-3.1]# grep NETIF_MSG_RXFILTER *h
kern_compat.h:  NETIF_MSG_RXFILTER      = 0x10000,
[root@lin133 netdrivers-3.1]#


** QUESTION **
         kern_compat.h is being included in the compile so why am I getting
this error ?
** QUESTION **



2) My first problem was that I make a modversions.h file with just #error
lines in it. I replaced that with an empty file.
  The only modversions.h that Mandrake 9 installs is in /usr/include/linux
and comprises solely of #error lines. Thus when I tried to compile the
drivers with 'rpm -bb SPECS/net*spec' (from /usr/src/RPM), I got the #error
lines.  I cannot work out why the Makefile is finding that I have a
modversions.h file but it is .....

Following the Makefile .....

[root@lin133 netdrivers-3.1]# echo ${KERNVER}

[root@lin133 netdrivers-3.1]# KERNVER=`uname -r`
[root@lin133 netdrivers-3.1]# ls -l /lib/modules/${KERNVER}/build
lrwxr-xr-x    1 root     root           35 Nov 21 16:20
/lib/modules/2.4.19-16mdksecure/build -> ../../../usr/src/linux-2.4.19-
16mdk/
[root@lin133 netdrivers-3.1]# LINUX=/lib/modules/${KERNVER}/build
[root@lin133 netdrivers-3.1]# ls -ld ${LINUX}
lrwxr-xr-x    1 root     root           35 Nov 21 16:20
/lib/modules/2.4.19-16mdksecure/build -> ../../../usr/src/linux-2.4.19-
16mdk/
[root@lin133 netdrivers-3.1]# MODVER_H=${LINUX}/include/linux/modversions.h
[root@lin133 netdrivers-3.1]# ls ${MODVER_H}
ls: /lib/modules/2.4.19-16mdksecure/build/include/linux/modversions.h: No
such file or directory
[root@lin133 netdrivers-3.1]# ls *${MODVER_H}*
ls: */lib/modules/2.4.19-16mdksecure/build/include/linux/modversions.h*: No
such file or directory


I replaced the modversions.h file with an empty file in the end to continue
the compile.



Background
##########
##########

Output from mii-diag
~~~~~~~~~~~~~~~~~~~~~~
Basic registers of MII PHY #1:  1000 782d 0040 6212 01e1 45e1 0003 0000.
 The autonegotiated capability is 01e0.
The autonegotiated media type is 100baseTx-FD.
 Basic mode control register 0x1000: Auto-negotiation enabled.
 You have link beat, and everything is working OK.
 Your link partner advertised 45e1: Flow-control 100baseTx-FD 100baseTx
10baseT-FD 10baseT, w/ 802.3X flow control.
   End of basic transceiver information.



Output from tulip-diag
~~~~~~~~~~~~~~~~~~~~~~~~~
tulip-diag.c:v2.15 9/23/2002 Donald Becker (becker@scyld.com)
 http://www.scyld.com/diag/index.html
Index #1: Found a Lite-On 82c168 PNIC adapter at 0xea00.
Lite-On 82c168 PNIC chip registers at 0xea00:
 0x00: 00008000 01ff0000 00450008 080c8000 080c8200 02660010 810c2202
0001fbef
 0x40: 00000000 00000000 080c8200 080f10d8 00000020 00000000 00000000
10000001
 Extended registers:
 0x80: 00000000 00000000 00000000 00000000 f0041385 f0041385 000000bf
000000bf
 0xa0: 609645e1 609645e1 080c8120 080c8120 081f1010 081f1010 0201e978
0201e978
 0xc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
 0xe0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
 Port selection is MII, full-duplex.
 Transmit started, Receive started.
  The Rx process state is 'Waiting for packets'.
  The Tx process state is 'Idle'.
  The transmit threshold is 128.
 A simplifed EEPROM data table was found.
 The EEPROM does not contain transceiver control information.
EEPROM contents (64 words):
0x00:  00a0 cc5b 2f42 f004 1385 00f1 0000 61cd
0x08:  0000 0000 0000 0000 0000 0000 0000 0000
0x10:  0000 0000 0000 0000 0000 0000 0000 0000
0x18:  0000 0000 0000 0000 0000 0000 0000 0000
0x20:  0000 0000 0000 0000 0000 0000 0000 0000
0x28:  0000 0000 0000 0000 0000 0000 0000 0000
0x30:  0000 0000 0000 0000 0000 0000 0000 0000
0x38:  0000 0000 0000 0000 0000 0000 0000 0000
 ID block CRC 0x67 (vs. 00).
  Full contents CRC 0x2273 (read as 0x0000).
 MII PHY found at address 1, status 0x782d.
 MII PHY #1 transceiver registers:
   1000 782d 0040 6212 01e1 45e1 0003 0000
   0000 0000 0000 0000 0000 0000 0000 0000
   5000 0301 0000 0000 0000 02d6 0100 0000
   003b f53e 0f00 ff00 002b 4000 80a0 000b.