.. | .. |
---|
10 | 10 | |
---|
11 | 11 | char e1000_driver_name[] = "e1000"; |
---|
12 | 12 | static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; |
---|
13 | | -#define DRV_VERSION "7.3.21-k8-NAPI" |
---|
14 | | -const char e1000_driver_version[] = DRV_VERSION; |
---|
15 | 13 | static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; |
---|
16 | 14 | |
---|
17 | 15 | /* e1000_pci_tbl - PCI Device ID Table |
---|
.. | .. |
---|
134 | 132 | int cmd); |
---|
135 | 133 | static void e1000_enter_82542_rst(struct e1000_adapter *adapter); |
---|
136 | 134 | static void e1000_leave_82542_rst(struct e1000_adapter *adapter); |
---|
137 | | -static void e1000_tx_timeout(struct net_device *dev); |
---|
| 135 | +static void e1000_tx_timeout(struct net_device *dev, unsigned int txqueue); |
---|
138 | 136 | static void e1000_reset_task(struct work_struct *work); |
---|
139 | 137 | static void e1000_smartspeed(struct e1000_adapter *adapter); |
---|
140 | 138 | static int e1000_82547_fifo_workaround(struct e1000_adapter *adapter, |
---|
.. | .. |
---|
151 | 149 | __be16 proto, u16 vid); |
---|
152 | 150 | static void e1000_restore_vlan(struct e1000_adapter *adapter); |
---|
153 | 151 | |
---|
154 | | -#ifdef CONFIG_PM |
---|
155 | | -static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); |
---|
156 | | -static int e1000_resume(struct pci_dev *pdev); |
---|
157 | | -#endif |
---|
| 152 | +static int __maybe_unused e1000_suspend(struct device *dev); |
---|
| 153 | +static int __maybe_unused e1000_resume(struct device *dev); |
---|
158 | 154 | static void e1000_shutdown(struct pci_dev *pdev); |
---|
159 | 155 | |
---|
160 | 156 | #ifdef CONFIG_NET_POLL_CONTROLLER |
---|
.. | .. |
---|
179 | 175 | .resume = e1000_io_resume, |
---|
180 | 176 | }; |
---|
181 | 177 | |
---|
| 178 | +static SIMPLE_DEV_PM_OPS(e1000_pm_ops, e1000_suspend, e1000_resume); |
---|
| 179 | + |
---|
182 | 180 | static struct pci_driver e1000_driver = { |
---|
183 | 181 | .name = e1000_driver_name, |
---|
184 | 182 | .id_table = e1000_pci_tbl, |
---|
185 | 183 | .probe = e1000_probe, |
---|
186 | 184 | .remove = e1000_remove, |
---|
187 | | -#ifdef CONFIG_PM |
---|
188 | | - /* Power Management Hooks */ |
---|
189 | | - .suspend = e1000_suspend, |
---|
190 | | - .resume = e1000_resume, |
---|
191 | | -#endif |
---|
| 185 | + .driver = { |
---|
| 186 | + .pm = &e1000_pm_ops, |
---|
| 187 | + }, |
---|
192 | 188 | .shutdown = e1000_shutdown, |
---|
193 | 189 | .err_handler = &e1000_err_handler |
---|
194 | 190 | }; |
---|
195 | 191 | |
---|
196 | 192 | MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); |
---|
197 | 193 | MODULE_DESCRIPTION("Intel(R) PRO/1000 Network Driver"); |
---|
198 | | -MODULE_LICENSE("GPL"); |
---|
199 | | -MODULE_VERSION(DRV_VERSION); |
---|
| 194 | +MODULE_LICENSE("GPL v2"); |
---|
200 | 195 | |
---|
201 | 196 | #define DEFAULT_MSG_ENABLE (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK) |
---|
202 | 197 | static int debug = -1; |
---|
.. | .. |
---|
204 | 199 | MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); |
---|
205 | 200 | |
---|
206 | 201 | /** |
---|
207 | | - * e1000_get_hw_dev - return device |
---|
208 | | - * used by hardware layer to print debugging information |
---|
| 202 | + * e1000_get_hw_dev - helper function for getting netdev |
---|
| 203 | + * @hw: pointer to HW struct |
---|
| 204 | + * |
---|
| 205 | + * return device used by hardware layer to print debugging information |
---|
209 | 206 | * |
---|
210 | 207 | **/ |
---|
211 | 208 | struct net_device *e1000_get_hw_dev(struct e1000_hw *hw) |
---|
.. | .. |
---|
223 | 220 | static int __init e1000_init_module(void) |
---|
224 | 221 | { |
---|
225 | 222 | int ret; |
---|
226 | | - pr_info("%s - version %s\n", e1000_driver_string, e1000_driver_version); |
---|
| 223 | + pr_info("%s\n", e1000_driver_string); |
---|
227 | 224 | |
---|
228 | 225 | pr_info("%s\n", e1000_copyright); |
---|
229 | 226 | |
---|
.. | .. |
---|
359 | 356 | |
---|
360 | 357 | /** |
---|
361 | 358 | * e1000_configure - configure the hardware for RX and TX |
---|
362 | | - * @adapter = private board structure |
---|
| 359 | + * @adapter: private board structure |
---|
363 | 360 | **/ |
---|
364 | 361 | static void e1000_configure(struct e1000_adapter *adapter) |
---|
365 | 362 | { |
---|
.. | .. |
---|
539 | 536 | |
---|
540 | 537 | void e1000_reinit_locked(struct e1000_adapter *adapter) |
---|
541 | 538 | { |
---|
542 | | - WARN_ON(in_interrupt()); |
---|
543 | 539 | while (test_and_set_bit(__E1000_RESETTING, &adapter->flags)) |
---|
544 | 540 | msleep(1); |
---|
545 | 541 | |
---|
.. | .. |
---|
825 | 821 | else |
---|
826 | 822 | e1000_reset(adapter); |
---|
827 | 823 | |
---|
828 | | - return 0; |
---|
| 824 | + return 1; |
---|
829 | 825 | } |
---|
830 | 826 | |
---|
831 | 827 | static const struct net_device_ops e1000_netdev_ops = { |
---|
.. | .. |
---|
982 | 978 | goto err_ioremap; |
---|
983 | 979 | |
---|
984 | 980 | if (adapter->need_ioport) { |
---|
985 | | - for (i = BAR_1; i <= BAR_5; i++) { |
---|
| 981 | + for (i = BAR_1; i < PCI_STD_NUM_BARS; i++) { |
---|
986 | 982 | if (pci_resource_len(pdev, i) == 0) |
---|
987 | 983 | continue; |
---|
988 | 984 | if (pci_resource_flags(pdev, i) & IORESOURCE_IO) { |
---|
.. | .. |
---|
1143 | 1139 | EEPROM_INIT_CONTROL3_PORT_B, 1, &eeprom_data); |
---|
1144 | 1140 | break; |
---|
1145 | 1141 | } |
---|
1146 | | - /* Fall Through */ |
---|
| 1142 | + fallthrough; |
---|
1147 | 1143 | default: |
---|
1148 | 1144 | e1000_read_eeprom(hw, |
---|
1149 | 1145 | EEPROM_INIT_CONTROL3_PORT_A, 1, &eeprom_data); |
---|
.. | .. |
---|
1486 | 1482 | if (hw->mac_type == e1000_82545 || |
---|
1487 | 1483 | hw->mac_type == e1000_ce4100 || |
---|
1488 | 1484 | hw->mac_type == e1000_82546) { |
---|
1489 | | - return ((begin ^ (end - 1)) >> 16) != 0 ? false : true; |
---|
| 1485 | + return ((begin ^ (end - 1)) >> 16) == 0; |
---|
1490 | 1486 | } |
---|
1491 | 1487 | |
---|
1492 | 1488 | return true; |
---|
.. | .. |
---|
2443 | 2439 | if (link) { |
---|
2444 | 2440 | if (!netif_carrier_ok(netdev)) { |
---|
2445 | 2441 | u32 ctrl; |
---|
2446 | | - bool txb2b = true; |
---|
2447 | 2442 | /* update snapshot of PHY registers on LSC */ |
---|
2448 | 2443 | e1000_get_speed_and_duplex(hw, |
---|
2449 | 2444 | &adapter->link_speed, |
---|
.. | .. |
---|
2465 | 2460 | adapter->tx_timeout_factor = 1; |
---|
2466 | 2461 | switch (adapter->link_speed) { |
---|
2467 | 2462 | case SPEED_10: |
---|
2468 | | - txb2b = false; |
---|
2469 | 2463 | adapter->tx_timeout_factor = 16; |
---|
2470 | 2464 | break; |
---|
2471 | 2465 | case SPEED_100: |
---|
2472 | | - txb2b = false; |
---|
2473 | 2466 | /* maybe add some timeout factor ? */ |
---|
2474 | 2467 | break; |
---|
2475 | 2468 | } |
---|
.. | .. |
---|
2728 | 2721 | cmd_length = E1000_TXD_CMD_IP; |
---|
2729 | 2722 | ipcse = skb_transport_offset(skb) - 1; |
---|
2730 | 2723 | } else if (skb_is_gso_v6(skb)) { |
---|
2731 | | - ipv6_hdr(skb)->payload_len = 0; |
---|
2732 | | - tcp_hdr(skb)->check = |
---|
2733 | | - ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
---|
2734 | | - &ipv6_hdr(skb)->daddr, |
---|
2735 | | - 0, IPPROTO_TCP, 0); |
---|
| 2724 | + tcp_v6_gso_csum_prep(skb); |
---|
2736 | 2725 | ipcse = 0; |
---|
2737 | 2726 | } |
---|
2738 | 2727 | ipcss = skb_network_offset(skb); |
---|
.. | .. |
---|
2902 | 2891 | } |
---|
2903 | 2892 | |
---|
2904 | 2893 | for (f = 0; f < nr_frags; f++) { |
---|
2905 | | - const struct skb_frag_struct *frag; |
---|
| 2894 | + const skb_frag_t *frag = &skb_shinfo(skb)->frags[f]; |
---|
2906 | 2895 | |
---|
2907 | | - frag = &skb_shinfo(skb)->frags[f]; |
---|
2908 | 2896 | len = skb_frag_size(frag); |
---|
2909 | 2897 | offset = 0; |
---|
2910 | 2898 | |
---|
.. | .. |
---|
3032 | 3020 | * applicable for weak-ordered memory model archs, |
---|
3033 | 3021 | * such as IA-64). |
---|
3034 | 3022 | */ |
---|
3035 | | - wmb(); |
---|
| 3023 | + dma_wmb(); |
---|
3036 | 3024 | |
---|
3037 | 3025 | tx_ring->next_to_use = i; |
---|
3038 | 3026 | } |
---|
.. | .. |
---|
3167 | 3155 | if ((unsigned long)(skb_tail_pointer(skb) - 1) |
---|
3168 | 3156 | & 4) |
---|
3169 | 3157 | break; |
---|
3170 | | - /* fall through */ |
---|
3171 | 3158 | pull_size = min((unsigned int)4, skb->data_len); |
---|
3172 | 3159 | if (!__pskb_pull_tail(skb, pull_size)) { |
---|
3173 | 3160 | e_err(drv, "__pskb_pull_tail " |
---|
.. | .. |
---|
3282 | 3269 | /* Make sure there is space in the ring for the next send. */ |
---|
3283 | 3270 | e1000_maybe_stop_tx(netdev, tx_ring, desc_needed); |
---|
3284 | 3271 | |
---|
3285 | | - if (!skb->xmit_more || |
---|
| 3272 | + if (!netdev_xmit_more() || |
---|
3286 | 3273 | netif_xmit_stopped(netdev_get_tx_queue(netdev, 0))) { |
---|
3287 | 3274 | writel(tx_ring->next_to_use, hw->hw_addr + tx_ring->tdt); |
---|
3288 | | - /* we need this if more than one processor can write to |
---|
3289 | | - * our tail at a time, it synchronizes IO on IA64/Altix |
---|
3290 | | - * systems |
---|
3291 | | - */ |
---|
3292 | | - mmiowb(); |
---|
3293 | 3275 | } |
---|
3294 | 3276 | } else { |
---|
3295 | 3277 | dev_kfree_skb_any(skb); |
---|
.. | .. |
---|
3508 | 3490 | /** |
---|
3509 | 3491 | * e1000_tx_timeout - Respond to a Tx Hang |
---|
3510 | 3492 | * @netdev: network interface device structure |
---|
| 3493 | + * @txqueue: number of the Tx queue that hung (unused) |
---|
3511 | 3494 | **/ |
---|
3512 | | -static void e1000_tx_timeout(struct net_device *netdev) |
---|
| 3495 | +static void e1000_tx_timeout(struct net_device *netdev, unsigned int __always_unused txqueue) |
---|
3513 | 3496 | { |
---|
3514 | 3497 | struct e1000_adapter *adapter = netdev_priv(netdev); |
---|
3515 | 3498 | |
---|
.. | .. |
---|
3586 | 3569 | (max_frame == MAXIMUM_ETHERNET_VLAN_SIZE))) |
---|
3587 | 3570 | adapter->rx_buffer_len = MAXIMUM_ETHERNET_VLAN_SIZE; |
---|
3588 | 3571 | |
---|
3589 | | - pr_info("%s changing MTU from %d to %d\n", |
---|
3590 | | - netdev->name, netdev->mtu, new_mtu); |
---|
| 3572 | + netdev_dbg(netdev, "changing MTU from %d to %d\n", |
---|
| 3573 | + netdev->mtu, new_mtu); |
---|
3591 | 3574 | netdev->mtu = new_mtu; |
---|
3592 | 3575 | |
---|
3593 | 3576 | if (netif_running(netdev)) |
---|
.. | .. |
---|
3806 | 3789 | |
---|
3807 | 3790 | /** |
---|
3808 | 3791 | * e1000_clean - NAPI Rx polling callback |
---|
3809 | | - * @adapter: board private structure |
---|
| 3792 | + * @napi: napi struct containing references to driver info |
---|
| 3793 | + * @budget: budget given to driver for receive packets |
---|
3810 | 3794 | **/ |
---|
3811 | 3795 | static int e1000_clean(struct napi_struct *napi, int budget) |
---|
3812 | 3796 | { |
---|
.. | .. |
---|
3818 | 3802 | |
---|
3819 | 3803 | adapter->clean_rx(adapter, &adapter->rx_ring[0], &work_done, budget); |
---|
3820 | 3804 | |
---|
3821 | | - if (!tx_clean_complete) |
---|
3822 | | - work_done = budget; |
---|
| 3805 | + if (!tx_clean_complete || work_done == budget) |
---|
| 3806 | + return budget; |
---|
3823 | 3807 | |
---|
3824 | | - /* If budget not fully consumed, exit the polling mode */ |
---|
3825 | | - if (work_done < budget) { |
---|
| 3808 | + /* Exit the polling mode, but don't re-enable interrupts if stack might |
---|
| 3809 | + * poll us due to busy-polling |
---|
| 3810 | + */ |
---|
| 3811 | + if (likely(napi_complete_done(napi, work_done))) { |
---|
3826 | 3812 | if (likely(adapter->itr_setting & 3)) |
---|
3827 | 3813 | e1000_set_itr(adapter); |
---|
3828 | | - napi_complete_done(napi, work_done); |
---|
3829 | 3814 | if (!test_bit(__E1000_DOWN, &adapter->flags)) |
---|
3830 | 3815 | e1000_irq_enable(adapter); |
---|
3831 | 3816 | } |
---|
.. | .. |
---|
3836 | 3821 | /** |
---|
3837 | 3822 | * e1000_clean_tx_irq - Reclaim resources after transmit completes |
---|
3838 | 3823 | * @adapter: board private structure |
---|
| 3824 | + * @tx_ring: ring to clean |
---|
3839 | 3825 | **/ |
---|
3840 | 3826 | static bool e1000_clean_tx_irq(struct e1000_adapter *adapter, |
---|
3841 | 3827 | struct e1000_tx_ring *tx_ring) |
---|
.. | .. |
---|
3951 | 3937 | * @adapter: board private structure |
---|
3952 | 3938 | * @status_err: receive descriptor status and error fields |
---|
3953 | 3939 | * @csum: receive descriptor csum field |
---|
3954 | | - * @sk_buff: socket buffer with received data |
---|
| 3940 | + * @skb: socket buffer with received data |
---|
3955 | 3941 | **/ |
---|
3956 | 3942 | static void e1000_rx_checksum(struct e1000_adapter *adapter, u32 status_err, |
---|
3957 | 3943 | u32 csum, struct sk_buff *skb) |
---|
.. | .. |
---|
3988 | 3974 | |
---|
3989 | 3975 | /** |
---|
3990 | 3976 | * e1000_consume_page - helper function for jumbo Rx path |
---|
| 3977 | + * @bi: software descriptor shadow data |
---|
| 3978 | + * @skb: skb being modified |
---|
| 3979 | + * @length: length of data being added |
---|
3991 | 3980 | **/ |
---|
3992 | 3981 | static void e1000_consume_page(struct e1000_rx_buffer *bi, struct sk_buff *skb, |
---|
3993 | 3982 | u16 length) |
---|
.. | .. |
---|
4021 | 4010 | /** |
---|
4022 | 4011 | * e1000_tbi_adjust_stats |
---|
4023 | 4012 | * @hw: Struct containing variables accessed by shared code |
---|
| 4013 | + * @stats: point to stats struct |
---|
4024 | 4014 | * @frame_len: The length of the frame in question |
---|
4025 | 4015 | * @mac_addr: The Ethernet destination address of the frame in question |
---|
4026 | 4016 | * |
---|
.. | .. |
---|
4195 | 4185 | /* an error means any chain goes out the window |
---|
4196 | 4186 | * too |
---|
4197 | 4187 | */ |
---|
4198 | | - if (rx_ring->rx_skb_top) |
---|
4199 | | - dev_kfree_skb(rx_ring->rx_skb_top); |
---|
| 4188 | + dev_kfree_skb(rx_ring->rx_skb_top); |
---|
4200 | 4189 | rx_ring->rx_skb_top = NULL; |
---|
4201 | 4190 | goto next_desc; |
---|
4202 | 4191 | } |
---|
.. | .. |
---|
4559 | 4548 | * applicable for weak-ordered memory model archs, |
---|
4560 | 4549 | * such as IA-64). |
---|
4561 | 4550 | */ |
---|
4562 | | - wmb(); |
---|
| 4551 | + dma_wmb(); |
---|
4563 | 4552 | writel(i, adapter->hw.hw_addr + rx_ring->rdt); |
---|
4564 | 4553 | } |
---|
4565 | 4554 | } |
---|
.. | .. |
---|
4567 | 4556 | /** |
---|
4568 | 4557 | * e1000_alloc_rx_buffers - Replace used receive buffers; legacy & extended |
---|
4569 | 4558 | * @adapter: address of board private structure |
---|
| 4559 | + * @rx_ring: pointer to ring struct |
---|
| 4560 | + * @cleaned_count: number of new Rx buffers to try to allocate |
---|
4570 | 4561 | **/ |
---|
4571 | 4562 | static void e1000_alloc_rx_buffers(struct e1000_adapter *adapter, |
---|
4572 | 4563 | struct e1000_rx_ring *rx_ring, |
---|
.. | .. |
---|
4674 | 4665 | * applicable for weak-ordered memory model archs, |
---|
4675 | 4666 | * such as IA-64). |
---|
4676 | 4667 | */ |
---|
4677 | | - wmb(); |
---|
| 4668 | + dma_wmb(); |
---|
4678 | 4669 | writel(i, hw->hw_addr + rx_ring->rdt); |
---|
4679 | 4670 | } |
---|
4680 | 4671 | } |
---|
4681 | 4672 | |
---|
4682 | 4673 | /** |
---|
4683 | 4674 | * e1000_smartspeed - Workaround for SmartSpeed on 82541 and 82547 controllers. |
---|
4684 | | - * @adapter: |
---|
| 4675 | + * @adapter: address of board private structure |
---|
4685 | 4676 | **/ |
---|
4686 | 4677 | static void e1000_smartspeed(struct e1000_adapter *adapter) |
---|
4687 | 4678 | { |
---|
.. | .. |
---|
4737 | 4728 | } |
---|
4738 | 4729 | |
---|
4739 | 4730 | /** |
---|
4740 | | - * e1000_ioctl - |
---|
4741 | | - * @netdev: |
---|
4742 | | - * @ifreq: |
---|
4743 | | - * @cmd: |
---|
| 4731 | + * e1000_ioctl - handle ioctl calls |
---|
| 4732 | + * @netdev: pointer to our netdev |
---|
| 4733 | + * @ifr: pointer to interface request structure |
---|
| 4734 | + * @cmd: ioctl data |
---|
4744 | 4735 | **/ |
---|
4745 | 4736 | static int e1000_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) |
---|
4746 | 4737 | { |
---|
.. | .. |
---|
4756 | 4747 | |
---|
4757 | 4748 | /** |
---|
4758 | 4749 | * e1000_mii_ioctl - |
---|
4759 | | - * @netdev: |
---|
4760 | | - * @ifreq: |
---|
4761 | | - * @cmd: |
---|
| 4750 | + * @netdev: pointer to our netdev |
---|
| 4751 | + * @ifr: pointer to interface request structure |
---|
| 4752 | + * @cmd: ioctl data |
---|
4762 | 4753 | **/ |
---|
4763 | 4754 | static int e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, |
---|
4764 | 4755 | int cmd) |
---|
.. | .. |
---|
5073 | 5064 | struct e1000_hw *hw = &adapter->hw; |
---|
5074 | 5065 | u32 ctrl, ctrl_ext, rctl, status; |
---|
5075 | 5066 | u32 wufc = adapter->wol; |
---|
5076 | | -#ifdef CONFIG_PM |
---|
5077 | | - int retval = 0; |
---|
5078 | | -#endif |
---|
5079 | 5067 | |
---|
5080 | 5068 | netif_device_detach(netdev); |
---|
5081 | 5069 | |
---|
.. | .. |
---|
5088 | 5076 | WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags)); |
---|
5089 | 5077 | e1000_down(adapter); |
---|
5090 | 5078 | } |
---|
5091 | | - |
---|
5092 | | -#ifdef CONFIG_PM |
---|
5093 | | - retval = pci_save_state(pdev); |
---|
5094 | | - if (retval) |
---|
5095 | | - return retval; |
---|
5096 | | -#endif |
---|
5097 | 5079 | |
---|
5098 | 5080 | status = er32(STATUS); |
---|
5099 | 5081 | if (status & E1000_STATUS_LU) |
---|
.. | .. |
---|
5155 | 5137 | return 0; |
---|
5156 | 5138 | } |
---|
5157 | 5139 | |
---|
5158 | | -#ifdef CONFIG_PM |
---|
5159 | | -static int e1000_suspend(struct pci_dev *pdev, pm_message_t state) |
---|
| 5140 | +static int __maybe_unused e1000_suspend(struct device *dev) |
---|
5160 | 5141 | { |
---|
5161 | 5142 | int retval; |
---|
| 5143 | + struct pci_dev *pdev = to_pci_dev(dev); |
---|
5162 | 5144 | bool wake; |
---|
5163 | 5145 | |
---|
5164 | 5146 | retval = __e1000_shutdown(pdev, &wake); |
---|
5165 | | - if (retval) |
---|
5166 | | - return retval; |
---|
| 5147 | + device_set_wakeup_enable(dev, wake); |
---|
5167 | 5148 | |
---|
5168 | | - if (wake) { |
---|
5169 | | - pci_prepare_to_sleep(pdev); |
---|
5170 | | - } else { |
---|
5171 | | - pci_wake_from_d3(pdev, false); |
---|
5172 | | - pci_set_power_state(pdev, PCI_D3hot); |
---|
5173 | | - } |
---|
5174 | | - |
---|
5175 | | - return 0; |
---|
| 5149 | + return retval; |
---|
5176 | 5150 | } |
---|
5177 | 5151 | |
---|
5178 | | -static int e1000_resume(struct pci_dev *pdev) |
---|
| 5152 | +static int __maybe_unused e1000_resume(struct device *dev) |
---|
5179 | 5153 | { |
---|
| 5154 | + struct pci_dev *pdev = to_pci_dev(dev); |
---|
5180 | 5155 | struct net_device *netdev = pci_get_drvdata(pdev); |
---|
5181 | 5156 | struct e1000_adapter *adapter = netdev_priv(netdev); |
---|
5182 | 5157 | struct e1000_hw *hw = &adapter->hw; |
---|
5183 | 5158 | u32 err; |
---|
5184 | | - |
---|
5185 | | - pci_set_power_state(pdev, PCI_D0); |
---|
5186 | | - pci_restore_state(pdev); |
---|
5187 | | - pci_save_state(pdev); |
---|
5188 | 5159 | |
---|
5189 | 5160 | if (adapter->need_ioport) |
---|
5190 | 5161 | err = pci_enable_device(pdev); |
---|
.. | .. |
---|
5222 | 5193 | |
---|
5223 | 5194 | return 0; |
---|
5224 | 5195 | } |
---|
5225 | | -#endif |
---|
5226 | 5196 | |
---|
5227 | 5197 | static void e1000_shutdown(struct pci_dev *pdev) |
---|
5228 | 5198 | { |
---|