diff options
| author | Malli Chilakala <mallikarjuna.chilakala@intel.com> | 2005-04-28 22:04:32 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-05-12 20:54:42 -0400 |
| commit | c2eba932b14718e34ac2609e35c6d41e032a2478 (patch) | |
| tree | 9e18fd51bd7bf99e1d85eb3bc63021232469b03b | |
| parent | 5e3c30deb21d0eb0da44830fb1c1fc7054e54229 (diff) | |
[PATCH] ixgb: Remove hook for suspend, no power management
Remove hook for suspend. No power management in 10GbE Controllers
Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c
| -rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 75 |
1 files changed, 4 insertions, 71 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index a6a13f6fe65b..0a0f0417f85d 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
| @@ -120,33 +120,20 @@ static void ixgb_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid); | |||
| 120 | static void ixgb_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); | 120 | static void ixgb_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); |
| 121 | static void ixgb_restore_vlan(struct ixgb_adapter *adapter); | 121 | static void ixgb_restore_vlan(struct ixgb_adapter *adapter); |
| 122 | 122 | ||
| 123 | static int ixgb_notify_reboot(struct notifier_block *, unsigned long event, | ||
| 124 | void *ptr); | ||
| 125 | static int ixgb_suspend(struct pci_dev *pdev, uint32_t state); | ||
| 126 | |||
| 127 | #ifdef CONFIG_NET_POLL_CONTROLLER | 123 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 128 | /* for netdump / net console */ | 124 | /* for netdump / net console */ |
| 129 | static void ixgb_netpoll(struct net_device *dev); | 125 | static void ixgb_netpoll(struct net_device *dev); |
| 130 | #endif | 126 | #endif |
| 131 | 127 | ||
| 132 | struct notifier_block ixgb_notifier_reboot = { | ||
| 133 | .notifier_call = ixgb_notify_reboot, | ||
| 134 | .next = NULL, | ||
| 135 | .priority = 0 | ||
| 136 | }; | ||
| 137 | |||
| 138 | /* Exported from other modules */ | 128 | /* Exported from other modules */ |
| 139 | 129 | ||
| 140 | extern void ixgb_check_options(struct ixgb_adapter *adapter); | 130 | extern void ixgb_check_options(struct ixgb_adapter *adapter); |
| 141 | 131 | ||
| 142 | static struct pci_driver ixgb_driver = { | 132 | static struct pci_driver ixgb_driver = { |
| 143 | .name = ixgb_driver_name, | 133 | .name = ixgb_driver_name, |
| 144 | .id_table = ixgb_pci_tbl, | 134 | .id_table = ixgb_pci_tbl, |
| 145 | .probe = ixgb_probe, | 135 | .probe = ixgb_probe, |
| 146 | .remove = __devexit_p(ixgb_remove), | 136 | .remove = __devexit_p(ixgb_remove), |
| 147 | /* Power Managment Hooks */ | ||
| 148 | .suspend = NULL, | ||
| 149 | .resume = NULL | ||
| 150 | }; | 137 | }; |
| 151 | 138 | ||
| 152 | MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); | 139 | MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); |
| @@ -169,17 +156,12 @@ MODULE_LICENSE("GPL"); | |||
| 169 | static int __init | 156 | static int __init |
| 170 | ixgb_init_module(void) | 157 | ixgb_init_module(void) |
| 171 | { | 158 | { |
| 172 | int ret; | ||
| 173 | printk(KERN_INFO "%s - version %s\n", | 159 | printk(KERN_INFO "%s - version %s\n", |
| 174 | ixgb_driver_string, ixgb_driver_version); | 160 | ixgb_driver_string, ixgb_driver_version); |
| 175 | 161 | ||
| 176 | printk(KERN_INFO "%s\n", ixgb_copyright); | 162 | printk(KERN_INFO "%s\n", ixgb_copyright); |
| 177 | 163 | ||
| 178 | ret = pci_module_init(&ixgb_driver); | 164 | return pci_module_init(&ixgb_driver); |
| 179 | if(ret >= 0) { | ||
| 180 | register_reboot_notifier(&ixgb_notifier_reboot); | ||
| 181 | } | ||
| 182 | return ret; | ||
| 183 | } | 165 | } |
| 184 | 166 | ||
| 185 | module_init(ixgb_init_module); | 167 | module_init(ixgb_init_module); |
| @@ -194,7 +176,6 @@ module_init(ixgb_init_module); | |||
| 194 | static void __exit | 176 | static void __exit |
| 195 | ixgb_exit_module(void) | 177 | ixgb_exit_module(void) |
| 196 | { | 178 | { |
| 197 | unregister_reboot_notifier(&ixgb_notifier_reboot); | ||
| 198 | pci_unregister_driver(&ixgb_driver); | 179 | pci_unregister_driver(&ixgb_driver); |
| 199 | } | 180 | } |
| 200 | 181 | ||
| @@ -2121,54 +2102,6 @@ ixgb_restore_vlan(struct ixgb_adapter *adapter) | |||
| 2121 | } | 2102 | } |
| 2122 | } | 2103 | } |
| 2123 | 2104 | ||
| 2124 | /** | ||
| 2125 | * ixgb_notify_reboot - handles OS notification of reboot event. | ||
| 2126 | * @param nb notifier block, unused | ||
| 2127 | * @param event Event being passed to driver to act upon | ||
| 2128 | * @param p A pointer to our net device | ||
| 2129 | **/ | ||
| 2130 | static int | ||
| 2131 | ixgb_notify_reboot(struct notifier_block *nb, unsigned long event, void *p) | ||
| 2132 | { | ||
| 2133 | struct pci_dev *pdev = NULL; | ||
| 2134 | |||
| 2135 | switch(event) { | ||
| 2136 | case SYS_DOWN: | ||
| 2137 | case SYS_HALT: | ||
| 2138 | case SYS_POWER_OFF: | ||
| 2139 | while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) { | ||
| 2140 | if (pci_dev_driver(pdev) == &ixgb_driver) | ||
| 2141 | ixgb_suspend(pdev, 3); | ||
| 2142 | } | ||
| 2143 | } | ||
| 2144 | return NOTIFY_DONE; | ||
| 2145 | } | ||
| 2146 | |||
| 2147 | /** | ||
| 2148 | * ixgb_suspend - driver suspend function called from notify. | ||
| 2149 | * @param pdev pci driver structure used for passing to | ||
| 2150 | * @param state power state to enter | ||
| 2151 | **/ | ||
| 2152 | static int | ||
| 2153 | ixgb_suspend(struct pci_dev *pdev, uint32_t state) | ||
| 2154 | { | ||
| 2155 | struct net_device *netdev = pci_get_drvdata(pdev); | ||
| 2156 | struct ixgb_adapter *adapter = netdev->priv; | ||
| 2157 | |||
| 2158 | netif_device_detach(netdev); | ||
| 2159 | |||
| 2160 | if(netif_running(netdev)) | ||
| 2161 | ixgb_down(adapter, TRUE); | ||
| 2162 | |||
| 2163 | pci_save_state(pdev); | ||
| 2164 | |||
| 2165 | state = (state > 0) ? 3 : 0; | ||
| 2166 | pci_set_power_state(pdev, state); | ||
| 2167 | msec_delay(200); | ||
| 2168 | |||
| 2169 | return 0; | ||
| 2170 | } | ||
| 2171 | |||
| 2172 | #ifdef CONFIG_NET_POLL_CONTROLLER | 2105 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 2173 | /* | 2106 | /* |
| 2174 | * Polling 'interrupt' - used by things like netconsole to send skbs | 2107 | * Polling 'interrupt' - used by things like netconsole to send skbs |
