[1291] in linux-net channel archive
Problem PCMCIA and network initialization
daemon@ATHENA.MIT.EDU (Theodore Ts'o)
Tue Oct 31 05:53:32 1995
Date: Tue, 31 Oct 1995 01:39:36 -0500
From: "Theodore Ts'o" <tytso@mit.edu>
To: linux-kernel@vger.rutgers.edu, linux-net@vger.rutgers.edu
PCMCIA networking hasn't worked since 1.3.33, because of the change in
device initialization. Apparently what's going on is that even when
there are no network devices compiled into the kernel, when the ethernet
layer initializes itself, it's leaving unitializaed network device
structures on the global linked list. Hence, if you cat /proc/net/dev,
you will see something like this:
Inter-| Receive | Transmit
face |packets errs drop fifo frame|packets errs drop fifo colls carrier
lo: 8 0 0 0 0 8 0 0 0 0 0
slip_proto: No statistics available.
eth0: No statistics available.
eth1: No statistics available.
eth2: No statistics available.
eth3: No statistics available.
eth0: 0 0 0 0 0 0 0 0 0 0 0
The last line is one added by the PCMCIA drivers; the "eth0..eth3" lines
are present before PCMCIA is loaded, even though no network devices were
detected, and none were even configured into the kernel.
As a result of this, even if you don't load PCMCIA, if you ifconfig up
one of the eth0 interfaces, and try to use that interface, for example
if you try to run ping, you will see the following:
general protection: 0000
CPU: 0
EIP: 0010:00000004
EFLAGS: 00010206
eax: 0002023a ebx: 001be07c ecx: 001be07c edx: 00000000
esi: 01557964 edi: 001be07c ebp: 00000000 esp: 010c1d84
ds: 0018 es: 0018 fs: 002b gs: 002b ss: 0018
Process ping (pid: 146, process nr: 20, stackpage=010c1000)
Stack: 0013a83a 015578f4 001be07c 0100b112 01557964 01557908 001be07c 001be07c
01557964 001425b6 000051a8 00142633 01557964 001be07c 00000001 01447808
00000000 000051a8 00000000 013b41c0 00000000 00000000 01767e00 0015cf3d
Call Trace: 0013a83a 001425b6 00142633 0015cf3d 00194935 00143073 00142e08
0014d1ab 001381a2 0011b410 0011b9c6 0011aeef 00138a7b 0010a7c9
Code: 0a a0 00 f0 c3 e2 00 f0 0a a0 00 f0 0a a0 00 f0 54 ff 00 f0
Trace: 13a83a <_dev_queue_xmit+62/220>
Trace: 1425b6 <_ip_build_xmit+b3e/c50>
Trace: 142633 <_ip_build_xmit+bbb/c50>
Trace: 15cf3d <_inode_getblk+41/1a0>
Trace: 194935 <_clear_selection+d/50>
Trace: 143073 <_raw_sendto+17b/190>
Trace: 142e08 <_raw_getfrag>
Trace: 14d1ab <_inet_sendto+ab/d0>
Trace: 1381a2 <_sys_sendto+10a/130>
Trace: 11b410 <_share_page+e8/170>
Trace: 11b9c6 <_do_no_page+2ce/3e0>
Trace: 11aeef <_verify_area+27/180>
Trace: 138a7b <_sys_socketcall+203/330>
Trace: 10a7c9 <_system_call+59/a0>
Code: orb 0xe2c3f000(%eax),%ah
Code: addb %dh,%al
Code: orb 0xa00af000(%eax),%ah
Code: addb %dh,%al
Code: pushl %esp
Code: incl (%eax)
Not good. Can someone who understands the ethernet initialization code
take a look at this, please. I believe the problem is that if the
network hardware isn't detected, the ethernet device structure shouldn't
be allowed to stay on the linked list of all network interfaces. This
causes kernel segv's if someone actually tries to enable the
(not-present) eth0 interface, and it prevents a PCMCIA networking module
from working.
Thanks!!!
- Ted