Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a8037ac authored by chas williams's avatar chas williams Committed by Herbert Xu
Browse files

[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: default avatarchas williams <chas@cmf.nrl.navy.mil>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 3660019e
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -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;
	he_dev->atm_dev->dev_data = he_dev;
	atm_dev->dev_data = he_dev;
	atm_dev->dev_data = he_dev;
	he_dev->number = atm_dev->number;
	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)) {
	if (he_start(atm_dev)) {
		he_stop(he_dev);
		he_stop(he_dev);
		err = -ENODEV;
		err = -ENODEV;
@@ -1173,11 +1178,6 @@ he_start(struct atm_dev *dev)
	if ((err = he_init_irq(he_dev)) != 0)
	if ((err = he_init_irq(he_dev)) != 0)
		return err;
		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 */
	/* 4.11 enable pci bus controller state machines */
	host_cntl |= (OUTFF_ENB | CMDFF_ENB |
	host_cntl |= (OUTFF_ENB | CMDFF_ENB |
				QUICK_RD_RETRY | QUICK_WR_RETRY | PERR_INT_ENB);
				QUICK_RD_RETRY | QUICK_WR_RETRY | PERR_INT_ENB);