diff options
-rw-r--r-- | arch/powerpc/platforms/pasemi/pci.c | 13 | ||||
-rw-r--r-- | arch/powerpc/platforms/pasemi/setup.c | 1 | ||||
-rw-r--r-- | drivers/net/pasemi_mac.c | 30 | ||||
-rw-r--r-- | drivers/net/pasemi_mac.h | 2 |
4 files changed, 23 insertions, 23 deletions
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c index 056243da360b..bbc6dfcfaa91 100644 --- a/arch/powerpc/platforms/pasemi/pci.c +++ b/arch/powerpc/platforms/pasemi/pci.c | |||
@@ -173,19 +173,6 @@ static void __init pas_fixup_phb_resources(void) | |||
173 | } | 173 | } |
174 | 174 | ||
175 | 175 | ||
176 | void __devinit pas_pci_irq_fixup(struct pci_dev *dev) | ||
177 | { | ||
178 | /* DMA is special, 84 interrupts (128 -> 211), all but 128 | ||
179 | * need to be mapped by hand here. | ||
180 | */ | ||
181 | if (dev->vendor == 0x1959 && dev->device == 0xa007) { | ||
182 | int i; | ||
183 | for (i = 129; i < 212; i++) | ||
184 | irq_create_mapping(NULL, i); | ||
185 | } | ||
186 | } | ||
187 | |||
188 | |||
189 | void __init pas_pci_init(void) | 176 | void __init pas_pci_init(void) |
190 | { | 177 | { |
191 | struct device_node *np, *root; | 178 | struct device_node *np, *root; |
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index f88f0ec4c8cb..5bdd6abd89c0 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c | |||
@@ -248,5 +248,4 @@ define_machine(pas) { | |||
248 | .calibrate_decr = generic_calibrate_decr, | 248 | .calibrate_decr = generic_calibrate_decr, |
249 | .progress = pas_progress, | 249 | .progress = pas_progress, |
250 | .machine_check_exception = pas_machine_check_handler, | 250 | .machine_check_exception = pas_machine_check_handler, |
251 | .pci_irq_fixup = pas_pci_irq_fixup, | ||
252 | }; | 251 | }; |
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index bde833542b6f..c7995d77ccfc 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include <linux/tcp.h> | 33 | #include <linux/tcp.h> |
34 | #include <net/checksum.h> | 34 | #include <net/checksum.h> |
35 | 35 | ||
36 | #include <asm/irq.h> | ||
37 | |||
36 | #include "pasemi_mac.h" | 38 | #include "pasemi_mac.h" |
37 | 39 | ||
38 | 40 | ||
@@ -531,6 +533,7 @@ static irqreturn_t pasemi_mac_tx_intr(int irq, void *data) | |||
531 | static int pasemi_mac_open(struct net_device *dev) | 533 | static int pasemi_mac_open(struct net_device *dev) |
532 | { | 534 | { |
533 | struct pasemi_mac *mac = netdev_priv(dev); | 535 | struct pasemi_mac *mac = netdev_priv(dev); |
536 | int base_irq; | ||
534 | unsigned int flags; | 537 | unsigned int flags; |
535 | int ret; | 538 | int ret; |
536 | 539 | ||
@@ -594,28 +597,37 @@ static int pasemi_mac_open(struct net_device *dev) | |||
594 | netif_start_queue(dev); | 597 | netif_start_queue(dev); |
595 | netif_poll_enable(dev); | 598 | netif_poll_enable(dev); |
596 | 599 | ||
597 | ret = request_irq(mac->dma_pdev->irq + mac->dma_txch, | 600 | /* Interrupts are a bit different for our DMA controller: While |
598 | &pasemi_mac_tx_intr, IRQF_DISABLED, | 601 | * it's got one a regular PCI device header, the interrupt there |
602 | * is really the base of the range it's using. Each tx and rx | ||
603 | * channel has it's own interrupt source. | ||
604 | */ | ||
605 | |||
606 | base_irq = virq_to_hw(mac->dma_pdev->irq); | ||
607 | |||
608 | mac->tx_irq = irq_create_mapping(NULL, base_irq + mac->dma_txch); | ||
609 | mac->rx_irq = irq_create_mapping(NULL, base_irq + 20 + mac->dma_txch); | ||
610 | |||
611 | ret = request_irq(mac->tx_irq, &pasemi_mac_tx_intr, IRQF_DISABLED, | ||
599 | mac->tx->irq_name, dev); | 612 | mac->tx->irq_name, dev); |
600 | if (ret) { | 613 | if (ret) { |
601 | dev_err(&mac->pdev->dev, "request_irq of irq %d failed: %d\n", | 614 | dev_err(&mac->pdev->dev, "request_irq of irq %d failed: %d\n", |
602 | mac->dma_pdev->irq + mac->dma_txch, ret); | 615 | base_irq + mac->dma_txch, ret); |
603 | goto out_tx_int; | 616 | goto out_tx_int; |
604 | } | 617 | } |
605 | 618 | ||
606 | ret = request_irq(mac->dma_pdev->irq + 20 + mac->dma_rxch, | 619 | ret = request_irq(mac->rx_irq, &pasemi_mac_rx_intr, IRQF_DISABLED, |
607 | &pasemi_mac_rx_intr, IRQF_DISABLED, | ||
608 | mac->rx->irq_name, dev); | 620 | mac->rx->irq_name, dev); |
609 | if (ret) { | 621 | if (ret) { |
610 | dev_err(&mac->pdev->dev, "request_irq of irq %d failed: %d\n", | 622 | dev_err(&mac->pdev->dev, "request_irq of irq %d failed: %d\n", |
611 | mac->dma_pdev->irq + 20 + mac->dma_rxch, ret); | 623 | base_irq + 20 + mac->dma_rxch, ret); |
612 | goto out_rx_int; | 624 | goto out_rx_int; |
613 | } | 625 | } |
614 | 626 | ||
615 | return 0; | 627 | return 0; |
616 | 628 | ||
617 | out_rx_int: | 629 | out_rx_int: |
618 | free_irq(mac->dma_pdev->irq + mac->dma_txch, dev); | 630 | free_irq(mac->tx_irq, dev); |
619 | out_tx_int: | 631 | out_tx_int: |
620 | netif_poll_disable(dev); | 632 | netif_poll_disable(dev); |
621 | netif_stop_queue(dev); | 633 | netif_stop_queue(dev); |
@@ -699,8 +711,8 @@ static int pasemi_mac_close(struct net_device *dev) | |||
699 | pci_write_config_dword(mac->dma_pdev, | 711 | pci_write_config_dword(mac->dma_pdev, |
700 | PAS_DMA_RXINT_RCMDSTA(mac->dma_if), 0); | 712 | PAS_DMA_RXINT_RCMDSTA(mac->dma_if), 0); |
701 | 713 | ||
702 | free_irq(mac->dma_pdev->irq + mac->dma_txch, dev); | 714 | free_irq(mac->tx_irq, dev); |
703 | free_irq(mac->dma_pdev->irq + 20 + mac->dma_rxch, dev); | 715 | free_irq(mac->rx_irq, dev); |
704 | 716 | ||
705 | /* Free resources */ | 717 | /* Free resources */ |
706 | pasemi_mac_free_rx_resources(dev); | 718 | pasemi_mac_free_rx_resources(dev); |
diff --git a/drivers/net/pasemi_mac.h b/drivers/net/pasemi_mac.h index c3e37e46a18a..703f1b0d434f 100644 --- a/drivers/net/pasemi_mac.h +++ b/drivers/net/pasemi_mac.h | |||
@@ -73,6 +73,8 @@ struct pasemi_mac { | |||
73 | 73 | ||
74 | struct pasemi_mac_txring *tx; | 74 | struct pasemi_mac_txring *tx; |
75 | struct pasemi_mac_rxring *rx; | 75 | struct pasemi_mac_rxring *rx; |
76 | unsigned long tx_irq; | ||
77 | unsigned long rx_irq; | ||
76 | }; | 78 | }; |
77 | 79 | ||
78 | /* Software status descriptor (desc_info) */ | 80 | /* Software status descriptor (desc_info) */ |