2.6.x kernels & PCI-to-PCMCIA bridges [again]

jar jar at pcuf.fi
Sun May 30 13:34:46 EDT 2004


komujun at nifty.com wrote:
> Dear all
> 
> I updated the PD6729 driver.
> 
> Changes.
> (1)use allocated data for the socket information.
> (2)pass the socket structure instead of socket number.
> (3)fix memory leakage.

At fist boot the PD6729 driver loads OK. But after that doing "pcmcia
stop/start" several times, following happens:

1) Sometimes it success

2) Once I saw dmesg printed:

pd6729: infinite eventloop in interrupt
pd6729: infinite eventloop in interrupt
pd6729: infinite eventloop in interrupt
pd6729: infinite eventloop in interrupt
pd6729: infinite eventloop in interrupt
....

3) But usually kernel panics:May 30 20:09:52

gw1 kernel: Linux Kernel Card Services
May 30 20:09:52 gw1 kernel:   options:  [pci] [cardbus] [pm]
May 30 20:09:52 gw1 kernel: PCI: Found IRQ 5 for device 0000:00:0b.0
May 30 20:09:52 gw1 kernel: pd6729: Cirrus PD6729 PCI to PCMCIA Bridge
at 0xd800 on irq 5
May 30 20:09:52 gw1 kernel: pd6729: configured as a 2 socket device.
May 30 20:09:53 gw1 kernel: cs: IO port probe 0x0c00-0x0cff: clean.
May 30 20:09:53 gw1 kernel: cs: IO port probe 0x0100-0x04ff: excluding
0x170-0x177 0x370-0x37f 0x4d0-0x4d7
May 30 20:09:53 gw1 kernel: cs: IO port probe 0x0a00-0x0aff: clean.
May 30 20:09:53 gw1 kernel: cs: memory probe 0x0d0000-0x0dffff: clean.
May 30 20:09:54 gw1 kernel: hostap_crypt: registered algorithm 'NULL'
May 30 20:09:54Config has no IRQ info, but trying to enable IRQ anyway..
 gw1 kernel: hostap_cs: 0.1.3 - 2004-02-08 (Jouni Malinen
<jkmaline at cc.hut.fi>)
May 30 20:09:54 gw1 kernel: hostap_cs: setting Vcc=33 (constant)
May 30 20:09:54 gw1 kernel: hostap_cs: CS_EVENT_CARD_INSERTION
May 30 20:09:54 gw1 kernel: hostap_cs: setting Vcc=33 (fromUnable to
handle kernel NULL pointer dereference at virtual address 00000001
 printing eip:
c0116f28
*pde = 03371067
Oops: 0000 [#1]
CPU:    0
EIP:    0060:[<c0116f28>]    Not tainted
EFLAGS: 00010013   (2.6.5-1.358)
EIP is at __wake_up_common+0x14/0x50
eax: 00000001   ebx: 00000296   ecx: 00000001   edx: 00000003
esi: 00000001   edi: c102a6e8   ebp: c034dfa8   esp: c034df90
ds: 007b   es: 007b   ss: 0068
Process klogd (pid: 1163, threadinfo=c034d000 task=c10e8130)
Stack: 000178f0 70a26b67 00000003 00000296 000000a0 c3ac461c c034dfb8
c0116f72
       00000000 00000000 00000000 c4838202 00000000 00000001 00000001
c3ac457c
       04000001 00000000 00000005 c0106e9a c0056f08 c034d000 00000005
c031e280
Call Trace:
 [<c0116f72>] __wake_up+0xe/0x16
 [<c4838202>] pd6729_interrupt+0xb2/0xd7 [pd6729]
 [<c0106e9a>] handle_IRQ_event+0x28/0x48
 [<c010712d>] do_IRQ+0xf3/0x169
 =======================
 [<c0287338>] common_interrupt+0x18/0x20
 [<c011962a>] do_syslog+0x14e/0x2f1
 [<c0116f08>] default_wake_function+0x0/0xc
 [<c0142d23>] vfs_read+0xb8/0xe4
 [<c0142efc>] sys_read+0x2c/0x42
 [<c0287147>] syscall_call+0x7/0xb

Code: 8b 10 89 55 ec 74 2d 8d 58 f4 8b 4d 08 8b 40 f4 8b 55 f0 89
  config)
May 3<0>Kernel panic: Fatal exception in interrupt
0 20:09:54 gw1 kIn interrupt handler - not syncing
ernel: Checking  CFTABLE_ENTRY 0x01 (default 0x01)
May 30 20:09:54 gw1 kernel: Config has no IRQ info, but trying to enable
IRQ anyway..
May 30 20:09:54 gw1 kernel: IO window settings: cfg->io.nwin=1
dflt.io.nwin=1
May 30 20:09:54 gw1 kernel: io->flags = 0x0046, io.base=0x0000, len=64
May 30 20:09:54 gw1 kernel: hostap_cs: index 0x01: Vcc 3.3, irq 5, io
0x0100-0x013f

or

May 30 20:18:23 gw1 kernel: Linux Kernel Card Services
May 30 20:18:23 gw1 kernel:   options:  [pci] [cardbus] [pm]
May 30 20:18:23 gw1 kernel: PCI: Found IRQ 5 for device 0000:00:0b.0
May 30 20:18:23 gw1 kernel: pd6729: Cirrus PD6729 PCI to PCMCIA Bridge.
May 30 20:18:23 gw1 kernel: pd6729: configured as a 2 socket device.
May 30 20:18:26 gw1 kernel: cs: IO port probe 0x0c00-0x0cff: clean.
May 30 20:18:26 gw1 kernel: cs: IO port probe 0x0100-0x04ff: excluding
0x170-0x177 0x370-0x37f 0x4d0-0x4d7
May 30 20:18:26 gw1 kernel: cs: IO port probe 0x0a00-0x0aff: clean.
May 30 20:18:26 gw1 kernel: cs: memory probe 0x0d0000-0x0dffff: clean.
May 30 20:18:26 gw1 kernel: hostap_crypt: registered algorithm 'NULL'
May 30 20:18:27Config has no IRQ info, but trying to enable IRQ anyway..
 gw1 kernel: hostap_cs: 0.1.3 - 2004-02-08 (Jouni Malinen
<jkmaline at cc.hut.fi>)
May 30 20:18:27 gw1 kernel: hostap_cs: setting Vcc=33 (constant)
May 30 20:18Unable to handle kernel paging request:27 gw1 kernel:  at
virtual address c4838150
hostap_cs: CS_EV printing eip:
ENT_CARD_INSERTIc4838150
ON
May 30 20:1*pde = 010df067
8:27 gw1 kernel:Oops: 0000 [#1]
CPU:    0
EIP:    0060:[<c4838150>]    Not tainted
EFLAGS: 00010202   (2.6.5-1.358)
EIP is at 0xc4838150
eax: 00000005   ebx: c12bf57c   ecx: c1d51f74   edx: c12bf61c
esi: 04000001   edi: 00000000   ebp: 00000005   esp: c034dfdc
ds: 007b   es: 007b   ss: 0068
Process net.agent (pid: 2725, threadinfo=c034d000 task=c0ec38b0)
Stack: c0106e9a c1d51f58 c034d000 00000005 c031e280 c010712d 00000005
c1d51f74
       c12bf57c
Call Trace:
 [<c0106e9a>] handle_IRQ_event+0x28/0x48
 [<c010712d>] do_IRQ+0xf3/0x169
 =======================
 [<c0287338>] common_interrupt+0x18/0x20
 [<c0143a36>] __fput+0xce/0xd1
 [<c01426d8>] filp_close+0x5a/0x60
 [<c0287147>] syscall_call+0x7/0xb

Code:  Bad EIP value.
  hostap_cs: sett<0>Kernel panic: Fatal exception in interrupt
ing Vcc=33 (fromIn interrupt handler - not syncing
 config)
May 30 20:18:27 gw1 kernel: Checking CFTABLE_ENTRY 0x01 (default 0x01)
May 30 20:18:27 gw1 kernel: Config has no IRQ info, but trying to enable
IRQ anyway..


pcmcia srart is done like the original pcmcia init sript

pcmcia stop is done like below (first cardctl eject and 1s sleep):

stop)
        echo -n "Shutting down PCMCIA services: "
        if [ -s /var/run/cardmgr.pid ] ; then
            PID=`cat /var/run/cardmgr.pid`
            kill $PID
            # Give cardmgr a few seconds to handle the signal
            for N in 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 ; do
                kill -0 $PID 2>/dev/null || break
                sleep 2
            done
        fi
        killall -q "CardBus Watcher"
        if grep -q "ds " /proc/modules ; then
            /sbin/cardctl eject && /bin/sleep 1
            /sbin/rmmod ds
            /sbin/rmmod $PCIC 2>/dev/null || \
                /sbin/rmmod yenta_socket 2>/dev/null
            /sbin/rmmod pcmcia_core
        fi
        echo "done."
        rm -f /var/lock/subsys/pcmcia


Best Regards, Jar



More information about the linux-pcmcia mailing list