diff options
author | Chas Williams <chas@cmf.nrl.navy.mil> | 2008-01-07 03:26:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-09 02:30:01 -0500 |
commit | 52961955aa180959158faeb9fd6b4f8a591450f5 (patch) | |
tree | 6139c989d4a5f348e2b69185ea797f0a8d67bff5 | |
parent | c6a1b62de9d043f274ec3ae2e207908c6d5feff3 (diff) |
[ATM]: [nicstar] delay irq setup until card is configured
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
-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 14ced85b3f54..0c205b000e8b 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c | |||
@@ -625,14 +625,6 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev) | |||
625 | if (mac[i] == NULL) | 625 | if (mac[i] == NULL) |
626 | nicstar_init_eprom(card->membase); | 626 | nicstar_init_eprom(card->membase); |
627 | 627 | ||
628 | if (request_irq(pcidev->irq, &ns_irq_handler, IRQF_DISABLED | IRQF_SHARED, "nicstar", card) != 0) | ||
629 | { | ||
630 | printk("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq); | ||
631 | error = 9; | ||
632 | ns_init_card_error(card, error); | ||
633 | return error; | ||
634 | } | ||
635 | |||
636 | /* Set the VPI/VCI MSb mask to zero so we can receive OAM cells */ | 628 | /* Set the VPI/VCI MSb mask to zero so we can receive OAM cells */ |
637 | writel(0x00000000, card->membase + VPM); | 629 | writel(0x00000000, card->membase + VPM); |
638 | 630 | ||
@@ -858,8 +850,6 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev) | |||
858 | card->iovpool.count++; | 850 | card->iovpool.count++; |
859 | } | 851 | } |
860 | 852 | ||
861 | card->intcnt = 0; | ||
862 | |||
863 | /* Configure NICStAR */ | 853 | /* Configure NICStAR */ |
864 | if (card->rct_size == 4096) | 854 | if (card->rct_size == 4096) |
865 | ns_cfg_rctsize = NS_CFG_RCTSIZE_4096_ENTRIES; | 855 | ns_cfg_rctsize = NS_CFG_RCTSIZE_4096_ENTRIES; |
@@ -868,6 +858,15 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev) | |||
868 | 858 | ||
869 | card->efbie = 1; | 859 | card->efbie = 1; |
870 | 860 | ||
861 | card->intcnt = 0; | ||
862 | if (request_irq(pcidev->irq, &ns_irq_handler, IRQF_DISABLED | IRQF_SHARED, "nicstar", card) != 0) | ||
863 | { | ||
864 | printk("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq); | ||
865 | error = 9; | ||
866 | ns_init_card_error(card, error); | ||
867 | return error; | ||
868 | } | ||
869 | |||
871 | /* Register device */ | 870 | /* Register device */ |
872 | card->atmdev = atm_dev_register("nicstar", &atm_ops, -1, NULL); | 871 | card->atmdev = atm_dev_register("nicstar", &atm_ops, -1, NULL); |
873 | if (card->atmdev == NULL) | 872 | if (card->atmdev == NULL) |