Commit c2709020 authored by Sven Schnelle's avatar Sven Schnelle Committed by Kyle McMartin

[PARISC] Add NETPOLL support to lasi_82596

add netpoll support
Patch by Sven Schnelle <svens@gmx.de>
Signed-off-by: default avatarSven Schnelle <svens@gmx.de>
Signed-off-by: default avatarHelge Deller <deller@parisc-linux.org>
Signed-off-by: default avatarKyle McMartin <kyle@parisc-linux.org>
parent dd0fd51d
...@@ -415,6 +415,10 @@ static int rx_ring_size = RX_RING_SIZE; ...@@ -415,6 +415,10 @@ static int rx_ring_size = RX_RING_SIZE;
static int ticks_limit = 100; static int ticks_limit = 100;
static int max_cmd_backlog = TX_RING_SIZE-1; static int max_cmd_backlog = TX_RING_SIZE-1;
#ifdef CONFIG_NET_POLL_CONTROLLER
static void i596_poll_controller(struct net_device *dev);
#endif
static inline void CA(struct net_device *dev) static inline void CA(struct net_device *dev)
{ {
...@@ -636,11 +640,11 @@ static int init_i596_mem(struct net_device *dev) ...@@ -636,11 +640,11 @@ static int init_i596_mem(struct net_device *dev)
disable_irq(dev->irq); /* disable IRQs from LAN */ disable_irq(dev->irq); /* disable IRQs from LAN */
DEB(DEB_INIT, DEB(DEB_INIT,
printk("RESET 82596 port: %p (with IRQ %d disabled)\n", printk("RESET 82596 port: %lx (with IRQ %d disabled)\n",
(void*)(dev->base_addr + PA_I82596_RESET), (dev->base_addr + PA_I82596_RESET),
dev->irq)); dev->irq));
gsc_writel(0, (void*)(dev->base_addr + PA_I82596_RESET)); /* Hard Reset */ gsc_writel(0, (dev->base_addr + PA_I82596_RESET)); /* Hard Reset */
udelay(100); /* Wait 100us - seems to help */ udelay(100); /* Wait 100us - seems to help */
/* change the scp address */ /* change the scp address */
...@@ -1209,6 +1213,9 @@ static int __devinit i82596_probe(struct net_device *dev, ...@@ -1209,6 +1213,9 @@ static int __devinit i82596_probe(struct net_device *dev,
dev->set_multicast_list = set_multicast_list; dev->set_multicast_list = set_multicast_list;
dev->tx_timeout = i596_tx_timeout; dev->tx_timeout = i596_tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT; dev->watchdog_timeo = TX_TIMEOUT;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = i596_poll_controller;
#endif
dev->priv = (void *)(dev->mem_start); dev->priv = (void *)(dev->mem_start);
...@@ -1242,6 +1249,14 @@ static int __devinit i82596_probe(struct net_device *dev, ...@@ -1242,6 +1249,14 @@ static int __devinit i82596_probe(struct net_device *dev,
return 0; return 0;
} }
#ifdef CONFIG_NET_POLL_CONTROLLER
static void i596_poll_controller(struct net_device *dev)
{
disable_irq(dev->irq);
i596_interrupt(dev->irq, dev, NULL);
enable_irq(dev->irq);
}
#endif
static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
......
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