diff options
Diffstat (limited to 'drivers/net/lasi_82596.c')
-rw-r--r-- | drivers/net/lasi_82596.c | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c index 41bad07ac1ac..f7b7238d8352 100644 --- a/drivers/net/lasi_82596.c +++ b/drivers/net/lasi_82596.c | |||
@@ -415,6 +415,10 @@ static int rx_ring_size = RX_RING_SIZE; | |||
415 | static int ticks_limit = 100; | 415 | static int ticks_limit = 100; |
416 | static int max_cmd_backlog = TX_RING_SIZE-1; | 416 | static int max_cmd_backlog = TX_RING_SIZE-1; |
417 | 417 | ||
418 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
419 | static void i596_poll_controller(struct net_device *dev); | ||
420 | #endif | ||
421 | |||
418 | 422 | ||
419 | static inline void CA(struct net_device *dev) | 423 | static inline void CA(struct net_device *dev) |
420 | { | 424 | { |
@@ -636,11 +640,11 @@ static int init_i596_mem(struct net_device *dev) | |||
636 | 640 | ||
637 | disable_irq(dev->irq); /* disable IRQs from LAN */ | 641 | disable_irq(dev->irq); /* disable IRQs from LAN */ |
638 | DEB(DEB_INIT, | 642 | DEB(DEB_INIT, |
639 | printk("RESET 82596 port: %p (with IRQ %d disabled)\n", | 643 | printk("RESET 82596 port: %lx (with IRQ %d disabled)\n", |
640 | (void*)(dev->base_addr + PA_I82596_RESET), | 644 | (dev->base_addr + PA_I82596_RESET), |
641 | dev->irq)); | 645 | dev->irq)); |
642 | 646 | ||
643 | gsc_writel(0, (void*)(dev->base_addr + PA_I82596_RESET)); /* Hard Reset */ | 647 | gsc_writel(0, (dev->base_addr + PA_I82596_RESET)); /* Hard Reset */ |
644 | udelay(100); /* Wait 100us - seems to help */ | 648 | udelay(100); /* Wait 100us - seems to help */ |
645 | 649 | ||
646 | /* change the scp address */ | 650 | /* change the scp address */ |
@@ -1209,6 +1213,9 @@ static int __devinit i82596_probe(struct net_device *dev, | |||
1209 | dev->set_multicast_list = set_multicast_list; | 1213 | dev->set_multicast_list = set_multicast_list; |
1210 | dev->tx_timeout = i596_tx_timeout; | 1214 | dev->tx_timeout = i596_tx_timeout; |
1211 | dev->watchdog_timeo = TX_TIMEOUT; | 1215 | dev->watchdog_timeo = TX_TIMEOUT; |
1216 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
1217 | dev->poll_controller = i596_poll_controller; | ||
1218 | #endif | ||
1212 | 1219 | ||
1213 | dev->priv = (void *)(dev->mem_start); | 1220 | dev->priv = (void *)(dev->mem_start); |
1214 | 1221 | ||
@@ -1242,6 +1249,14 @@ static int __devinit i82596_probe(struct net_device *dev, | |||
1242 | return 0; | 1249 | return 0; |
1243 | } | 1250 | } |
1244 | 1251 | ||
1252 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
1253 | static void i596_poll_controller(struct net_device *dev) | ||
1254 | { | ||
1255 | disable_irq(dev->irq); | ||
1256 | i596_interrupt(dev->irq, dev, NULL); | ||
1257 | enable_irq(dev->irq); | ||
1258 | } | ||
1259 | #endif | ||
1245 | 1260 | ||
1246 | static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 1261 | static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
1247 | { | 1262 | { |
@@ -1528,17 +1543,18 @@ lan_init_chip(struct parisc_device *dev) | |||
1528 | 1543 | ||
1529 | if (!dev->irq) { | 1544 | if (!dev->irq) { |
1530 | printk(KERN_ERR "%s: IRQ not found for i82596 at 0x%lx\n", | 1545 | printk(KERN_ERR "%s: IRQ not found for i82596 at 0x%lx\n", |
1531 | __FILE__, dev->hpa); | 1546 | __FILE__, dev->hpa.start); |
1532 | return -ENODEV; | 1547 | return -ENODEV; |
1533 | } | 1548 | } |
1534 | 1549 | ||
1535 | printk(KERN_INFO "Found i82596 at 0x%lx, IRQ %d\n", dev->hpa, dev->irq); | 1550 | printk(KERN_INFO "Found i82596 at 0x%lx, IRQ %d\n", dev->hpa.start, |
1551 | dev->irq); | ||
1536 | 1552 | ||
1537 | netdevice = alloc_etherdev(0); | 1553 | netdevice = alloc_etherdev(0); |
1538 | if (!netdevice) | 1554 | if (!netdevice) |
1539 | return -ENOMEM; | 1555 | return -ENOMEM; |
1540 | 1556 | ||
1541 | netdevice->base_addr = dev->hpa; | 1557 | netdevice->base_addr = dev->hpa.start; |
1542 | netdevice->irq = dev->irq; | 1558 | netdevice->irq = dev->irq; |
1543 | 1559 | ||
1544 | retval = i82596_probe(netdevice, &dev->dev); | 1560 | retval = i82596_probe(netdevice, &dev->dev); |
@@ -1566,7 +1582,7 @@ static struct parisc_device_id lan_tbl[] = { | |||
1566 | MODULE_DEVICE_TABLE(parisc, lan_tbl); | 1582 | MODULE_DEVICE_TABLE(parisc, lan_tbl); |
1567 | 1583 | ||
1568 | static struct parisc_driver lan_driver = { | 1584 | static struct parisc_driver lan_driver = { |
1569 | .name = "Apricot", | 1585 | .name = "lasi_82596", |
1570 | .id_table = lan_tbl, | 1586 | .id_table = lan_tbl, |
1571 | .probe = lan_init_chip, | 1587 | .probe = lan_init_chip, |
1572 | }; | 1588 | }; |