Skip to content

Commit 8d1b1fc

Browse files
haokexindavem330
authored andcommitted
net: add net poll support for atl2 driver
Add netconsole support for Atheros L2 10/100 network device. Signed-off-by: Kevin Hao <[email protected]> Acked-by: Jay Cliburn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6fbc779 commit 8d1b1fc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/net/atlx/atl2.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,15 @@ static void atl2_setup_pcicmd(struct pci_dev *pdev)
13291329
pci_write_config_dword(pdev, REG_PM_CTRLSTAT, 0);
13301330
}
13311331

1332+
#ifdef CONFIG_NET_POLL_CONTROLLER
1333+
static void atl2_poll_controller(struct net_device *netdev)
1334+
{
1335+
disable_irq(netdev->irq);
1336+
atl2_intr(netdev->irq, netdev);
1337+
enable_irq(netdev->irq);
1338+
}
1339+
#endif
1340+
13321341
/*
13331342
* atl2_probe - Device Initialization Routine
13341343
* @pdev: PCI device information struct
@@ -1412,6 +1421,9 @@ static int __devinit atl2_probe(struct pci_dev *pdev,
14121421
netdev->do_ioctl = &atl2_ioctl;
14131422
atl2_set_ethtool_ops(netdev);
14141423

1424+
#ifdef CONFIG_NET_POLL_CONTROLLER
1425+
netdev->poll_controller = atl2_poll_controller;
1426+
#endif
14151427
#ifdef HAVE_TX_TIMEOUT
14161428
netdev->tx_timeout = &atl2_tx_timeout;
14171429
netdev->watchdog_timeo = 5 * HZ;

0 commit comments

Comments
 (0)