Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300552
b: refs/heads/master
c: a173460
h: refs/heads/master
v: v3
  • Loading branch information
Francois Romieu committed Apr 7, 2012
1 parent 6821606 commit 6d68b47
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 480c28642d794589b1279c06b9ef60f4a63acb59
refs/heads/master: a173460a6391ed5c38b63bcaedc6afc30f4de3b2
27 changes: 16 additions & 11 deletions trunk/drivers/net/ethernet/dec/tulip/tulip_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static void tulip_up(struct net_device *dev)
udelay(100);

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->tx_ring_dma, ioaddr + CSR4);
Expand Down Expand Up @@ -515,11 +515,13 @@ static void tulip_up(struct net_device *dev)
static int
tulip_open(struct net_device *dev)
{
struct tulip_private *tp = netdev_priv(dev);
int retval;

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)
goto free_ring;

Expand Down Expand Up @@ -841,7 +843,7 @@ static int tulip_close (struct net_device *dev)
netdev_dbg(dev, "Shutting down ethercard, status was %02x\n",
ioread32 (ioaddr + CSR5));

free_irq (dev->irq, dev);
free_irq (tp->pdev->irq, dev);

tulip_free_ring (dev);

Expand Down Expand Up @@ -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);

dev->base_addr = (unsigned long)ioaddr;

#ifdef CONFIG_TULIP_MWI
if (!force_csr0 && (tp->flags & HAS_PCI_MWI))
tulip_mwi_config (pdev, dev);
Expand Down Expand Up @@ -1650,7 +1650,6 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
for (i = 0; i < 6; i++)
last_phys_addr[i] = dev->dev_addr[i];
last_irq = irq;
dev->irq = irq;

/* The lower four bits are the media type. */
if (board_idx >= 0 && board_idx < MAX_UNITS) {
Expand Down Expand Up @@ -1858,7 +1857,8 @@ static int tulip_suspend (struct pci_dev *pdev, pm_message_t state)
tulip_down(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:
pci_save_state(pdev);
Expand Down Expand Up @@ -1900,7 +1900,9 @@ static int tulip_resume(struct pci_dev *pdev)
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");
return retval;
}
Expand Down Expand Up @@ -1960,11 +1962,14 @@ static void __devexit tulip_remove_one (struct pci_dev *pdev)

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
interrupt handler we have no other choice. */
disable_irq(dev->irq);
tulip_interrupt (dev->irq, dev);
enable_irq(dev->irq);
disable_irq(irq);
tulip_interrupt (irq, dev);
enable_irq(irq);
}
#endif

Expand Down

0 comments on commit 6d68b47

Please sign in to comment.