Skip to content

Commit 8a8037a

Browse files
chas williamsherbertx
authored andcommitted
[ATM]: [he] initialize lock and tasklet earlier
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>
1 parent 3660019 commit 8a8037a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎drivers/atm/he.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,11 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
394394
he_dev->atm_dev->dev_data = he_dev;
395395
atm_dev->dev_data = he_dev;
396396
he_dev->number = atm_dev->number;
397+
#ifdef USE_TASKLET
398+
tasklet_init(&he_dev->tasklet, he_tasklet, (unsigned long) he_dev);
399+
#endif
400+
spin_lock_init(&he_dev->global_lock);
401+
397402
if (he_start(atm_dev)) {
398403
he_stop(he_dev);
399404
err = -ENODEV;
@@ -1173,11 +1178,6 @@ he_start(struct atm_dev *dev)
11731178
if ((err = he_init_irq(he_dev)) != 0)
11741179
return err;
11751180

1176-
#ifdef USE_TASKLET
1177-
tasklet_init(&he_dev->tasklet, he_tasklet, (unsigned long) he_dev);
1178-
#endif
1179-
spin_lock_init(&he_dev->global_lock);
1180-
11811181
/* 4.11 enable pci bus controller state machines */
11821182
host_cntl |= (OUTFF_ENB | CMDFF_ENB |
11831183
QUICK_RD_RETRY | QUICK_WR_RETRY | PERR_INT_ENB);

0 commit comments

Comments
 (0)