Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] sky2: netconsole suspend/resume interaction

A couple of fixes that should prevent crashes when using netconsole and
suspend/resume. First, netconsole poll routine shouldn't run unless the
device is up; second, the NAPI poll should be disabled during suspend.

This is only an issue on sky2, because it has to have one NAPI poll
routine for both ports on dual port boards. Normal drivers use
netif_rx_schedule_prep and that checks for netif_running.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Stephen Hemminger and committed by
Linus Torvalds
88d11360 99172157

+6 -1
+6 -1
drivers/net/sky2.c
··· 2255 2255 static void sky2_netpoll(struct net_device *dev) 2256 2256 { 2257 2257 struct sky2_port *sky2 = netdev_priv(dev); 2258 + struct net_device *dev0 = sky2->hw->dev[0]; 2258 2259 2259 - sky2_intr(sky2->hw->pdev->irq, sky2->hw, NULL); 2260 + if (netif_running(dev) && __netif_rx_schedule_prep(dev0)) 2261 + __netif_rx_schedule(dev0); 2260 2262 } 2261 2263 #endif 2262 2264 ··· 3448 3446 3449 3447 sky2_down(dev); 3450 3448 netif_device_detach(dev); 3449 + netif_poll_disable(dev); 3451 3450 } 3452 3451 } 3453 3452 ··· 3477 3474 struct net_device *dev = hw->dev[i]; 3478 3475 if (dev && netif_running(dev)) { 3479 3476 netif_device_attach(dev); 3477 + netif_poll_enable(dev); 3478 + 3480 3479 err = sky2_up(dev); 3481 3480 if (err) { 3482 3481 printk(KERN_ERR PFX "%s: could not up: %d\n",