#29 CardBus 3c575CT - freeze on startup

closed-accepted
nobody
bug fixes (18)
5
2002-04-25
2002-04-24
Piotr Kasprzyk
No

I have ToPIC97 PCMCIA controller and 3Com Cardbus 3C575CT card.
The "/etc/rc.d/init.d/pcmcia start" freezed sometimes.
I tracked the problem to uninitialized "vp->lock":
Sometimes the function "vortex_get_stats()" (lock is used) is called before
the function "vortex_up()" (lock is initialized by "vp->lock = SPIN_LOCK_UNLOCKED;").

Tested on ToPIC95-B, ToPIC97.
Tested on kernel 2.0.38, 2.4.18.

Piotr Kasprzyk
diff -r -u pcmcia-cs-3.1.33/clients/3c575_cb.c pcmcia-cs-3.1.33_new/clients/3c575_cb.c
--- pcmcia-cs-3.1.33/clients/3c575_cb.c Sat Oct 13 02:08:50 2001
+++ pcmcia-cs-3.1.33_new/clients/3c575_cb.c Mon Apr 22 20:32:42 2002
@@ -691,6 +691,7 @@

dev->priv = vp = (void *)(((long)priv_mem + PRIV_ALIGN) & ~PRIV_ALIGN);
memset(vp, 0, sizeof(*vp));
+ vp->lock = SPIN_LOCK_UNLOCKED;
vp->priv_addr = priv_mem;

vp->next_module = root_vortex_dev;
@@ -905,7 +906,6 @@

acpi_wake(vp->pci_bus, vp->pci_devfn);

- vp->lock = SPIN_LOCK_UNLOCKED;
activate_xcvr(dev);

/* Before initializing select the active media port. */

Discussion

  • David Hinds
    David Hinds
    2002-04-25

    • status: open --> closed-accepted
     
  • David Hinds
    David Hinds
    2002-04-25

    Logged In: YES
    user_id=7760

    Thanks, great work!

    - Dave