diff options
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ethtool.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ich8lan.c | 13 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ich8lan.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/netdev.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_82575.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_mac.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 25 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 19 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 |
9 files changed, 74 insertions, 10 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c index a8633b8f0ac5..d14c8f53384c 100644 --- a/drivers/net/ethernet/intel/e1000e/ethtool.c +++ b/drivers/net/ethernet/intel/e1000e/ethtool.c | |||
@@ -922,6 +922,14 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data) | |||
922 | else | 922 | else |
923 | mask &= ~(1 << 30); | 923 | mask &= ~(1 << 30); |
924 | } | 924 | } |
925 | if (mac->type == e1000_pch2lan) { | ||
926 | /* SHRAH[0,1,2] different than previous */ | ||
927 | if (i == 7) | ||
928 | mask &= 0xFFF4FFFF; | ||
929 | /* SHRAH[3] different than SHRAH[0,1,2] */ | ||
930 | if (i == 10) | ||
931 | mask |= (1 << 30); | ||
932 | } | ||
925 | 933 | ||
926 | REG_PATTERN_TEST_ARRAY(E1000_RA, ((i << 1) + 1), mask, | 934 | REG_PATTERN_TEST_ARRAY(E1000_RA, ((i << 1) + 1), mask, |
927 | 0xFFFFFFFF); | 935 | 0xFFFFFFFF); |
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index af08188d7e62..42f0f6717511 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c | |||
@@ -1371,7 +1371,10 @@ static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index) | |||
1371 | return; | 1371 | return; |
1372 | } | 1372 | } |
1373 | 1373 | ||
1374 | if (index < hw->mac.rar_entry_count) { | 1374 | /* RAR[1-6] are owned by manageability. Skip those and program the |
1375 | * next address into the SHRA register array. | ||
1376 | */ | ||
1377 | if (index < (u32)(hw->mac.rar_entry_count - 6)) { | ||
1375 | s32 ret_val; | 1378 | s32 ret_val; |
1376 | 1379 | ||
1377 | ret_val = e1000_acquire_swflag_ich8lan(hw); | 1380 | ret_val = e1000_acquire_swflag_ich8lan(hw); |
@@ -1962,8 +1965,8 @@ void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw) | |||
1962 | if (ret_val) | 1965 | if (ret_val) |
1963 | goto release; | 1966 | goto release; |
1964 | 1967 | ||
1965 | /* Copy both RAL/H (rar_entry_count) and SHRAL/H (+4) to PHY */ | 1968 | /* Copy both RAL/H (rar_entry_count) and SHRAL/H to PHY */ |
1966 | for (i = 0; i < (hw->mac.rar_entry_count + 4); i++) { | 1969 | for (i = 0; i < (hw->mac.rar_entry_count); i++) { |
1967 | mac_reg = er32(RAL(i)); | 1970 | mac_reg = er32(RAL(i)); |
1968 | hw->phy.ops.write_reg_page(hw, BM_RAR_L(i), | 1971 | hw->phy.ops.write_reg_page(hw, BM_RAR_L(i), |
1969 | (u16)(mac_reg & 0xFFFF)); | 1972 | (u16)(mac_reg & 0xFFFF)); |
@@ -2007,10 +2010,10 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable) | |||
2007 | return ret_val; | 2010 | return ret_val; |
2008 | 2011 | ||
2009 | if (enable) { | 2012 | if (enable) { |
2010 | /* Write Rx addresses (rar_entry_count for RAL/H, +4 for | 2013 | /* Write Rx addresses (rar_entry_count for RAL/H, and |
2011 | * SHRAL/H) and initial CRC values to the MAC | 2014 | * SHRAL/H) and initial CRC values to the MAC |
2012 | */ | 2015 | */ |
2013 | for (i = 0; i < (hw->mac.rar_entry_count + 4); i++) { | 2016 | for (i = 0; i < hw->mac.rar_entry_count; i++) { |
2014 | u8 mac_addr[ETH_ALEN] = { 0 }; | 2017 | u8 mac_addr[ETH_ALEN] = { 0 }; |
2015 | u32 addr_high, addr_low; | 2018 | u32 addr_high, addr_low; |
2016 | 2019 | ||
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.h b/drivers/net/ethernet/intel/e1000e/ich8lan.h index 59865695b282..217090df33e7 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.h +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.h | |||
@@ -98,7 +98,7 @@ | |||
98 | #define PCIE_ICH8_SNOOP_ALL PCIE_NO_SNOOP_ALL | 98 | #define PCIE_ICH8_SNOOP_ALL PCIE_NO_SNOOP_ALL |
99 | 99 | ||
100 | #define E1000_ICH_RAR_ENTRIES 7 | 100 | #define E1000_ICH_RAR_ENTRIES 7 |
101 | #define E1000_PCH2_RAR_ENTRIES 5 /* RAR[0], SHRA[0-3] */ | 101 | #define E1000_PCH2_RAR_ENTRIES 11 /* RAR[0-6], SHRA[0-3] */ |
102 | #define E1000_PCH_LPT_RAR_ENTRIES 12 /* RAR[0], SHRA[0-10] */ | 102 | #define E1000_PCH_LPT_RAR_ENTRIES 12 /* RAR[0], SHRA[0-10] */ |
103 | 103 | ||
104 | #define PHY_PAGE_SHIFT 5 | 104 | #define PHY_PAGE_SHIFT 5 |
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index e87e9b01f404..4ef786775acb 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | |||
@@ -4868,7 +4868,7 @@ static void e1000_watchdog_task(struct work_struct *work) | |||
4868 | */ | 4868 | */ |
4869 | if ((hw->phy.type == e1000_phy_igp_3 || | 4869 | if ((hw->phy.type == e1000_phy_igp_3 || |
4870 | hw->phy.type == e1000_phy_bm) && | 4870 | hw->phy.type == e1000_phy_bm) && |
4871 | (hw->mac.autoneg == true) && | 4871 | hw->mac.autoneg && |
4872 | (adapter->link_speed == SPEED_10 || | 4872 | (adapter->link_speed == SPEED_10 || |
4873 | adapter->link_speed == SPEED_100) && | 4873 | adapter->link_speed == SPEED_100) && |
4874 | (adapter->link_duplex == HALF_DUPLEX)) { | 4874 | (adapter->link_duplex == HALF_DUPLEX)) { |
diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c index 79b58353d849..47c2d10df826 100644 --- a/drivers/net/ethernet/intel/igb/e1000_82575.c +++ b/drivers/net/ethernet/intel/igb/e1000_82575.c | |||
@@ -719,6 +719,10 @@ static s32 igb_get_phy_id_82575(struct e1000_hw *hw) | |||
719 | u32 ctrl_ext; | 719 | u32 ctrl_ext; |
720 | u32 mdic; | 720 | u32 mdic; |
721 | 721 | ||
722 | /* Extra read required for some PHY's on i354 */ | ||
723 | if (hw->mac.type == e1000_i354) | ||
724 | igb_get_phy_id(hw); | ||
725 | |||
722 | /* For SGMII PHYs, we try the list of possible addresses until | 726 | /* For SGMII PHYs, we try the list of possible addresses until |
723 | * we find one that works. For non-SGMII PHYs | 727 | * we find one that works. For non-SGMII PHYs |
724 | * (e.g. integrated copper PHYs), an address of 1 should | 728 | * (e.g. integrated copper PHYs), an address of 1 should |
diff --git a/drivers/net/ethernet/intel/igb/e1000_mac.c b/drivers/net/ethernet/intel/igb/e1000_mac.c index f0dfd41dd4bd..298f0ed50670 100644 --- a/drivers/net/ethernet/intel/igb/e1000_mac.c +++ b/drivers/net/ethernet/intel/igb/e1000_mac.c | |||
@@ -712,6 +712,7 @@ static s32 igb_set_fc_watermarks(struct e1000_hw *hw) | |||
712 | static s32 igb_set_default_fc(struct e1000_hw *hw) | 712 | static s32 igb_set_default_fc(struct e1000_hw *hw) |
713 | { | 713 | { |
714 | s32 ret_val = 0; | 714 | s32 ret_val = 0; |
715 | u16 lan_offset; | ||
715 | u16 nvm_data; | 716 | u16 nvm_data; |
716 | 717 | ||
717 | /* Read and store word 0x0F of the EEPROM. This word contains bits | 718 | /* Read and store word 0x0F of the EEPROM. This word contains bits |
@@ -722,7 +723,14 @@ static s32 igb_set_default_fc(struct e1000_hw *hw) | |||
722 | * control setting, then the variable hw->fc will | 723 | * control setting, then the variable hw->fc will |
723 | * be initialized based on a value in the EEPROM. | 724 | * be initialized based on a value in the EEPROM. |
724 | */ | 725 | */ |
725 | ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &nvm_data); | 726 | if (hw->mac.type == e1000_i350) { |
727 | lan_offset = NVM_82580_LAN_FUNC_OFFSET(hw->bus.func); | ||
728 | ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG | ||
729 | + lan_offset, 1, &nvm_data); | ||
730 | } else { | ||
731 | ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, | ||
732 | 1, &nvm_data); | ||
733 | } | ||
726 | 734 | ||
727 | if (ret_val) { | 735 | if (ret_val) { |
728 | hw_dbg("NVM Read Error\n"); | 736 | hw_dbg("NVM Read Error\n"); |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 0e1b973659b0..e8649abf97c0 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | |||
@@ -160,6 +160,13 @@ static int ixgbe_get_settings(struct net_device *netdev, | |||
160 | bool autoneg = false; | 160 | bool autoneg = false; |
161 | bool link_up; | 161 | bool link_up; |
162 | 162 | ||
163 | /* SFP type is needed for get_link_capabilities */ | ||
164 | if (hw->phy.media_type & (ixgbe_media_type_fiber | | ||
165 | ixgbe_media_type_fiber_qsfp)) { | ||
166 | if (hw->phy.sfp_type == ixgbe_sfp_type_not_present) | ||
167 | hw->phy.ops.identify_sfp(hw); | ||
168 | } | ||
169 | |||
163 | hw->mac.ops.get_link_capabilities(hw, &supported_link, &autoneg); | 170 | hw->mac.ops.get_link_capabilities(hw, &supported_link, &autoneg); |
164 | 171 | ||
165 | /* set the supported link speeds */ | 172 | /* set the supported link speeds */ |
@@ -186,6 +193,11 @@ static int ixgbe_get_settings(struct net_device *netdev, | |||
186 | ecmd->advertising |= ADVERTISED_1000baseT_Full; | 193 | ecmd->advertising |= ADVERTISED_1000baseT_Full; |
187 | if (supported_link & IXGBE_LINK_SPEED_100_FULL) | 194 | if (supported_link & IXGBE_LINK_SPEED_100_FULL) |
188 | ecmd->advertising |= ADVERTISED_100baseT_Full; | 195 | ecmd->advertising |= ADVERTISED_100baseT_Full; |
196 | |||
197 | if (hw->phy.multispeed_fiber && !autoneg) { | ||
198 | if (supported_link & IXGBE_LINK_SPEED_10GB_FULL) | ||
199 | ecmd->advertising = ADVERTISED_10000baseT_Full; | ||
200 | } | ||
189 | } | 201 | } |
190 | 202 | ||
191 | if (autoneg) { | 203 | if (autoneg) { |
@@ -314,6 +326,14 @@ static int ixgbe_set_settings(struct net_device *netdev, | |||
314 | if (ecmd->advertising & ~ecmd->supported) | 326 | if (ecmd->advertising & ~ecmd->supported) |
315 | return -EINVAL; | 327 | return -EINVAL; |
316 | 328 | ||
329 | /* only allow one speed at a time if no autoneg */ | ||
330 | if (!ecmd->autoneg && hw->phy.multispeed_fiber) { | ||
331 | if (ecmd->advertising == | ||
332 | (ADVERTISED_10000baseT_Full | | ||
333 | ADVERTISED_1000baseT_Full)) | ||
334 | return -EINVAL; | ||
335 | } | ||
336 | |||
317 | old = hw->phy.autoneg_advertised; | 337 | old = hw->phy.autoneg_advertised; |
318 | advertised = 0; | 338 | advertised = 0; |
319 | if (ecmd->advertising & ADVERTISED_10000baseT_Full) | 339 | if (ecmd->advertising & ADVERTISED_10000baseT_Full) |
@@ -1805,6 +1825,10 @@ static int ixgbe_run_loopback_test(struct ixgbe_adapter *adapter) | |||
1805 | unsigned int size = 1024; | 1825 | unsigned int size = 1024; |
1806 | netdev_tx_t tx_ret_val; | 1826 | netdev_tx_t tx_ret_val; |
1807 | struct sk_buff *skb; | 1827 | struct sk_buff *skb; |
1828 | u32 flags_orig = adapter->flags; | ||
1829 | |||
1830 | /* DCB can modify the frames on Tx */ | ||
1831 | adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED; | ||
1808 | 1832 | ||
1809 | /* allocate test skb */ | 1833 | /* allocate test skb */ |
1810 | skb = alloc_skb(size, GFP_KERNEL); | 1834 | skb = alloc_skb(size, GFP_KERNEL); |
@@ -1857,6 +1881,7 @@ static int ixgbe_run_loopback_test(struct ixgbe_adapter *adapter) | |||
1857 | 1881 | ||
1858 | /* free the original skb */ | 1882 | /* free the original skb */ |
1859 | kfree_skb(skb); | 1883 | kfree_skb(skb); |
1884 | adapter->flags = flags_orig; | ||
1860 | 1885 | ||
1861 | return ret_val; | 1886 | return ret_val; |
1862 | } | 1887 | } |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 7aba452833e5..0ade0cd5ef53 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -3571,7 +3571,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) | |||
3571 | { | 3571 | { |
3572 | struct ixgbe_hw *hw = &adapter->hw; | 3572 | struct ixgbe_hw *hw = &adapter->hw; |
3573 | int i; | 3573 | int i; |
3574 | u32 rxctrl; | 3574 | u32 rxctrl, rfctl; |
3575 | 3575 | ||
3576 | /* disable receives while setting up the descriptors */ | 3576 | /* disable receives while setting up the descriptors */ |
3577 | rxctrl = IXGBE_READ_REG(hw, IXGBE_RXCTRL); | 3577 | rxctrl = IXGBE_READ_REG(hw, IXGBE_RXCTRL); |
@@ -3580,6 +3580,13 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) | |||
3580 | ixgbe_setup_psrtype(adapter); | 3580 | ixgbe_setup_psrtype(adapter); |
3581 | ixgbe_setup_rdrxctl(adapter); | 3581 | ixgbe_setup_rdrxctl(adapter); |
3582 | 3582 | ||
3583 | /* RSC Setup */ | ||
3584 | rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL); | ||
3585 | rfctl &= ~IXGBE_RFCTL_RSC_DIS; | ||
3586 | if (!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)) | ||
3587 | rfctl |= IXGBE_RFCTL_RSC_DIS; | ||
3588 | IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl); | ||
3589 | |||
3583 | /* Program registers for the distribution of queues */ | 3590 | /* Program registers for the distribution of queues */ |
3584 | ixgbe_setup_mrqc(adapter); | 3591 | ixgbe_setup_mrqc(adapter); |
3585 | 3592 | ||
@@ -5993,8 +6000,16 @@ static void ixgbe_sfp_link_config_subtask(struct ixgbe_adapter *adapter) | |||
5993 | adapter->flags &= ~IXGBE_FLAG_NEED_LINK_CONFIG; | 6000 | adapter->flags &= ~IXGBE_FLAG_NEED_LINK_CONFIG; |
5994 | 6001 | ||
5995 | speed = hw->phy.autoneg_advertised; | 6002 | speed = hw->phy.autoneg_advertised; |
5996 | if ((!speed) && (hw->mac.ops.get_link_capabilities)) | 6003 | if ((!speed) && (hw->mac.ops.get_link_capabilities)) { |
5997 | hw->mac.ops.get_link_capabilities(hw, &speed, &autoneg); | 6004 | hw->mac.ops.get_link_capabilities(hw, &speed, &autoneg); |
6005 | |||
6006 | /* setup the highest link when no autoneg */ | ||
6007 | if (!autoneg) { | ||
6008 | if (speed & IXGBE_LINK_SPEED_10GB_FULL) | ||
6009 | speed = IXGBE_LINK_SPEED_10GB_FULL; | ||
6010 | } | ||
6011 | } | ||
6012 | |||
5998 | if (hw->mac.ops.setup_link) | 6013 | if (hw->mac.ops.setup_link) |
5999 | hw->mac.ops.setup_link(hw, speed, true); | 6014 | hw->mac.ops.setup_link(hw, speed, true); |
6000 | 6015 | ||
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h index 6442cf8f9dce..10775cb9b6d8 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | |||
@@ -1861,6 +1861,7 @@ enum { | |||
1861 | #define IXGBE_RFCTL_ISCSI_DIS 0x00000001 | 1861 | #define IXGBE_RFCTL_ISCSI_DIS 0x00000001 |
1862 | #define IXGBE_RFCTL_ISCSI_DWC_MASK 0x0000003E | 1862 | #define IXGBE_RFCTL_ISCSI_DWC_MASK 0x0000003E |
1863 | #define IXGBE_RFCTL_ISCSI_DWC_SHIFT 1 | 1863 | #define IXGBE_RFCTL_ISCSI_DWC_SHIFT 1 |
1864 | #define IXGBE_RFCTL_RSC_DIS 0x00000020 | ||
1864 | #define IXGBE_RFCTL_NFSW_DIS 0x00000040 | 1865 | #define IXGBE_RFCTL_NFSW_DIS 0x00000040 |
1865 | #define IXGBE_RFCTL_NFSR_DIS 0x00000080 | 1866 | #define IXGBE_RFCTL_NFSR_DIS 0x00000080 |
1866 | #define IXGBE_RFCTL_NFS_VER_MASK 0x00000300 | 1867 | #define IXGBE_RFCTL_NFS_VER_MASK 0x00000300 |