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: stop/start hardware idle timer on suspend/resume

The resume bug was caused not by an early interrupt but because the idle
timeout was not being stopped on suspend. Also disable hardware IRQ's
on suspend. Will need to revisit this with hotplug?

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
eb35cf60 8ab8fca2

+13 -4
+13 -4
drivers/net/sky2.c
··· 2161 2161 /* If idle then force a fake soft NAPI poll once a second 2162 2162 * to work around cases where sharing an edge triggered interrupt. 2163 2163 */ 2164 + static inline void sky2_idle_start(struct sky2_hw *hw) 2165 + { 2166 + if (idle_timeout > 0) 2167 + mod_timer(&hw->idle_timer, 2168 + jiffies + msecs_to_jiffies(idle_timeout)); 2169 + } 2170 + 2164 2171 static void sky2_idle(unsigned long arg) 2165 2172 { 2166 2173 struct sky2_hw *hw = (struct sky2_hw *) arg; ··· 3357 3350 sky2_write32(hw, B0_IMSK, Y2_IS_BASE); 3358 3351 3359 3352 setup_timer(&hw->idle_timer, sky2_idle, (unsigned long) hw); 3360 - if (idle_timeout > 0) 3361 - mod_timer(&hw->idle_timer, 3362 - jiffies + msecs_to_jiffies(idle_timeout)); 3353 + sky2_idle_start(hw); 3363 3354 3364 3355 pci_set_drvdata(pdev, hw); 3365 3356 ··· 3435 3430 if (!(pstate == PCI_D3hot || pstate == PCI_D3cold)) 3436 3431 return -EINVAL; 3437 3432 3433 + del_timer_sync(&hw->idle_timer); 3434 + 3438 3435 for (i = 0; i < hw->ports; i++) { 3439 3436 struct net_device *dev = hw->dev[i]; 3440 3437 ··· 3479 3472 printk(KERN_ERR PFX "%s: could not up: %d\n", 3480 3473 dev->name, err); 3481 3474 dev_close(dev); 3482 - break; 3475 + goto out; 3483 3476 } 3484 3477 } 3485 3478 } 3479 + 3480 + sky2_idle_start(hw); 3486 3481 out: 3487 3482 return err; 3488 3483 }