diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2012-03-09 13:13:48 -0500 |
---|---|---|
committer | Francois Romieu <romieu@fr.zoreil.com> | 2012-04-07 05:45:25 -0400 |
commit | 80777c54d2a6ebeff783b638e92fba40f0881ba5 (patch) | |
tree | 48aaaf771ba3849c78683459b4d283eeca6c717d /drivers/net/ethernet/neterion | |
parent | b5efab99ed92dd3b432e2f414d3979e8c2acd382 (diff) |
s2io: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/net/ethernet/neterion')
-rw-r--r-- | drivers/net/ethernet/neterion/s2io.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c index 22a8de00bf02..eb2ab048cbca 100644 --- a/drivers/net/ethernet/neterion/s2io.c +++ b/drivers/net/ethernet/neterion/s2io.c | |||
@@ -2847,6 +2847,7 @@ static int s2io_poll_inta(struct napi_struct *napi, int budget) | |||
2847 | static void s2io_netpoll(struct net_device *dev) | 2847 | static void s2io_netpoll(struct net_device *dev) |
2848 | { | 2848 | { |
2849 | struct s2io_nic *nic = netdev_priv(dev); | 2849 | struct s2io_nic *nic = netdev_priv(dev); |
2850 | const int irq = nic->pdev->irq; | ||
2850 | struct XENA_dev_config __iomem *bar0 = nic->bar0; | 2851 | struct XENA_dev_config __iomem *bar0 = nic->bar0; |
2851 | u64 val64 = 0xFFFFFFFFFFFFFFFFULL; | 2852 | u64 val64 = 0xFFFFFFFFFFFFFFFFULL; |
2852 | int i; | 2853 | int i; |
@@ -2856,7 +2857,7 @@ static void s2io_netpoll(struct net_device *dev) | |||
2856 | if (pci_channel_offline(nic->pdev)) | 2857 | if (pci_channel_offline(nic->pdev)) |
2857 | return; | 2858 | return; |
2858 | 2859 | ||
2859 | disable_irq(dev->irq); | 2860 | disable_irq(irq); |
2860 | 2861 | ||
2861 | writeq(val64, &bar0->rx_traffic_int); | 2862 | writeq(val64, &bar0->rx_traffic_int); |
2862 | writeq(val64, &bar0->tx_traffic_int); | 2863 | writeq(val64, &bar0->tx_traffic_int); |
@@ -2885,7 +2886,7 @@ static void s2io_netpoll(struct net_device *dev) | |||
2885 | break; | 2886 | break; |
2886 | } | 2887 | } |
2887 | } | 2888 | } |
2888 | enable_irq(dev->irq); | 2889 | enable_irq(irq); |
2889 | } | 2890 | } |
2890 | #endif | 2891 | #endif |
2891 | 2892 | ||
@@ -3898,9 +3899,7 @@ static void remove_msix_isr(struct s2io_nic *sp) | |||
3898 | 3899 | ||
3899 | static void remove_inta_isr(struct s2io_nic *sp) | 3900 | static void remove_inta_isr(struct s2io_nic *sp) |
3900 | { | 3901 | { |
3901 | struct net_device *dev = sp->dev; | 3902 | free_irq(sp->pdev->irq, sp->dev); |
3902 | |||
3903 | free_irq(sp->pdev->irq, dev); | ||
3904 | } | 3903 | } |
3905 | 3904 | ||
3906 | /* ********************************************************* * | 3905 | /* ********************************************************* * |
@@ -7047,7 +7046,7 @@ static int s2io_add_isr(struct s2io_nic *sp) | |||
7047 | } | 7046 | } |
7048 | } | 7047 | } |
7049 | if (sp->config.intr_type == INTA) { | 7048 | if (sp->config.intr_type == INTA) { |
7050 | err = request_irq((int)sp->pdev->irq, s2io_isr, IRQF_SHARED, | 7049 | err = request_irq(sp->pdev->irq, s2io_isr, IRQF_SHARED, |
7051 | sp->name, dev); | 7050 | sp->name, dev); |
7052 | if (err) { | 7051 | if (err) { |
7053 | DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n", | 7052 | DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n", |
@@ -7909,9 +7908,6 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
7909 | goto bar1_remap_failed; | 7908 | goto bar1_remap_failed; |
7910 | } | 7909 | } |
7911 | 7910 | ||
7912 | dev->irq = pdev->irq; | ||
7913 | dev->base_addr = (unsigned long)sp->bar0; | ||
7914 | |||
7915 | /* Initializing the BAR1 address as the start of the FIFO pointer. */ | 7911 | /* Initializing the BAR1 address as the start of the FIFO pointer. */ |
7916 | for (j = 0; j < MAX_TX_FIFOS; j++) { | 7912 | for (j = 0; j < MAX_TX_FIFOS; j++) { |
7917 | mac_control->tx_FIFO_start[j] = sp->bar1 + (j * 0x00020000); | 7913 | mac_control->tx_FIFO_start[j] = sp->bar1 + (j * 0x00020000); |