Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChas Williams <chas@cmf.nrl.navy.mil>2007-12-09 18:38:22 +0100
committerAdrian Bunk <bunk@kernel.org>2008-01-06 04:18:59 +0200
commite296897180ce12ecb991c14f9652e74269b03216 (patch)
tree03e4053e085ef48c5b4825bd5a513e61fc390152
parentd808e724a4f4b8531c7fb8722e0e60100b3cb1c2 (diff)
[ATM]: [he] initialize lock and tasklet earlier
[ Upstream commit: 8a8037ac9dbe4eb20ce50aa20244faf77444f4a3 ] 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> Signed-off-by: Adrian Bunk <bunk@kernel.org>
-rw-r--r--drivers/atm/he.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index fde9334059af..dbe321ebb430 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -397,6 +397,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;
@@ -1176,11 +1181,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);