diff options
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index add8dc4aa7b0..97e71a4fe8eb 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -220,6 +220,7 @@ static void e1000_restore_vlan(struct e1000_adapter *adapter); | |||
220 | static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); | 220 | static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); |
221 | static int e1000_resume(struct pci_dev *pdev); | 221 | static int e1000_resume(struct pci_dev *pdev); |
222 | #endif | 222 | #endif |
223 | static void e1000_shutdown(struct pci_dev *pdev); | ||
223 | 224 | ||
224 | #ifdef CONFIG_NET_POLL_CONTROLLER | 225 | #ifdef CONFIG_NET_POLL_CONTROLLER |
225 | /* for netdump / net console */ | 226 | /* for netdump / net console */ |
@@ -235,8 +236,9 @@ static struct pci_driver e1000_driver = { | |||
235 | /* Power Managment Hooks */ | 236 | /* Power Managment Hooks */ |
236 | #ifdef CONFIG_PM | 237 | #ifdef CONFIG_PM |
237 | .suspend = e1000_suspend, | 238 | .suspend = e1000_suspend, |
238 | .resume = e1000_resume | 239 | .resume = e1000_resume, |
239 | #endif | 240 | #endif |
241 | .shutdown = e1000_shutdown | ||
240 | }; | 242 | }; |
241 | 243 | ||
242 | MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); | 244 | MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); |
@@ -3517,7 +3519,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
3517 | buffer_info = &rx_ring->buffer_info[i]; | 3519 | buffer_info = &rx_ring->buffer_info[i]; |
3518 | 3520 | ||
3519 | while (rx_desc->status & E1000_RXD_STAT_DD) { | 3521 | while (rx_desc->status & E1000_RXD_STAT_DD) { |
3520 | struct sk_buff *skb, *next_skb; | 3522 | struct sk_buff *skb; |
3521 | u8 status; | 3523 | u8 status; |
3522 | #ifdef CONFIG_E1000_NAPI | 3524 | #ifdef CONFIG_E1000_NAPI |
3523 | if (*work_done >= work_to_do) | 3525 | if (*work_done >= work_to_do) |
@@ -3535,8 +3537,6 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
3535 | prefetch(next_rxd); | 3537 | prefetch(next_rxd); |
3536 | 3538 | ||
3537 | next_buffer = &rx_ring->buffer_info[i]; | 3539 | next_buffer = &rx_ring->buffer_info[i]; |
3538 | next_skb = next_buffer->skb; | ||
3539 | prefetch(next_skb->data - NET_IP_ALIGN); | ||
3540 | 3540 | ||
3541 | cleaned = TRUE; | 3541 | cleaned = TRUE; |
3542 | cleaned_count++; | 3542 | cleaned_count++; |
@@ -3666,7 +3666,7 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
3666 | struct e1000_buffer *buffer_info, *next_buffer; | 3666 | struct e1000_buffer *buffer_info, *next_buffer; |
3667 | struct e1000_ps_page *ps_page; | 3667 | struct e1000_ps_page *ps_page; |
3668 | struct e1000_ps_page_dma *ps_page_dma; | 3668 | struct e1000_ps_page_dma *ps_page_dma; |
3669 | struct sk_buff *skb, *next_skb; | 3669 | struct sk_buff *skb; |
3670 | unsigned int i, j; | 3670 | unsigned int i, j; |
3671 | uint32_t length, staterr; | 3671 | uint32_t length, staterr; |
3672 | int cleaned_count = 0; | 3672 | int cleaned_count = 0; |
@@ -3695,8 +3695,6 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
3695 | prefetch(next_rxd); | 3695 | prefetch(next_rxd); |
3696 | 3696 | ||
3697 | next_buffer = &rx_ring->buffer_info[i]; | 3697 | next_buffer = &rx_ring->buffer_info[i]; |
3698 | next_skb = next_buffer->skb; | ||
3699 | prefetch(next_skb->data - NET_IP_ALIGN); | ||
3700 | 3698 | ||
3701 | cleaned = TRUE; | 3699 | cleaned = TRUE; |
3702 | cleaned_count++; | 3700 | cleaned_count++; |
@@ -3768,6 +3766,7 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
3768 | ps_page->ps_page[j] = NULL; | 3766 | ps_page->ps_page[j] = NULL; |
3769 | skb->len += length; | 3767 | skb->len += length; |
3770 | skb->data_len += length; | 3768 | skb->data_len += length; |
3769 | skb->truesize += length; | ||
3771 | } | 3770 | } |
3772 | 3771 | ||
3773 | copydone: | 3772 | copydone: |
@@ -4610,6 +4609,12 @@ e1000_resume(struct pci_dev *pdev) | |||
4610 | return 0; | 4609 | return 0; |
4611 | } | 4610 | } |
4612 | #endif | 4611 | #endif |
4612 | |||
4613 | static void e1000_shutdown(struct pci_dev *pdev) | ||
4614 | { | ||
4615 | e1000_suspend(pdev, PMSG_SUSPEND); | ||
4616 | } | ||
4617 | |||
4613 | #ifdef CONFIG_NET_POLL_CONTROLLER | 4618 | #ifdef CONFIG_NET_POLL_CONTROLLER |
4614 | /* | 4619 | /* |
4615 | * Polling 'interrupt' - used by things like netconsole to send skbs | 4620 | * Polling 'interrupt' - used by things like netconsole to send skbs |