]> err.no Git - linux-2.6/commitdiff
[ATM]: [he] initialize lock and tasklet earlier
authorchas williams <chas@cmf.nrl.navy.mil>
Tue, 27 Nov 2007 03:03:16 +0000 (11:03 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 27 Nov 2007 03:03:16 +0000 (11:03 +0800)
if you are lucky (unlucky?) enough to have shared interrupts, the
interrupt handler can be called before the tasklet and lock are ready
for use.

Signed-off-by: chas williams <chas@cmf.nrl.navy.mil>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/atm/he.c

index d33aba6864c247e34a05f3dd94db131a2c62fc50..3b64a99772ea826187dbc792875332722f77f94b 100644 (file)
@@ -394,6 +394,11 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
        he_dev->atm_dev->dev_data = he_dev;
        atm_dev->dev_data = he_dev;
        he_dev->number = atm_dev->number;
+#ifdef USE_TASKLET
+       tasklet_init(&he_dev->tasklet, he_tasklet, (unsigned long) he_dev);
+#endif
+       spin_lock_init(&he_dev->global_lock);
+
        if (he_start(atm_dev)) {
                he_stop(he_dev);
                err = -ENODEV;
@@ -1173,11 +1178,6 @@ he_start(struct atm_dev *dev)
        if ((err = he_init_irq(he_dev)) != 0)
                return err;
 
-#ifdef USE_TASKLET
-       tasklet_init(&he_dev->tasklet, he_tasklet, (unsigned long) he_dev);
-#endif
-       spin_lock_init(&he_dev->global_lock);
-
        /* 4.11 enable pci bus controller state machines */
        host_cntl |= (OUTFF_ENB | CMDFF_ENB |
                                QUICK_RD_RETRY | QUICK_WR_RETRY | PERR_INT_ENB);