diff options
author | Chas Williams <chas@cmf.nrl.navy.mil> | 2008-01-20 21:43:46 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@kernel.org> | 2008-01-20 21:43:46 +0200 |
commit | 52f6ca5fd3ee8658e72a901bce6d91eaa7940c6b (patch) | |
tree | 915f29d83e928adba47af4ca90e727942aa947d5 | |
parent | ac3cb3e487a980ccade6650b85ce845e875af91b (diff) |
[ATM]: [nicstar] delay irq setup until card is configured
[ Upstream commit: 52961955aa180959158faeb9fd6b4f8a591450f5 ]
Adrian Bunk:
Backported to 2.6.16.
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
-rw-r--r-- | drivers/atm/nicstar.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index 074abc81ec3d..88e52e147590 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c @@ -626,14 +626,6 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev) if (mac[i] == NULL) nicstar_init_eprom(card->membase); - if (request_irq(pcidev->irq, &ns_irq_handler, SA_INTERRUPT | SA_SHIRQ, "nicstar", card) != 0) - { - printk("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq); - error = 9; - ns_init_card_error(card, error); - return error; - } - /* Set the VPI/VCI MSb mask to zero so we can receive OAM cells */ writel(0x00000000, card->membase + VPM); @@ -859,8 +851,6 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev) card->iovpool.count++; } - card->intcnt = 0; - /* Configure NICStAR */ if (card->rct_size == 4096) ns_cfg_rctsize = NS_CFG_RCTSIZE_4096_ENTRIES; @@ -869,6 +859,15 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev) card->efbie = 1; + card->intcnt = 0; + if (request_irq(pcidev->irq, &ns_irq_handler, SA_INTERRUPT | SA_SHIRQ, "nicstar", card) != 0) + { + printk("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq); + error = 9; + ns_init_card_error(card, error); + return error; + } + /* Register device */ card->atmdev = atm_dev_register("nicstar", &atm_ops, -1, NULL); if (card->atmdev == NULL) |