diff options
author | Tony Luck <tony.luck@intel.com> | 2005-07-28 04:07:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-28 11:39:02 -0400 |
commit | 8b378def5a386c4a7f15b51ed79802badb9f5a70 (patch) | |
tree | 52d53a2a28f788a8302a83248bda8ac774076dc4 /drivers | |
parent | f5c1d5b2aaf9a98f15a6dcdfbba1f494d0aaae52 (diff) |
[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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index cb7f051a60ad..5e5d2c3c7ce4 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -162,7 +162,6 @@ static void e1000_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid); | |||
162 | static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); | 162 | static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); |
163 | static void e1000_restore_vlan(struct e1000_adapter *adapter); | 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 | static int e1000_suspend(struct pci_dev *pdev, uint32_t state); | 165 | static int e1000_suspend(struct pci_dev *pdev, uint32_t state); |
167 | #ifdef CONFIG_PM | 166 | #ifdef CONFIG_PM |
168 | static int e1000_resume(struct pci_dev *pdev); | 167 | static int e1000_resume(struct pci_dev *pdev); |
@@ -173,12 +172,6 @@ static int e1000_resume(struct pci_dev *pdev); | |||
173 | static void e1000_netpoll (struct net_device *netdev); | 172 | static void e1000_netpoll (struct net_device *netdev); |
174 | #endif | 173 | #endif |
175 | 174 | ||
176 | struct notifier_block e1000_notifier_reboot = { | ||
177 | .notifier_call = e1000_notify_reboot, | ||
178 | .next = NULL, | ||
179 | .priority = 0 | ||
180 | }; | ||
181 | |||
182 | /* Exported from other modules */ | 175 | /* Exported from other modules */ |
183 | 176 | ||
184 | extern void e1000_check_options(struct e1000_adapter *adapter); | 177 | extern void e1000_check_options(struct e1000_adapter *adapter); |
@@ -221,9 +214,7 @@ e1000_init_module(void) | |||
221 | printk(KERN_INFO "%s\n", e1000_copyright); | 214 | printk(KERN_INFO "%s\n", e1000_copyright); |
222 | 215 | ||
223 | ret = pci_module_init(&e1000_driver); | 216 | ret = pci_module_init(&e1000_driver); |
224 | if(ret >= 0) { | 217 | |
225 | register_reboot_notifier(&e1000_notifier_reboot); | ||
226 | } | ||
227 | return ret; | 218 | return ret; |
228 | } | 219 | } |
229 | 220 | ||
@@ -239,7 +230,6 @@ module_init(e1000_init_module); | |||
239 | static void __exit | 230 | static void __exit |
240 | e1000_exit_module(void) | 231 | e1000_exit_module(void) |
241 | { | 232 | { |
242 | unregister_reboot_notifier(&e1000_notifier_reboot); | ||
243 | pci_unregister_driver(&e1000_driver); | 233 | pci_unregister_driver(&e1000_driver); |
244 | } | 234 | } |
245 | 235 | ||
@@ -3652,23 +3642,6 @@ e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx) | |||
3652 | } | 3642 | } |
3653 | 3643 | ||
3654 | static int | 3644 | static int |
3655 | e1000_notify_reboot(struct notifier_block *nb, unsigned long event, void *p) | ||
3656 | { | ||
3657 | struct pci_dev *pdev = NULL; | ||
3658 | |||
3659 | switch(event) { | ||
3660 | case SYS_DOWN: | ||
3661 | case SYS_HALT: | ||
3662 | case SYS_POWER_OFF: | ||
3663 | while((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) { | ||
3664 | if(pci_dev_driver(pdev) == &e1000_driver) | ||
3665 | e1000_suspend(pdev, 3); | ||
3666 | } | ||
3667 | } | ||
3668 | return NOTIFY_DONE; | ||
3669 | } | ||
3670 | |||
3671 | static int | ||
3672 | e1000_suspend(struct pci_dev *pdev, uint32_t state) | 3645 | e1000_suspend(struct pci_dev *pdev, uint32_t state) |
3673 | { | 3646 | { |
3674 | struct net_device *netdev = pci_get_drvdata(pdev); | 3647 | struct net_device *netdev = pci_get_drvdata(pdev); |