aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r--drivers/net/e1000/e1000_main.c41
1 files changed, 28 insertions, 13 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index fa849831d099..8d04752777a8 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -35,7 +35,7 @@ static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
35#else 35#else
36#define DRIVERNAPI "-NAPI" 36#define DRIVERNAPI "-NAPI"
37#endif 37#endif
38#define DRV_VERSION "7.2.9-k2"DRIVERNAPI 38#define DRV_VERSION "7.2.9-k4"DRIVERNAPI
39char e1000_driver_version[] = DRV_VERSION; 39char e1000_driver_version[] = DRV_VERSION;
40static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; 40static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
41 41
@@ -699,7 +699,10 @@ e1000_reset(struct e1000_adapter *adapter)
699 phy_data); 699 phy_data);
700 } 700 }
701 701
702 if ((adapter->en_mng_pt) && (adapter->hw.mac_type < e1000_82571)) { 702 if ((adapter->en_mng_pt) &&
703 (adapter->hw.mac_type >= e1000_82540) &&
704 (adapter->hw.mac_type < e1000_82571) &&
705 (adapter->hw.media_type == e1000_media_type_copper)) {
703 manc = E1000_READ_REG(&adapter->hw, MANC); 706 manc = E1000_READ_REG(&adapter->hw, MANC);
704 manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST); 707 manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST);
705 E1000_WRITE_REG(&adapter->hw, MANC, manc); 708 E1000_WRITE_REG(&adapter->hw, MANC, manc);
@@ -1076,8 +1079,9 @@ e1000_remove(struct pci_dev *pdev)
1076 1079
1077 flush_scheduled_work(); 1080 flush_scheduled_work();
1078 1081
1079 if (adapter->hw.mac_type < e1000_82571 && 1082 if (adapter->hw.mac_type >= e1000_82540 &&
1080 adapter->hw.media_type == e1000_media_type_copper) { 1083 adapter->hw.mac_type < e1000_82571 &&
1084 adapter->hw.media_type == e1000_media_type_copper) {
1081 manc = E1000_READ_REG(&adapter->hw, MANC); 1085 manc = E1000_READ_REG(&adapter->hw, MANC);
1082 if (manc & E1000_MANC_SMBUS_EN) { 1086 if (manc & E1000_MANC_SMBUS_EN) {
1083 manc |= E1000_MANC_ARP_EN; 1087 manc |= E1000_MANC_ARP_EN;
@@ -1804,9 +1808,11 @@ e1000_setup_rctl(struct e1000_adapter *adapter)
1804 * followed by the page buffers. Therefore, skb->data is 1808 * followed by the page buffers. Therefore, skb->data is
1805 * sized to hold the largest protocol header. 1809 * sized to hold the largest protocol header.
1806 */ 1810 */
1811 /* allocations using alloc_page take too long for regular MTU
1812 * so only enable packet split for jumbo frames */
1807 pages = PAGE_USE_COUNT(adapter->netdev->mtu); 1813 pages = PAGE_USE_COUNT(adapter->netdev->mtu);
1808 if ((adapter->hw.mac_type > e1000_82547_rev_2) && (pages <= 3) && 1814 if ((adapter->hw.mac_type >= e1000_82571) && (pages <= 3) &&
1809 PAGE_SIZE <= 16384) 1815 PAGE_SIZE <= 16384 && (rctl & E1000_RCTL_LPE))
1810 adapter->rx_ps_pages = pages; 1816 adapter->rx_ps_pages = pages;
1811 else 1817 else
1812 adapter->rx_ps_pages = 0; 1818 adapter->rx_ps_pages = 0;
@@ -2986,6 +2992,11 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
2986 return NETDEV_TX_OK; 2992 return NETDEV_TX_OK;
2987 } 2993 }
2988 2994
2995 /* 82571 and newer doesn't need the workaround that limited descriptor
2996 * length to 4kB */
2997 if (adapter->hw.mac_type >= e1000_82571)
2998 max_per_txd = 8192;
2999
2989#ifdef NETIF_F_TSO 3000#ifdef NETIF_F_TSO
2990 mss = skb_shinfo(skb)->gso_size; 3001 mss = skb_shinfo(skb)->gso_size;
2991 /* The controller does a simple calculation to 3002 /* The controller does a simple calculation to
@@ -3775,9 +3786,6 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
3775 3786
3776 length = le16_to_cpu(rx_desc->length); 3787 length = le16_to_cpu(rx_desc->length);
3777 3788
3778 /* adjust length to remove Ethernet CRC */
3779 length -= 4;
3780
3781 if (unlikely(!(status & E1000_RXD_STAT_EOP))) { 3789 if (unlikely(!(status & E1000_RXD_STAT_EOP))) {
3782 /* All receives must fit into a single buffer */ 3790 /* All receives must fit into a single buffer */
3783 E1000_DBG("%s: Receive packet consumed multiple" 3791 E1000_DBG("%s: Receive packet consumed multiple"
@@ -3805,6 +3813,10 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
3805 } 3813 }
3806 } 3814 }
3807 3815
3816 /* adjust length to remove Ethernet CRC, this must be
3817 * done after the TBI_ACCEPT workaround above */
3818 length -= 4;
3819
3808 /* code added for copybreak, this should improve 3820 /* code added for copybreak, this should improve
3809 * performance for small packets with large amounts 3821 * performance for small packets with large amounts
3810 * of reassembly being done in the stack */ 3822 * of reassembly being done in the stack */
@@ -4773,8 +4785,9 @@ e1000_suspend(struct pci_dev *pdev, pm_message_t state)
4773 pci_enable_wake(pdev, PCI_D3cold, 0); 4785 pci_enable_wake(pdev, PCI_D3cold, 0);
4774 } 4786 }
4775 4787
4776 if (adapter->hw.mac_type < e1000_82571 && 4788 if (adapter->hw.mac_type >= e1000_82540 &&
4777 adapter->hw.media_type == e1000_media_type_copper) { 4789 adapter->hw.mac_type < e1000_82571 &&
4790 adapter->hw.media_type == e1000_media_type_copper) {
4778 manc = E1000_READ_REG(&adapter->hw, MANC); 4791 manc = E1000_READ_REG(&adapter->hw, MANC);
4779 if (manc & E1000_MANC_SMBUS_EN) { 4792 if (manc & E1000_MANC_SMBUS_EN) {
4780 manc |= E1000_MANC_ARP_EN; 4793 manc |= E1000_MANC_ARP_EN;
@@ -4825,8 +4838,9 @@ e1000_resume(struct pci_dev *pdev)
4825 4838
4826 netif_device_attach(netdev); 4839 netif_device_attach(netdev);
4827 4840
4828 if (adapter->hw.mac_type < e1000_82571 && 4841 if (adapter->hw.mac_type >= e1000_82540 &&
4829 adapter->hw.media_type == e1000_media_type_copper) { 4842 adapter->hw.mac_type < e1000_82571 &&
4843 adapter->hw.media_type == e1000_media_type_copper) {
4830 manc = E1000_READ_REG(&adapter->hw, MANC); 4844 manc = E1000_READ_REG(&adapter->hw, MANC);
4831 manc &= ~(E1000_MANC_ARP_EN); 4845 manc &= ~(E1000_MANC_ARP_EN);
4832 E1000_WRITE_REG(&adapter->hw, MANC, manc); 4846 E1000_WRITE_REG(&adapter->hw, MANC, manc);
@@ -4944,6 +4958,7 @@ static void e1000_io_resume(struct pci_dev *pdev)
4944 netif_device_attach(netdev); 4958 netif_device_attach(netdev);
4945 4959
4946 if (adapter->hw.mac_type >= e1000_82540 && 4960 if (adapter->hw.mac_type >= e1000_82540 &&
4961 adapter->hw.mac_type < e1000_82571 &&
4947 adapter->hw.media_type == e1000_media_type_copper) { 4962 adapter->hw.media_type == e1000_media_type_copper) {
4948 manc = E1000_READ_REG(&adapter->hw, MANC); 4963 manc = E1000_READ_REG(&adapter->hw, MANC);
4949 manc &= ~(E1000_MANC_ARP_EN); 4964 manc &= ~(E1000_MANC_ARP_EN);