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] e1000: no need for reboot notifier

sys_reboot() now calls device_suspend(), so it is no longer necessary for
the e1000 driver to register a reboot notifier [in fact doing so results in
e1000_suspend() getting called twice].

(akpm: we need to fast-track this. It's causing ia64 to oops on shutdown)

Signed-off-by: Tony Luck <tony.luck@intel.com>
Cc: <cramerj@intel.com>
Cc: <john.ronciak@intel.com>
Cc: <ganesh.venkatesan@intel.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Tony Luck and committed by
Linus Torvalds
8b378def f5c1d5b2

+1 -28
+1 -28
drivers/net/e1000/e1000_main.c
··· 162 162 static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); 163 163 static void e1000_restore_vlan(struct e1000_adapter *adapter); 164 164 165 - static int e1000_notify_reboot(struct notifier_block *, unsigned long event, void *ptr); 166 165 static int e1000_suspend(struct pci_dev *pdev, uint32_t state); 167 166 #ifdef CONFIG_PM 168 167 static int e1000_resume(struct pci_dev *pdev); ··· 171 172 /* for netdump / net console */ 172 173 static void e1000_netpoll (struct net_device *netdev); 173 174 #endif 174 - 175 - struct notifier_block e1000_notifier_reboot = { 176 - .notifier_call = e1000_notify_reboot, 177 - .next = NULL, 178 - .priority = 0 179 - }; 180 175 181 176 /* Exported from other modules */ 182 177 ··· 214 221 printk(KERN_INFO "%s\n", e1000_copyright); 215 222 216 223 ret = pci_module_init(&e1000_driver); 217 - if(ret >= 0) { 218 - register_reboot_notifier(&e1000_notifier_reboot); 219 - } 224 + 220 225 return ret; 221 226 } 222 227 ··· 230 239 static void __exit 231 240 e1000_exit_module(void) 232 241 { 233 - unregister_reboot_notifier(&e1000_notifier_reboot); 234 242 pci_unregister_driver(&e1000_driver); 235 243 } 236 244 ··· 3639 3649 return -EINVAL; 3640 3650 } 3641 3651 return 0; 3642 - } 3643 - 3644 - static int 3645 - e1000_notify_reboot(struct notifier_block *nb, unsigned long event, void *p) 3646 - { 3647 - struct pci_dev *pdev = NULL; 3648 - 3649 - switch(event) { 3650 - case SYS_DOWN: 3651 - case SYS_HALT: 3652 - case SYS_POWER_OFF: 3653 - while((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) { 3654 - if(pci_dev_driver(pdev) == &e1000_driver) 3655 - e1000_suspend(pdev, 3); 3656 - } 3657 - } 3658 - return NOTIFY_DONE; 3659 3652 } 3660 3653 3661 3654 static int