* [PATCH] e1000: no need for reboot notifier
@ 2005-07-26 21:25 tony.luck
2005-07-26 21:31 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: tony.luck @ 2005-07-26 21:25 UTC (permalink / raw)
To: cramerj, john.ronciak, ganesh.venkatesan; +Cc: akpm, pavel, linux-kernel
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].
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
--- 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
static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid);
static void e1000_restore_vlan(struct e1000_adapter *adapter);
-static int e1000_notify_reboot(struct notifier_block *, unsigned long event, void *ptr);
static int e1000_suspend(struct pci_dev *pdev, uint32_t state);
#ifdef CONFIG_PM
static int e1000_resume(struct pci_dev *pdev);
@@ -173,12 +172,6 @@ static int e1000_resume(struct pci_dev *
static void e1000_netpoll (struct net_device *netdev);
#endif
-struct notifier_block e1000_notifier_reboot = {
- .notifier_call = e1000_notify_reboot,
- .next = NULL,
- .priority = 0
-};
-
/* Exported from other modules */
extern void e1000_check_options(struct e1000_adapter *adapter);
@@ -221,9 +214,7 @@ e1000_init_module(void)
printk(KERN_INFO "%s\n", e1000_copyright);
ret = pci_module_init(&e1000_driver);
- if(ret >= 0) {
- register_reboot_notifier(&e1000_notifier_reboot);
- }
+
return ret;
}
@@ -239,7 +230,6 @@ module_init(e1000_init_module);
static void __exit
e1000_exit_module(void)
{
- unregister_reboot_notifier(&e1000_notifier_reboot);
pci_unregister_driver(&e1000_driver);
}
@@ -3652,23 +3642,6 @@ e1000_set_spd_dplx(struct e1000_adapter
}
static int
-e1000_notify_reboot(struct notifier_block *nb, unsigned long event, void *p)
-{
- struct pci_dev *pdev = NULL;
-
- switch(event) {
- case SYS_DOWN:
- case SYS_HALT:
- case SYS_POWER_OFF:
- while((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) {
- if(pci_dev_driver(pdev) == &e1000_driver)
- e1000_suspend(pdev, 3);
- }
- }
- return NOTIFY_DONE;
-}
-
-static int
e1000_suspend(struct pci_dev *pdev, uint32_t state)
{
struct net_device *netdev = pci_get_drvdata(pdev);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] e1000: no need for reboot notifier
2005-07-26 21:25 [PATCH] e1000: no need for reboot notifier tony.luck
@ 2005-07-26 21:31 ` Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2005-07-26 21:31 UTC (permalink / raw)
To: tony.luck; +Cc: cramerj, john.ronciak, ganesh.venkatesan, pavel, linux-kernel
tony.luck@intel.com wrote:
>
> 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].
Does this fix the ia64 reboot, or do we still have the mpt-fusion problem?
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] e1000: no need for reboot notifier
@ 2005-07-26 21:35 Luck, Tony
0 siblings, 0 replies; 3+ messages in thread
From: Luck, Tony @ 2005-07-26 21:35 UTC (permalink / raw)
To: Andrew Morton
Cc: cramerj, Ronciak, John, Venkatesan, Ganesh, pavel, linux-kernel
>> 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].
>
>Does this fix the ia64 reboot, or do we still have the
>mpt-fusion problem?
We still have the mpt-fusion problem :-( That one appears to
be more convoluted ... we don't seem to be calling the suspend
functions more than once, but I still see the "Badness" messages
from iosapic_unregister_intr(). There may also be an ordering
problem where we shutdown some bits of mpt-fusion, and then later
call the suspend function for another layer to sync out some
SCSI stuff, but it is toast because the device is already down.
-Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-26 21:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-26 21:25 [PATCH] e1000: no need for reboot notifier tony.luck
2005-07-26 21:31 ` Andrew Morton
2005-07-26 21:35 Luck, Tony
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®