[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

authored by Malli Chilakala and committed by Jeff Garzik c2eba932 5e3c30de

+4 -71
+4 -71
drivers/net/ixgb/ixgb_main.c
··· 120 120 static void ixgb_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); 121 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 123 #ifdef CONFIG_NET_POLL_CONTROLLER 128 124 /* for netdump / net console */ 129 125 static void ixgb_netpoll(struct net_device *dev); 130 126 #endif 131 - 132 - struct notifier_block ixgb_notifier_reboot = { 133 - .notifier_call = ixgb_notify_reboot, 134 - .next = NULL, 135 - .priority = 0 136 - }; 137 127 138 128 /* Exported from other modules */ 139 129 140 130 extern void ixgb_check_options(struct ixgb_adapter *adapter); 141 131 142 132 static struct pci_driver ixgb_driver = { 143 - .name = ixgb_driver_name, 133 + .name = ixgb_driver_name, 144 134 .id_table = ixgb_pci_tbl, 145 - .probe = ixgb_probe, 146 - .remove = __devexit_p(ixgb_remove), 147 - /* Power Managment Hooks */ 148 - .suspend = NULL, 149 - .resume = NULL 135 + .probe = ixgb_probe, 136 + .remove = __devexit_p(ixgb_remove), 150 137 }; 151 138 152 139 MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); ··· 156 169 static int __init 157 170 ixgb_init_module(void) 158 171 { 159 - int ret; 160 172 printk(KERN_INFO "%s - version %s\n", 161 173 ixgb_driver_string, ixgb_driver_version); 162 174 163 175 printk(KERN_INFO "%s\n", ixgb_copyright); 164 176 165 - ret = pci_module_init(&ixgb_driver); 166 - if(ret >= 0) { 167 - register_reboot_notifier(&ixgb_notifier_reboot); 168 - } 169 - return ret; 177 + return pci_module_init(&ixgb_driver); 170 178 } 171 179 172 180 module_init(ixgb_init_module); ··· 176 194 static void __exit 177 195 ixgb_exit_module(void) 178 196 { 179 - unregister_reboot_notifier(&ixgb_notifier_reboot); 180 197 pci_unregister_driver(&ixgb_driver); 181 198 } 182 199 ··· 2100 2119 ixgb_vlan_rx_add_vid(adapter->netdev, vid); 2101 2120 } 2102 2121 } 2103 - } 2104 - 2105 - /** 2106 - * ixgb_notify_reboot - handles OS notification of reboot event. 2107 - * @param nb notifier block, unused 2108 - * @param event Event being passed to driver to act upon 2109 - * @param p A pointer to our net device 2110 - **/ 2111 - static int 2112 - ixgb_notify_reboot(struct notifier_block *nb, unsigned long event, void *p) 2113 - { 2114 - struct pci_dev *pdev = NULL; 2115 - 2116 - switch(event) { 2117 - case SYS_DOWN: 2118 - case SYS_HALT: 2119 - case SYS_POWER_OFF: 2120 - while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) { 2121 - if (pci_dev_driver(pdev) == &ixgb_driver) 2122 - ixgb_suspend(pdev, 3); 2123 - } 2124 - } 2125 - return NOTIFY_DONE; 2126 - } 2127 - 2128 - /** 2129 - * ixgb_suspend - driver suspend function called from notify. 2130 - * @param pdev pci driver structure used for passing to 2131 - * @param state power state to enter 2132 - **/ 2133 - static int 2134 - ixgb_suspend(struct pci_dev *pdev, uint32_t state) 2135 - { 2136 - struct net_device *netdev = pci_get_drvdata(pdev); 2137 - struct ixgb_adapter *adapter = netdev->priv; 2138 - 2139 - netif_device_detach(netdev); 2140 - 2141 - if(netif_running(netdev)) 2142 - ixgb_down(adapter, TRUE); 2143 - 2144 - pci_save_state(pdev); 2145 - 2146 - state = (state > 0) ? 3 : 0; 2147 - pci_set_power_state(pdev, state); 2148 - msec_delay(200); 2149 - 2150 - return 0; 2151 2122 } 2152 2123 2153 2124 #ifdef CONFIG_NET_POLL_CONTROLLER