Commit a173460a authored by Francois Romieu's avatar Francois Romieu

tulip_core: stop using net_device.{base_addr, irq}.

Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
Ack-by: default avatarGrant Grundler <grundler@parisc-linux.org>
parent 480c2864
...@@ -328,7 +328,7 @@ static void tulip_up(struct net_device *dev) ...@@ -328,7 +328,7 @@ static void tulip_up(struct net_device *dev)
udelay(100); udelay(100);
if (tulip_debug > 1) if (tulip_debug > 1)
netdev_dbg(dev, "tulip_up(), irq==%d\n", dev->irq); netdev_dbg(dev, "tulip_up(), irq==%d\n", tp->pdev->irq);
iowrite32(tp->rx_ring_dma, ioaddr + CSR3); iowrite32(tp->rx_ring_dma, ioaddr + CSR3);
iowrite32(tp->tx_ring_dma, ioaddr + CSR4); iowrite32(tp->tx_ring_dma, ioaddr + CSR4);
...@@ -515,11 +515,13 @@ static void tulip_up(struct net_device *dev) ...@@ -515,11 +515,13 @@ static void tulip_up(struct net_device *dev)
static int static int
tulip_open(struct net_device *dev) tulip_open(struct net_device *dev)
{ {
struct tulip_private *tp = netdev_priv(dev);
int retval; int retval;
tulip_init_ring (dev); tulip_init_ring (dev);
retval = request_irq(dev->irq, tulip_interrupt, IRQF_SHARED, dev->name, dev); retval = request_irq(tp->pdev->irq, tulip_interrupt, IRQF_SHARED,
dev->name, dev);
if (retval) if (retval)
goto free_ring; goto free_ring;
...@@ -841,7 +843,7 @@ static int tulip_close (struct net_device *dev) ...@@ -841,7 +843,7 @@ static int tulip_close (struct net_device *dev)
netdev_dbg(dev, "Shutting down ethercard, status was %02x\n", netdev_dbg(dev, "Shutting down ethercard, status was %02x\n",
ioread32 (ioaddr + CSR5)); ioread32 (ioaddr + CSR5));
free_irq (dev->irq, dev); free_irq (tp->pdev->irq, dev);
tulip_free_ring (dev); tulip_free_ring (dev);
...@@ -1489,8 +1491,6 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, ...@@ -1489,8 +1491,6 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
INIT_WORK(&tp->media_work, tulip_tbl[tp->chip_id].media_task); INIT_WORK(&tp->media_work, tulip_tbl[tp->chip_id].media_task);
dev->base_addr = (unsigned long)ioaddr;
#ifdef CONFIG_TULIP_MWI #ifdef CONFIG_TULIP_MWI
if (!force_csr0 && (tp->flags & HAS_PCI_MWI)) if (!force_csr0 && (tp->flags & HAS_PCI_MWI))
tulip_mwi_config (pdev, dev); tulip_mwi_config (pdev, dev);
...@@ -1650,7 +1650,6 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, ...@@ -1650,7 +1650,6 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
last_phys_addr[i] = dev->dev_addr[i]; last_phys_addr[i] = dev->dev_addr[i];
last_irq = irq; last_irq = irq;
dev->irq = irq;
/* The lower four bits are the media type. */ /* The lower four bits are the media type. */
if (board_idx >= 0 && board_idx < MAX_UNITS) { if (board_idx >= 0 && board_idx < MAX_UNITS) {
...@@ -1858,7 +1857,8 @@ static int tulip_suspend (struct pci_dev *pdev, pm_message_t state) ...@@ -1858,7 +1857,8 @@ static int tulip_suspend (struct pci_dev *pdev, pm_message_t state)
tulip_down(dev); tulip_down(dev);
netif_device_detach(dev); netif_device_detach(dev);
free_irq(dev->irq, dev); /* FIXME: it needlessly adds an error path. */
free_irq(tp->pdev->irq, dev);
save_state: save_state:
pci_save_state(pdev); pci_save_state(pdev);
...@@ -1900,7 +1900,9 @@ static int tulip_resume(struct pci_dev *pdev) ...@@ -1900,7 +1900,9 @@ static int tulip_resume(struct pci_dev *pdev)
return retval; return retval;
} }
if ((retval = request_irq(dev->irq, tulip_interrupt, IRQF_SHARED, dev->name, dev))) { retval = request_irq(pdev->irq, tulip_interrupt, IRQF_SHARED,
dev->name, dev);
if (retval) {
pr_err("request_irq failed in resume\n"); pr_err("request_irq failed in resume\n");
return retval; return retval;
} }
...@@ -1960,11 +1962,14 @@ static void __devexit tulip_remove_one (struct pci_dev *pdev) ...@@ -1960,11 +1962,14 @@ static void __devexit tulip_remove_one (struct pci_dev *pdev)
static void poll_tulip (struct net_device *dev) static void poll_tulip (struct net_device *dev)
{ {
struct tulip_private *tp = netdev_priv(dev);
const int irq = tp->pdev->irq;
/* disable_irq here is not very nice, but with the lockless /* disable_irq here is not very nice, but with the lockless
interrupt handler we have no other choice. */ interrupt handler we have no other choice. */
disable_irq(dev->irq); disable_irq(irq);
tulip_interrupt (dev->irq, dev); tulip_interrupt (irq, dev);
enable_irq(dev->irq); enable_irq(irq);
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment