diff options
author | Carolyn Wyborny <carolyn.wyborny@intel.com> | 2013-04-18 18:21:30 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-04-18 19:40:35 -0400 |
commit | ceb5f13b70cd6e7afa87ba1b13eb900a766a28e4 (patch) | |
tree | a81eabbd1edf494207c2412c274a2c649354a39e /drivers/net | |
parent | 70ea47832521e6c0f053b4906484a7a34fbf0e5d (diff) |
igb: Add support for i354 devices
This patch adds base support for new i354 devices. Loopback test is
unsupported for this release.
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_82575.c | 122 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_82575.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_defines.h | 16 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_hw.h | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_mac.c | 13 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_nvm.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_phy.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_regs.h | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb.h | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_ethtool.c | 67 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_main.c | 49 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_ptp.c | 4 |
12 files changed, 251 insertions, 36 deletions
diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c index 8ff938d94912..c9bba39d50bd 100644 --- a/drivers/net/ethernet/intel/igb/e1000_82575.c +++ b/drivers/net/ethernet/intel/igb/e1000_82575.c | |||
@@ -100,6 +100,7 @@ static bool igb_sgmii_uses_mdio_82575(struct e1000_hw *hw) | |||
100 | break; | 100 | break; |
101 | case e1000_82580: | 101 | case e1000_82580: |
102 | case e1000_i350: | 102 | case e1000_i350: |
103 | case e1000_i354: | ||
103 | case e1000_i210: | 104 | case e1000_i210: |
104 | case e1000_i211: | 105 | case e1000_i211: |
105 | reg = rd32(E1000_MDICNFG); | 106 | reg = rd32(E1000_MDICNFG); |
@@ -149,6 +150,7 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw) | |||
149 | switch (hw->mac.type) { | 150 | switch (hw->mac.type) { |
150 | case e1000_82580: | 151 | case e1000_82580: |
151 | case e1000_i350: | 152 | case e1000_i350: |
153 | case e1000_i354: | ||
152 | phy->ops.read_reg = igb_read_phy_reg_82580; | 154 | phy->ops.read_reg = igb_read_phy_reg_82580; |
153 | phy->ops.write_reg = igb_write_phy_reg_82580; | 155 | phy->ops.write_reg = igb_write_phy_reg_82580; |
154 | break; | 156 | break; |
@@ -174,13 +176,14 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw) | |||
174 | 176 | ||
175 | /* Verify phy id and set remaining function pointers */ | 177 | /* Verify phy id and set remaining function pointers */ |
176 | switch (phy->id) { | 178 | switch (phy->id) { |
179 | case M88E1545_E_PHY_ID: | ||
177 | case I347AT4_E_PHY_ID: | 180 | case I347AT4_E_PHY_ID: |
178 | case M88E1112_E_PHY_ID: | 181 | case M88E1112_E_PHY_ID: |
179 | case M88E1111_I_PHY_ID: | 182 | case M88E1111_I_PHY_ID: |
180 | phy->type = e1000_phy_m88; | 183 | phy->type = e1000_phy_m88; |
184 | phy->ops.check_polarity = igb_check_polarity_m88; | ||
181 | phy->ops.get_phy_info = igb_get_phy_info_m88; | 185 | phy->ops.get_phy_info = igb_get_phy_info_m88; |
182 | if (phy->id == I347AT4_E_PHY_ID || | 186 | if (phy->id != M88E1111_I_PHY_ID) |
183 | phy->id == M88E1112_E_PHY_ID) | ||
184 | phy->ops.get_cable_length = | 187 | phy->ops.get_cable_length = |
185 | igb_get_cable_length_m88_gen2; | 188 | igb_get_cable_length_m88_gen2; |
186 | else | 189 | else |
@@ -287,6 +290,7 @@ static s32 igb_init_nvm_params_82575(struct e1000_hw *hw) | |||
287 | nvm->ops.read = igb_read_nvm_spi; | 290 | nvm->ops.read = igb_read_nvm_spi; |
288 | nvm->ops.write = igb_write_nvm_spi; | 291 | nvm->ops.write = igb_write_nvm_spi; |
289 | break; | 292 | break; |
293 | case e1000_i354: | ||
290 | case e1000_i350: | 294 | case e1000_i350: |
291 | nvm->ops.validate = igb_validate_nvm_checksum_i350; | 295 | nvm->ops.validate = igb_validate_nvm_checksum_i350; |
292 | nvm->ops.update = igb_update_nvm_checksum_i350; | 296 | nvm->ops.update = igb_update_nvm_checksum_i350; |
@@ -352,6 +356,7 @@ static s32 igb_init_mac_params_82575(struct e1000_hw *hw) | |||
352 | mac->rar_entry_count = E1000_RAR_ENTRIES_82580; | 356 | mac->rar_entry_count = E1000_RAR_ENTRIES_82580; |
353 | break; | 357 | break; |
354 | case e1000_i350: | 358 | case e1000_i350: |
359 | case e1000_i354: | ||
355 | mac->rar_entry_count = E1000_RAR_ENTRIES_I350; | 360 | mac->rar_entry_count = E1000_RAR_ENTRIES_I350; |
356 | break; | 361 | break; |
357 | default: | 362 | default: |
@@ -445,6 +450,11 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw) | |||
445 | case E1000_DEV_ID_I211_COPPER: | 450 | case E1000_DEV_ID_I211_COPPER: |
446 | mac->type = e1000_i211; | 451 | mac->type = e1000_i211; |
447 | break; | 452 | break; |
453 | case E1000_DEV_ID_I354_BACKPLANE_1GBPS: | ||
454 | case E1000_DEV_ID_I354_SGMII: | ||
455 | case E1000_DEV_ID_I354_BACKPLANE_2_5GBPS: | ||
456 | mac->type = e1000_i354; | ||
457 | break; | ||
448 | default: | 458 | default: |
449 | return -E1000_ERR_MAC_INIT; | 459 | return -E1000_ERR_MAC_INIT; |
450 | break; | 460 | break; |
@@ -642,6 +652,7 @@ static s32 igb_get_phy_id_82575(struct e1000_hw *hw) | |||
642 | break; | 652 | break; |
643 | case e1000_82580: | 653 | case e1000_82580: |
644 | case e1000_i350: | 654 | case e1000_i350: |
655 | case e1000_i354: | ||
645 | case e1000_i210: | 656 | case e1000_i210: |
646 | case e1000_i211: | 657 | case e1000_i211: |
647 | mdic = rd32(E1000_MDICNFG); | 658 | mdic = rd32(E1000_MDICNFG); |
@@ -1272,7 +1283,7 @@ static s32 igb_init_hw_82575(struct e1000_hw *hw) | |||
1272 | 1283 | ||
1273 | /* Disabling VLAN filtering */ | 1284 | /* Disabling VLAN filtering */ |
1274 | hw_dbg("Initializing the IEEE VLAN\n"); | 1285 | hw_dbg("Initializing the IEEE VLAN\n"); |
1275 | if (hw->mac.type == e1000_i350) | 1286 | if ((hw->mac.type == e1000_i350) || (hw->mac.type == e1000_i354)) |
1276 | igb_clear_vfta_i350(hw); | 1287 | igb_clear_vfta_i350(hw); |
1277 | else | 1288 | else |
1278 | igb_clear_vfta(hw); | 1289 | igb_clear_vfta(hw); |
@@ -1348,6 +1359,7 @@ static s32 igb_setup_copper_link_82575(struct e1000_hw *hw) | |||
1348 | switch (hw->phy.id) { | 1359 | switch (hw->phy.id) { |
1349 | case I347AT4_E_PHY_ID: | 1360 | case I347AT4_E_PHY_ID: |
1350 | case M88E1112_E_PHY_ID: | 1361 | case M88E1112_E_PHY_ID: |
1362 | case M88E1545_E_PHY_ID: | ||
1351 | case I210_I_PHY_ID: | 1363 | case I210_I_PHY_ID: |
1352 | ret_val = igb_copper_link_setup_m88_gen2(hw); | 1364 | ret_val = igb_copper_link_setup_m88_gen2(hw); |
1353 | break; | 1365 | break; |
@@ -1804,6 +1816,7 @@ void igb_vmdq_set_anti_spoofing_pf(struct e1000_hw *hw, bool enable, int pf) | |||
1804 | reg_offset = E1000_DTXSWC; | 1816 | reg_offset = E1000_DTXSWC; |
1805 | break; | 1817 | break; |
1806 | case e1000_i350: | 1818 | case e1000_i350: |
1819 | case e1000_i354: | ||
1807 | reg_offset = E1000_TXSWC; | 1820 | reg_offset = E1000_TXSWC; |
1808 | break; | 1821 | break; |
1809 | default: | 1822 | default: |
@@ -1845,6 +1858,7 @@ void igb_vmdq_set_loopback_pf(struct e1000_hw *hw, bool enable) | |||
1845 | dtxswc &= ~E1000_DTXSWC_VMDQ_LOOPBACK_EN; | 1858 | dtxswc &= ~E1000_DTXSWC_VMDQ_LOOPBACK_EN; |
1846 | wr32(E1000_DTXSWC, dtxswc); | 1859 | wr32(E1000_DTXSWC, dtxswc); |
1847 | break; | 1860 | break; |
1861 | case e1000_i354: | ||
1848 | case e1000_i350: | 1862 | case e1000_i350: |
1849 | dtxswc = rd32(E1000_TXSWC); | 1863 | dtxswc = rd32(E1000_TXSWC); |
1850 | if (enable) | 1864 | if (enable) |
@@ -2365,6 +2379,108 @@ out: | |||
2365 | return ret_val; | 2379 | return ret_val; |
2366 | } | 2380 | } |
2367 | 2381 | ||
2382 | /** | ||
2383 | * igb_set_eee_i354 - Enable/disable EEE support | ||
2384 | * @hw: pointer to the HW structure | ||
2385 | * | ||
2386 | * Enable/disable EEE legacy mode based on setting in dev_spec structure. | ||
2387 | * | ||
2388 | **/ | ||
2389 | s32 igb_set_eee_i354(struct e1000_hw *hw) | ||
2390 | { | ||
2391 | struct e1000_phy_info *phy = &hw->phy; | ||
2392 | s32 ret_val = 0; | ||
2393 | u16 phy_data; | ||
2394 | |||
2395 | if ((hw->phy.media_type != e1000_media_type_copper) || | ||
2396 | (phy->id != M88E1545_E_PHY_ID)) | ||
2397 | goto out; | ||
2398 | |||
2399 | if (!hw->dev_spec._82575.eee_disable) { | ||
2400 | /* Switch to PHY page 18. */ | ||
2401 | ret_val = phy->ops.write_reg(hw, E1000_M88E1545_PAGE_ADDR, 18); | ||
2402 | if (ret_val) | ||
2403 | goto out; | ||
2404 | |||
2405 | ret_val = phy->ops.read_reg(hw, E1000_M88E1545_EEE_CTRL_1, | ||
2406 | &phy_data); | ||
2407 | if (ret_val) | ||
2408 | goto out; | ||
2409 | |||
2410 | phy_data |= E1000_M88E1545_EEE_CTRL_1_MS; | ||
2411 | ret_val = phy->ops.write_reg(hw, E1000_M88E1545_EEE_CTRL_1, | ||
2412 | phy_data); | ||
2413 | if (ret_val) | ||
2414 | goto out; | ||
2415 | |||
2416 | /* Return the PHY to page 0. */ | ||
2417 | ret_val = phy->ops.write_reg(hw, E1000_M88E1545_PAGE_ADDR, 0); | ||
2418 | if (ret_val) | ||
2419 | goto out; | ||
2420 | |||
2421 | /* Turn on EEE advertisement. */ | ||
2422 | ret_val = igb_read_xmdio_reg(hw, E1000_EEE_ADV_ADDR_I354, | ||
2423 | E1000_EEE_ADV_DEV_I354, | ||
2424 | &phy_data); | ||
2425 | if (ret_val) | ||
2426 | goto out; | ||
2427 | |||
2428 | phy_data |= E1000_EEE_ADV_100_SUPPORTED | | ||
2429 | E1000_EEE_ADV_1000_SUPPORTED; | ||
2430 | ret_val = igb_write_xmdio_reg(hw, E1000_EEE_ADV_ADDR_I354, | ||
2431 | E1000_EEE_ADV_DEV_I354, | ||
2432 | phy_data); | ||
2433 | } else { | ||
2434 | /* Turn off EEE advertisement. */ | ||
2435 | ret_val = igb_read_xmdio_reg(hw, E1000_EEE_ADV_ADDR_I354, | ||
2436 | E1000_EEE_ADV_DEV_I354, | ||
2437 | &phy_data); | ||
2438 | if (ret_val) | ||
2439 | goto out; | ||
2440 | |||
2441 | phy_data &= ~(E1000_EEE_ADV_100_SUPPORTED | | ||
2442 | E1000_EEE_ADV_1000_SUPPORTED); | ||
2443 | ret_val = igb_write_xmdio_reg(hw, E1000_EEE_ADV_ADDR_I354, | ||
2444 | E1000_EEE_ADV_DEV_I354, | ||
2445 | phy_data); | ||
2446 | } | ||
2447 | |||
2448 | out: | ||
2449 | return ret_val; | ||
2450 | } | ||
2451 | |||
2452 | /** | ||
2453 | * igb_get_eee_status_i354 - Get EEE status | ||
2454 | * @hw: pointer to the HW structure | ||
2455 | * @status: EEE status | ||
2456 | * | ||
2457 | * Get EEE status by guessing based on whether Tx or Rx LPI indications have | ||
2458 | * been received. | ||
2459 | **/ | ||
2460 | s32 igb_get_eee_status_i354(struct e1000_hw *hw, bool *status) | ||
2461 | { | ||
2462 | struct e1000_phy_info *phy = &hw->phy; | ||
2463 | s32 ret_val = 0; | ||
2464 | u16 phy_data; | ||
2465 | |||
2466 | /* Check if EEE is supported on this device. */ | ||
2467 | if ((hw->phy.media_type != e1000_media_type_copper) || | ||
2468 | (phy->id != M88E1545_E_PHY_ID)) | ||
2469 | goto out; | ||
2470 | |||
2471 | ret_val = igb_read_xmdio_reg(hw, E1000_PCS_STATUS_ADDR_I354, | ||
2472 | E1000_PCS_STATUS_DEV_I354, | ||
2473 | &phy_data); | ||
2474 | if (ret_val) | ||
2475 | goto out; | ||
2476 | |||
2477 | *status = phy_data & (E1000_PCS_STATUS_TX_LPI_RCVD | | ||
2478 | E1000_PCS_STATUS_RX_LPI_RCVD) ? true : false; | ||
2479 | |||
2480 | out: | ||
2481 | return ret_val; | ||
2482 | } | ||
2483 | |||
2368 | static const u8 e1000_emc_temp_data[4] = { | 2484 | static const u8 e1000_emc_temp_data[4] = { |
2369 | E1000_EMC_INTERNAL_DATA, | 2485 | E1000_EMC_INTERNAL_DATA, |
2370 | E1000_EMC_DIODE1_DATA, | 2486 | E1000_EMC_DIODE1_DATA, |
diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.h b/drivers/net/ethernet/intel/igb/e1000_82575.h index 0d318ac14818..74a1506b4235 100644 --- a/drivers/net/ethernet/intel/igb/e1000_82575.h +++ b/drivers/net/ethernet/intel/igb/e1000_82575.h | |||
@@ -265,6 +265,7 @@ void igb_vmdq_set_replication_pf(struct e1000_hw *, bool); | |||
265 | u16 igb_rxpbs_adjust_82580(u32 data); | 265 | u16 igb_rxpbs_adjust_82580(u32 data); |
266 | s32 igb_read_emi_reg(struct e1000_hw *, u16 addr, u16 *data); | 266 | s32 igb_read_emi_reg(struct e1000_hw *, u16 addr, u16 *data); |
267 | s32 igb_set_eee_i350(struct e1000_hw *); | 267 | s32 igb_set_eee_i350(struct e1000_hw *); |
268 | s32 igb_set_eee_i354(struct e1000_hw *); | ||
268 | s32 igb_init_thermal_sensor_thresh_generic(struct e1000_hw *); | 269 | s32 igb_init_thermal_sensor_thresh_generic(struct e1000_hw *); |
269 | s32 igb_get_thermal_sensor_data_generic(struct e1000_hw *hw); | 270 | s32 igb_get_thermal_sensor_data_generic(struct e1000_hw *hw); |
270 | 271 | ||
diff --git a/drivers/net/ethernet/intel/igb/e1000_defines.h b/drivers/net/ethernet/intel/igb/e1000_defines.h index f3d87d7b9fdc..31a0f82cc650 100644 --- a/drivers/net/ethernet/intel/igb/e1000_defines.h +++ b/drivers/net/ethernet/intel/igb/e1000_defines.h | |||
@@ -236,11 +236,14 @@ | |||
236 | #define E1000_STATUS_GIO_MASTER_ENABLE 0x00080000 | 236 | #define E1000_STATUS_GIO_MASTER_ENABLE 0x00080000 |
237 | /* BMC external code execution disabled */ | 237 | /* BMC external code execution disabled */ |
238 | 238 | ||
239 | #define E1000_STATUS_2P5_SKU 0x00001000 /* Val of 2.5GBE SKU strap */ | ||
240 | #define E1000_STATUS_2P5_SKU_OVER 0x00002000 /* Val of 2.5GBE SKU Over */ | ||
239 | /* Constants used to intrepret the masked PCI-X bus speed. */ | 241 | /* Constants used to intrepret the masked PCI-X bus speed. */ |
240 | 242 | ||
241 | #define SPEED_10 10 | 243 | #define SPEED_10 10 |
242 | #define SPEED_100 100 | 244 | #define SPEED_100 100 |
243 | #define SPEED_1000 1000 | 245 | #define SPEED_1000 1000 |
246 | #define SPEED_2500 2500 | ||
244 | #define HALF_DUPLEX 1 | 247 | #define HALF_DUPLEX 1 |
245 | #define FULL_DUPLEX 2 | 248 | #define FULL_DUPLEX 2 |
246 | 249 | ||
@@ -768,6 +771,7 @@ | |||
768 | #define I350_I_PHY_ID 0x015403B0 | 771 | #define I350_I_PHY_ID 0x015403B0 |
769 | #define M88_VENDOR 0x0141 | 772 | #define M88_VENDOR 0x0141 |
770 | #define I210_I_PHY_ID 0x01410C00 | 773 | #define I210_I_PHY_ID 0x01410C00 |
774 | #define M88E1545_E_PHY_ID 0x01410EA0 | ||
771 | 775 | ||
772 | /* M88E1000 Specific Registers */ | 776 | /* M88E1000 Specific Registers */ |
773 | #define M88E1000_PHY_SPEC_CTRL 0x10 /* PHY Specific Control Register */ | 777 | #define M88E1000_PHY_SPEC_CTRL 0x10 /* PHY Specific Control Register */ |
@@ -889,6 +893,18 @@ | |||
889 | #define E1000_EEE_LP_ADV_DEV_I210 7 /* EEE LP Adv Device */ | 893 | #define E1000_EEE_LP_ADV_DEV_I210 7 /* EEE LP Adv Device */ |
890 | #define E1000_EEE_LP_ADV_ADDR_I210 61 /* EEE LP Adv Register */ | 894 | #define E1000_EEE_LP_ADV_ADDR_I210 61 /* EEE LP Adv Register */ |
891 | #define E1000_MMDAC_FUNC_DATA 0x4000 /* Data, no post increment */ | 895 | #define E1000_MMDAC_FUNC_DATA 0x4000 /* Data, no post increment */ |
896 | #define E1000_M88E1545_PAGE_ADDR 0x16 /* Page Offset Register */ | ||
897 | #define E1000_M88E1545_EEE_CTRL_1 0x0 | ||
898 | #define E1000_M88E1545_EEE_CTRL_1_MS 0x0001 /* EEE Master/Slave */ | ||
899 | #define E1000_EEE_ADV_DEV_I354 7 | ||
900 | #define E1000_EEE_ADV_ADDR_I354 60 | ||
901 | #define E1000_EEE_ADV_100_SUPPORTED (1 << 1) /* 100BaseTx EEE Supported */ | ||
902 | #define E1000_EEE_ADV_1000_SUPPORTED (1 << 2) /* 1000BaseT EEE Supported */ | ||
903 | #define E1000_PCS_STATUS_DEV_I354 3 | ||
904 | #define E1000_PCS_STATUS_ADDR_I354 1 | ||
905 | #define E1000_PCS_STATUS_TX_LPI_IND 0x0200 /* Tx in LPI state */ | ||
906 | #define E1000_PCS_STATUS_RX_LPI_RCVD 0x0400 | ||
907 | #define E1000_PCS_STATUS_TX_LPI_RCVD 0x0800 | ||
892 | 908 | ||
893 | /* SerDes Control */ | 909 | /* SerDes Control */ |
894 | #define E1000_GEN_CTL_READY 0x80000000 | 910 | #define E1000_GEN_CTL_READY 0x80000000 |
diff --git a/drivers/net/ethernet/intel/igb/e1000_hw.h b/drivers/net/ethernet/intel/igb/e1000_hw.h index 84df815ea0e8..1138ccaf95ff 100644 --- a/drivers/net/ethernet/intel/igb/e1000_hw.h +++ b/drivers/net/ethernet/intel/igb/e1000_hw.h | |||
@@ -70,6 +70,9 @@ struct e1000_hw; | |||
70 | #define E1000_DEV_ID_I210_SERDES 0x1537 | 70 | #define E1000_DEV_ID_I210_SERDES 0x1537 |
71 | #define E1000_DEV_ID_I210_SGMII 0x1538 | 71 | #define E1000_DEV_ID_I210_SGMII 0x1538 |
72 | #define E1000_DEV_ID_I211_COPPER 0x1539 | 72 | #define E1000_DEV_ID_I211_COPPER 0x1539 |
73 | #define E1000_DEV_ID_I354_BACKPLANE_1GBPS 0x1F40 | ||
74 | #define E1000_DEV_ID_I354_SGMII 0x1F41 | ||
75 | #define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45 | ||
73 | 76 | ||
74 | #define E1000_REVISION_2 2 | 77 | #define E1000_REVISION_2 2 |
75 | #define E1000_REVISION_4 4 | 78 | #define E1000_REVISION_4 4 |
@@ -90,6 +93,7 @@ enum e1000_mac_type { | |||
90 | e1000_82576, | 93 | e1000_82576, |
91 | e1000_82580, | 94 | e1000_82580, |
92 | e1000_i350, | 95 | e1000_i350, |
96 | e1000_i354, | ||
93 | e1000_i210, | 97 | e1000_i210, |
94 | e1000_i211, | 98 | e1000_i211, |
95 | e1000_num_macs /* List is 1-based, so subtract 1 for true count. */ | 99 | e1000_num_macs /* List is 1-based, so subtract 1 for true count. */ |
diff --git a/drivers/net/ethernet/intel/igb/e1000_mac.c b/drivers/net/ethernet/intel/igb/e1000_mac.c index afbab053269b..2559d70a2321 100644 --- a/drivers/net/ethernet/intel/igb/e1000_mac.c +++ b/drivers/net/ethernet/intel/igb/e1000_mac.c | |||
@@ -214,7 +214,7 @@ s32 igb_vfta_set(struct e1000_hw *hw, u32 vid, bool add) | |||
214 | else | 214 | else |
215 | vfta &= ~mask; | 215 | vfta &= ~mask; |
216 | } | 216 | } |
217 | if (hw->mac.type == e1000_i350) | 217 | if ((hw->mac.type == e1000_i350) || (hw->mac.type == e1000_i354)) |
218 | igb_write_vfta_i350(hw, index, vfta); | 218 | igb_write_vfta_i350(hw, index, vfta); |
219 | else | 219 | else |
220 | igb_write_vfta(hw, index, vfta); | 220 | igb_write_vfta(hw, index, vfta); |
@@ -1171,6 +1171,17 @@ s32 igb_get_speed_and_duplex_copper(struct e1000_hw *hw, u16 *speed, | |||
1171 | hw_dbg("Half Duplex\n"); | 1171 | hw_dbg("Half Duplex\n"); |
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | /* Check if it is an I354 2.5Gb backplane connection. */ | ||
1175 | if (hw->mac.type == e1000_i354) { | ||
1176 | if ((status & E1000_STATUS_2P5_SKU) && | ||
1177 | !(status & E1000_STATUS_2P5_SKU_OVER)) { | ||
1178 | *speed = SPEED_2500; | ||
1179 | *duplex = FULL_DUPLEX; | ||
1180 | hw_dbg("2500 Mbs, "); | ||
1181 | hw_dbg("Full Duplex\n"); | ||
1182 | } | ||
1183 | } | ||
1184 | |||
1174 | return 0; | 1185 | return 0; |
1175 | } | 1186 | } |
1176 | 1187 | ||
diff --git a/drivers/net/ethernet/intel/igb/e1000_nvm.c b/drivers/net/ethernet/intel/igb/e1000_nvm.c index 5e0dd0a8d7a8..7f9cd7cbd353 100644 --- a/drivers/net/ethernet/intel/igb/e1000_nvm.c +++ b/drivers/net/ethernet/intel/igb/e1000_nvm.c | |||
@@ -721,6 +721,7 @@ void igb_get_fw_version(struct e1000_hw *hw, struct e1000_fw_version *fw_vers) | |||
721 | case e1000_82575: | 721 | case e1000_82575: |
722 | case e1000_82576: | 722 | case e1000_82576: |
723 | case e1000_82580: | 723 | case e1000_82580: |
724 | case e1000_i354: | ||
724 | case e1000_i350: | 725 | case e1000_i350: |
725 | case e1000_i210: | 726 | case e1000_i210: |
726 | break; | 727 | break; |
@@ -739,6 +740,7 @@ void igb_get_fw_version(struct e1000_hw *hw, struct e1000_fw_version *fw_vers) | |||
739 | 740 | ||
740 | switch (hw->mac.type) { | 741 | switch (hw->mac.type) { |
741 | case e1000_i210: | 742 | case e1000_i210: |
743 | case e1000_i354: | ||
742 | case e1000_i350: | 744 | case e1000_i350: |
743 | /* find combo image version */ | 745 | /* find combo image version */ |
744 | hw->nvm.ops.read(hw, NVM_COMB_VER_PTR, 1, &comb_offset); | 746 | hw->nvm.ops.read(hw, NVM_COMB_VER_PTR, 1, &comb_offset); |
diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c index 72a44095c506..fd46add6c4e4 100644 --- a/drivers/net/ethernet/intel/igb/e1000_phy.c +++ b/drivers/net/ethernet/intel/igb/e1000_phy.c | |||
@@ -1682,6 +1682,7 @@ s32 igb_get_cable_length_m88_gen2(struct e1000_hw *hw) | |||
1682 | phy->max_cable_length = phy_data / (is_cm ? 100 : 1); | 1682 | phy->max_cable_length = phy_data / (is_cm ? 100 : 1); |
1683 | phy->cable_length = phy_data / (is_cm ? 100 : 1); | 1683 | phy->cable_length = phy_data / (is_cm ? 100 : 1); |
1684 | break; | 1684 | break; |
1685 | case M88E1545_E_PHY_ID: | ||
1685 | case I347AT4_E_PHY_ID: | 1686 | case I347AT4_E_PHY_ID: |
1686 | /* Remember the original page select and set it to 7 */ | 1687 | /* Remember the original page select and set it to 7 */ |
1687 | ret_val = phy->ops.read_reg(hw, I347AT4_PAGE_SELECT, | 1688 | ret_val = phy->ops.read_reg(hw, I347AT4_PAGE_SELECT, |
diff --git a/drivers/net/ethernet/intel/igb/e1000_regs.h b/drivers/net/ethernet/intel/igb/e1000_regs.h index bdfc0403c6fc..82632c6c53af 100644 --- a/drivers/net/ethernet/intel/igb/e1000_regs.h +++ b/drivers/net/ethernet/intel/igb/e1000_regs.h | |||
@@ -65,6 +65,7 @@ | |||
65 | #define E1000_TIPG 0x00410 /* TX Inter-packet gap -RW */ | 65 | #define E1000_TIPG 0x00410 /* TX Inter-packet gap -RW */ |
66 | #define E1000_AIT 0x00458 /* Adaptive Interframe Spacing Throttle - RW */ | 66 | #define E1000_AIT 0x00458 /* Adaptive Interframe Spacing Throttle - RW */ |
67 | #define E1000_LEDCTL 0x00E00 /* LED Control - RW */ | 67 | #define E1000_LEDCTL 0x00E00 /* LED Control - RW */ |
68 | #define E1000_LEDMUX 0x08130 /* LED MUX Control */ | ||
68 | #define E1000_PBA 0x01000 /* Packet Buffer Allocation - RW */ | 69 | #define E1000_PBA 0x01000 /* Packet Buffer Allocation - RW */ |
69 | #define E1000_PBS 0x01008 /* Packet Buffer Size */ | 70 | #define E1000_PBS 0x01008 /* Packet Buffer Size */ |
70 | #define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */ | 71 | #define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */ |
@@ -83,6 +84,9 @@ | |||
83 | #define E1000_I2C_DATA_IN 0x00001000 /* I2C- Data In */ | 84 | #define E1000_I2C_DATA_IN 0x00001000 /* I2C- Data In */ |
84 | #define E1000_I2C_CLK_OE_N 0x00002000 /* I2C- Clock Output Enable */ | 85 | #define E1000_I2C_CLK_OE_N 0x00002000 /* I2C- Clock Output Enable */ |
85 | #define E1000_I2C_CLK_IN 0x00004000 /* I2C- Clock In */ | 86 | #define E1000_I2C_CLK_IN 0x00004000 /* I2C- Clock In */ |
87 | #define E1000_MPHY_ADDR_CTRL 0x0024 /* GbE MPHY Address Control */ | ||
88 | #define E1000_MPHY_DATA 0x0E10 /* GBE MPHY Data */ | ||
89 | #define E1000_MPHY_STAT 0x0E0C /* GBE MPHY Statistics */ | ||
86 | 90 | ||
87 | /* IEEE 1588 TIMESYNCH */ | 91 | /* IEEE 1588 TIMESYNCH */ |
88 | #define E1000_TSYNCRXCTL 0x0B620 /* Rx Time Sync Control register - RW */ | 92 | #define E1000_TSYNCRXCTL 0x0B620 /* Rx Time Sync Control register - RW */ |
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h index d47ac2ae1b41..c92115e71ebe 100644 --- a/drivers/net/ethernet/intel/igb/igb.h +++ b/drivers/net/ethernet/intel/igb/igb.h | |||
@@ -122,9 +122,9 @@ struct vf_data_storage { | |||
122 | * descriptors until either it has this many to write back, or the | 122 | * descriptors until either it has this many to write back, or the |
123 | * ITR timer expires. | 123 | * ITR timer expires. |
124 | */ | 124 | */ |
125 | #define IGB_RX_PTHRESH 8 | 125 | #define IGB_RX_PTHRESH ((hw->mac.type == e1000_i354) ? 12 : 8) |
126 | #define IGB_RX_HTHRESH 8 | 126 | #define IGB_RX_HTHRESH 8 |
127 | #define IGB_TX_PTHRESH 8 | 127 | #define IGB_TX_PTHRESH ((hw->mac.type == e1000_i354) ? 20 : 8) |
128 | #define IGB_TX_HTHRESH 1 | 128 | #define IGB_TX_HTHRESH 1 |
129 | #define IGB_RX_WTHRESH ((hw->mac.type == e1000_82576 && \ | 129 | #define IGB_RX_WTHRESH ((hw->mac.type == e1000_82576 && \ |
130 | adapter->msix_entries) ? 1 : 4) | 130 | adapter->msix_entries) ? 1 : 4) |
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index 8412f9746c78..48b594701efa 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c | |||
@@ -181,18 +181,29 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) | |||
181 | ecmd->phy_address = hw->phy.addr; | 181 | ecmd->phy_address = hw->phy.addr; |
182 | ecmd->transceiver = XCVR_INTERNAL; | 182 | ecmd->transceiver = XCVR_INTERNAL; |
183 | } else { | 183 | } else { |
184 | ecmd->supported = (SUPPORTED_1000baseT_Full | | 184 | ecmd->supported = (SUPPORTED_1000baseT_Full | |
185 | SUPPORTED_100baseT_Full | | 185 | SUPPORTED_100baseT_Full | |
186 | SUPPORTED_Autoneg | | 186 | SUPPORTED_FIBRE | |
187 | SUPPORTED_FIBRE | | 187 | SUPPORTED_Autoneg | |
188 | SUPPORTED_Pause); | 188 | SUPPORTED_Pause); |
189 | if (hw->mac.type == e1000_i354) | ||
190 | ecmd->supported |= SUPPORTED_2500baseX_Full; | ||
189 | 191 | ||
190 | ecmd->advertising = ADVERTISED_FIBRE; | 192 | ecmd->advertising = ADVERTISED_FIBRE; |
191 | 193 | ||
192 | if (adapter->link_speed == SPEED_100) | 194 | switch (adapter->link_speed) { |
193 | ecmd->advertising = ADVERTISED_100baseT_Full; | 195 | case SPEED_2500: |
194 | else if (adapter->link_speed == SPEED_1000) | 196 | ecmd->advertising = ADVERTISED_2500baseX_Full; |
197 | break; | ||
198 | case SPEED_1000: | ||
195 | ecmd->advertising = ADVERTISED_1000baseT_Full; | 199 | ecmd->advertising = ADVERTISED_1000baseT_Full; |
200 | break; | ||
201 | case SPEED_100: | ||
202 | ecmd->advertising = ADVERTISED_100baseT_Full; | ||
203 | break; | ||
204 | default: | ||
205 | break; | ||
206 | } | ||
196 | 207 | ||
197 | if (hw->mac.autoneg == 1) | 208 | if (hw->mac.autoneg == 1) |
198 | ecmd->advertising |= ADVERTISED_Autoneg; | 209 | ecmd->advertising |= ADVERTISED_Autoneg; |
@@ -204,21 +215,23 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) | |||
204 | status = rd32(E1000_STATUS); | 215 | status = rd32(E1000_STATUS); |
205 | 216 | ||
206 | if (status & E1000_STATUS_LU) { | 217 | if (status & E1000_STATUS_LU) { |
207 | 218 | if ((hw->mac.type == e1000_i354) && | |
208 | if (status & E1000_STATUS_SPEED_1000) | 219 | (status & E1000_STATUS_2P5_SKU) && |
209 | ethtool_cmd_speed_set(ecmd, SPEED_1000); | 220 | !(status & E1000_STATUS_2P5_SKU_OVER)) |
221 | ecmd->speed = SPEED_2500; | ||
222 | else if (status & E1000_STATUS_SPEED_1000) | ||
223 | ecmd->speed = SPEED_1000; | ||
210 | else if (status & E1000_STATUS_SPEED_100) | 224 | else if (status & E1000_STATUS_SPEED_100) |
211 | ethtool_cmd_speed_set(ecmd, SPEED_100); | 225 | ecmd->speed = SPEED_100; |
212 | else | 226 | else |
213 | ethtool_cmd_speed_set(ecmd, SPEED_10); | 227 | ecmd->speed = SPEED_10; |
214 | |||
215 | if ((status & E1000_STATUS_FD) || | 228 | if ((status & E1000_STATUS_FD) || |
216 | hw->phy.media_type != e1000_media_type_copper) | 229 | hw->phy.media_type != e1000_media_type_copper) |
217 | ecmd->duplex = DUPLEX_FULL; | 230 | ecmd->duplex = DUPLEX_FULL; |
218 | else | 231 | else |
219 | ecmd->duplex = DUPLEX_HALF; | 232 | ecmd->duplex = DUPLEX_HALF; |
220 | } else { | 233 | } else { |
221 | ethtool_cmd_speed_set(ecmd, -1); | 234 | ecmd->speed = -1; |
222 | ecmd->duplex = -1; | 235 | ecmd->duplex = -1; |
223 | } | 236 | } |
224 | 237 | ||
@@ -281,12 +294,22 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) | |||
281 | hw->phy.autoneg_advertised = ecmd->advertising | | 294 | hw->phy.autoneg_advertised = ecmd->advertising | |
282 | ADVERTISED_FIBRE | | 295 | ADVERTISED_FIBRE | |
283 | ADVERTISED_Autoneg; | 296 | ADVERTISED_Autoneg; |
284 | if (adapter->link_speed == SPEED_1000) | 297 | switch (adapter->link_speed) { |
298 | case SPEED_2500: | ||
299 | hw->phy.autoneg_advertised = | ||
300 | ADVERTISED_2500baseX_Full; | ||
301 | break; | ||
302 | case SPEED_1000: | ||
285 | hw->phy.autoneg_advertised = | 303 | hw->phy.autoneg_advertised = |
286 | ADVERTISED_1000baseT_Full; | 304 | ADVERTISED_1000baseT_Full; |
287 | else if (adapter->link_speed == SPEED_100) | 305 | break; |
306 | case SPEED_100: | ||
288 | hw->phy.autoneg_advertised = | 307 | hw->phy.autoneg_advertised = |
289 | ADVERTISED_100baseT_Full; | 308 | ADVERTISED_100baseT_Full; |
309 | break; | ||
310 | default: | ||
311 | break; | ||
312 | } | ||
290 | } else { | 313 | } else { |
291 | hw->phy.autoneg_advertised = ecmd->advertising | | 314 | hw->phy.autoneg_advertised = ecmd->advertising | |
292 | ADVERTISED_TP | | 315 | ADVERTISED_TP | |
@@ -1225,6 +1248,7 @@ static int igb_reg_test(struct igb_adapter *adapter, u64 *data) | |||
1225 | 1248 | ||
1226 | switch (adapter->hw.mac.type) { | 1249 | switch (adapter->hw.mac.type) { |
1227 | case e1000_i350: | 1250 | case e1000_i350: |
1251 | case e1000_i354: | ||
1228 | test = reg_test_i350; | 1252 | test = reg_test_i350; |
1229 | toggle = 0x7FEFF3FF; | 1253 | toggle = 0x7FEFF3FF; |
1230 | break; | 1254 | break; |
@@ -1387,6 +1411,7 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data) | |||
1387 | ics_mask = 0x77DCFED5; | 1411 | ics_mask = 0x77DCFED5; |
1388 | break; | 1412 | break; |
1389 | case e1000_i350: | 1413 | case e1000_i350: |
1414 | case e1000_i354: | ||
1390 | case e1000_i210: | 1415 | case e1000_i210: |
1391 | case e1000_i211: | 1416 | case e1000_i211: |
1392 | ics_mask = 0x77DCFED5; | 1417 | ics_mask = 0x77DCFED5; |
@@ -1881,6 +1906,13 @@ static int igb_loopback_test(struct igb_adapter *adapter, u64 *data) | |||
1881 | *data = 0; | 1906 | *data = 0; |
1882 | goto out; | 1907 | goto out; |
1883 | } | 1908 | } |
1909 | |||
1910 | if (adapter->hw.mac.type == e1000_i354) { | ||
1911 | dev_info(&adapter->pdev->dev, | ||
1912 | "Loopback test not supported on i354.\n"); | ||
1913 | *data = 0; | ||
1914 | goto out; | ||
1915 | } | ||
1884 | *data = igb_setup_desc_rings(adapter); | 1916 | *data = igb_setup_desc_rings(adapter); |
1885 | if (*data) | 1917 | if (*data) |
1886 | goto out; | 1918 | goto out; |
@@ -2311,6 +2343,7 @@ static int igb_get_ts_info(struct net_device *dev, | |||
2311 | case e1000_82576: | 2343 | case e1000_82576: |
2312 | case e1000_82580: | 2344 | case e1000_82580: |
2313 | case e1000_i350: | 2345 | case e1000_i350: |
2346 | case e1000_i354: | ||
2314 | case e1000_i210: | 2347 | case e1000_i210: |
2315 | case e1000_i211: | 2348 | case e1000_i211: |
2316 | info->so_timestamping = | 2349 | info->so_timestamping = |
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 666f87c4bfa3..38590252be64 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c | |||
@@ -77,6 +77,9 @@ static const struct e1000_info *igb_info_tbl[] = { | |||
77 | }; | 77 | }; |
78 | 78 | ||
79 | static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = { | 79 | static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = { |
80 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) }, | ||
81 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_SGMII) }, | ||
82 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) }, | ||
80 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_I211_COPPER), board_82575 }, | 83 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_I211_COPPER), board_82575 }, |
81 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_COPPER), board_82575 }, | 84 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_COPPER), board_82575 }, |
82 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_FIBER), board_82575 }, | 85 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_FIBER), board_82575 }, |
@@ -735,6 +738,7 @@ static void igb_cache_ring_register(struct igb_adapter *adapter) | |||
735 | case e1000_82575: | 738 | case e1000_82575: |
736 | case e1000_82580: | 739 | case e1000_82580: |
737 | case e1000_i350: | 740 | case e1000_i350: |
741 | case e1000_i354: | ||
738 | case e1000_i210: | 742 | case e1000_i210: |
739 | case e1000_i211: | 743 | case e1000_i211: |
740 | default: | 744 | default: |
@@ -820,6 +824,7 @@ static void igb_assign_vector(struct igb_q_vector *q_vector, int msix_vector) | |||
820 | break; | 824 | break; |
821 | case e1000_82580: | 825 | case e1000_82580: |
822 | case e1000_i350: | 826 | case e1000_i350: |
827 | case e1000_i354: | ||
823 | case e1000_i210: | 828 | case e1000_i210: |
824 | case e1000_i211: | 829 | case e1000_i211: |
825 | /* On 82580 and newer adapters the scheme is similar to 82576 | 830 | /* On 82580 and newer adapters the scheme is similar to 82576 |
@@ -887,6 +892,7 @@ static void igb_configure_msix(struct igb_adapter *adapter) | |||
887 | case e1000_82576: | 892 | case e1000_82576: |
888 | case e1000_82580: | 893 | case e1000_82580: |
889 | case e1000_i350: | 894 | case e1000_i350: |
895 | case e1000_i354: | ||
890 | case e1000_i210: | 896 | case e1000_i210: |
891 | case e1000_i211: | 897 | case e1000_i211: |
892 | /* Turn on MSI-X capability first, or our settings | 898 | /* Turn on MSI-X capability first, or our settings |
@@ -1238,7 +1244,8 @@ static int igb_alloc_q_vector(struct igb_adapter *adapter, | |||
1238 | if (adapter->hw.mac.type >= e1000_82576) | 1244 | if (adapter->hw.mac.type >= e1000_82576) |
1239 | set_bit(IGB_RING_FLAG_RX_SCTP_CSUM, &ring->flags); | 1245 | set_bit(IGB_RING_FLAG_RX_SCTP_CSUM, &ring->flags); |
1240 | 1246 | ||
1241 | /* On i350, i210, and i211, loopback VLAN packets | 1247 | /* |
1248 | * On i350, i354, i210, and i211, loopback VLAN packets | ||
1242 | * have the tag byte-swapped. | 1249 | * have the tag byte-swapped. |
1243 | */ | 1250 | */ |
1244 | if (adapter->hw.mac.type >= e1000_i350) | 1251 | if (adapter->hw.mac.type >= e1000_i350) |
@@ -1713,6 +1720,7 @@ void igb_reset(struct igb_adapter *adapter) | |||
1713 | */ | 1720 | */ |
1714 | switch (mac->type) { | 1721 | switch (mac->type) { |
1715 | case e1000_i350: | 1722 | case e1000_i350: |
1723 | case e1000_i354: | ||
1716 | case e1000_82580: | 1724 | case e1000_82580: |
1717 | pba = rd32(E1000_RXPBS); | 1725 | pba = rd32(E1000_RXPBS); |
1718 | pba = igb_rxpbs_adjust_82580(pba); | 1726 | pba = igb_rxpbs_adjust_82580(pba); |
@@ -2317,17 +2325,20 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2317 | igb_ptp_init(adapter); | 2325 | igb_ptp_init(adapter); |
2318 | 2326 | ||
2319 | dev_info(&pdev->dev, "Intel(R) Gigabit Ethernet Network Connection\n"); | 2327 | dev_info(&pdev->dev, "Intel(R) Gigabit Ethernet Network Connection\n"); |
2320 | /* print bus type/speed/width info */ | 2328 | /* print bus type/speed/width info, not applicable to i354 */ |
2321 | dev_info(&pdev->dev, "%s: (PCIe:%s:%s) %pM\n", | 2329 | if (hw->mac.type != e1000_i354) { |
2322 | netdev->name, | 2330 | dev_info(&pdev->dev, "%s: (PCIe:%s:%s) %pM\n", |
2323 | ((hw->bus.speed == e1000_bus_speed_2500) ? "2.5Gb/s" : | 2331 | netdev->name, |
2324 | (hw->bus.speed == e1000_bus_speed_5000) ? "5.0Gb/s" : | 2332 | ((hw->bus.speed == e1000_bus_speed_2500) ? "2.5Gb/s" : |
2325 | "unknown"), | 2333 | (hw->bus.speed == e1000_bus_speed_5000) ? "5.0Gb/s" : |
2326 | ((hw->bus.width == e1000_bus_width_pcie_x4) ? "Width x4" : | 2334 | "unknown"), |
2327 | (hw->bus.width == e1000_bus_width_pcie_x2) ? "Width x2" : | 2335 | ((hw->bus.width == e1000_bus_width_pcie_x4) ? |
2328 | (hw->bus.width == e1000_bus_width_pcie_x1) ? "Width x1" : | 2336 | "Width x4" : |
2329 | "unknown"), | 2337 | (hw->bus.width == e1000_bus_width_pcie_x2) ? |
2330 | netdev->dev_addr); | 2338 | "Width x2" : |
2339 | (hw->bus.width == e1000_bus_width_pcie_x1) ? | ||
2340 | "Width x1" : "unknown"), netdev->dev_addr); | ||
2341 | } | ||
2331 | 2342 | ||
2332 | ret_val = igb_read_part_string(hw, part_str, E1000_PBANUM_LENGTH); | 2343 | ret_val = igb_read_part_string(hw, part_str, E1000_PBANUM_LENGTH); |
2333 | if (ret_val) | 2344 | if (ret_val) |
@@ -2344,6 +2355,13 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2344 | case e1000_i211: | 2355 | case e1000_i211: |
2345 | igb_set_eee_i350(hw); | 2356 | igb_set_eee_i350(hw); |
2346 | break; | 2357 | break; |
2358 | case e1000_i354: | ||
2359 | if (hw->phy.media_type == e1000_media_type_copper) { | ||
2360 | if ((rd32(E1000_CTRL_EXT) & | ||
2361 | E1000_CTRL_EXT_LINK_MODE_SGMII)) | ||
2362 | igb_set_eee_i354(hw); | ||
2363 | } | ||
2364 | break; | ||
2347 | default: | 2365 | default: |
2348 | break; | 2366 | break; |
2349 | } | 2367 | } |
@@ -2597,6 +2615,7 @@ static void igb_init_queue_configuration(struct igb_adapter *adapter) | |||
2597 | } | 2615 | } |
2598 | /* fall through */ | 2616 | /* fall through */ |
2599 | case e1000_82580: | 2617 | case e1000_82580: |
2618 | case e1000_i354: | ||
2600 | default: | 2619 | default: |
2601 | max_rss_queues = IGB_MAX_RX_QUEUES; | 2620 | max_rss_queues = IGB_MAX_RX_QUEUES; |
2602 | break; | 2621 | break; |
@@ -2621,6 +2640,7 @@ static void igb_init_queue_configuration(struct igb_adapter *adapter) | |||
2621 | /* fall through */ | 2640 | /* fall through */ |
2622 | case e1000_82580: | 2641 | case e1000_82580: |
2623 | case e1000_i350: | 2642 | case e1000_i350: |
2643 | case e1000_i354: | ||
2624 | case e1000_i210: | 2644 | case e1000_i210: |
2625 | default: | 2645 | default: |
2626 | /* If rss_queues > half of max_rss_queues, pair the queues in | 2646 | /* If rss_queues > half of max_rss_queues, pair the queues in |
@@ -7649,6 +7669,7 @@ static void igb_vmm_control(struct igb_adapter *adapter) | |||
7649 | case e1000_82575: | 7669 | case e1000_82575: |
7650 | case e1000_i210: | 7670 | case e1000_i210: |
7651 | case e1000_i211: | 7671 | case e1000_i211: |
7672 | case e1000_i354: | ||
7652 | default: | 7673 | default: |
7653 | /* replication is not supported for 82575 */ | 7674 | /* replication is not supported for 82575 */ |
7654 | return; | 7675 | return; |
@@ -7722,7 +7743,9 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba) | |||
7722 | reg |= (1000 >> 5); | 7743 | reg |= (1000 >> 5); |
7723 | 7744 | ||
7724 | /* Disable BMC-to-OS Watchdog Enable */ | 7745 | /* Disable BMC-to-OS Watchdog Enable */ |
7725 | reg &= ~E1000_DMACR_DC_BMC2OSW_EN; | 7746 | if (hw->mac.type != e1000_i354) |
7747 | reg &= ~E1000_DMACR_DC_BMC2OSW_EN; | ||
7748 | |||
7726 | wr32(E1000_DMACR, reg); | 7749 | wr32(E1000_DMACR, reg); |
7727 | 7750 | ||
7728 | /* no lower threshold to disable | 7751 | /* no lower threshold to disable |
diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c index 9f7da269edc3..7e8c477b0ab9 100644 --- a/drivers/net/ethernet/intel/igb/igb_ptp.c +++ b/drivers/net/ethernet/intel/igb/igb_ptp.c | |||
@@ -171,6 +171,7 @@ static void igb_ptp_systim_to_hwtstamp(struct igb_adapter *adapter, | |||
171 | switch (adapter->hw.mac.type) { | 171 | switch (adapter->hw.mac.type) { |
172 | case e1000_82576: | 172 | case e1000_82576: |
173 | case e1000_82580: | 173 | case e1000_82580: |
174 | case e1000_i354: | ||
174 | case e1000_i350: | 175 | case e1000_i350: |
175 | spin_lock_irqsave(&adapter->tmreg_lock, flags); | 176 | spin_lock_irqsave(&adapter->tmreg_lock, flags); |
176 | 177 | ||
@@ -735,6 +736,7 @@ void igb_ptp_init(struct igb_adapter *adapter) | |||
735 | wr32(E1000_TIMINCA, INCPERIOD_82576 | INCVALUE_82576); | 736 | wr32(E1000_TIMINCA, INCPERIOD_82576 | INCVALUE_82576); |
736 | break; | 737 | break; |
737 | case e1000_82580: | 738 | case e1000_82580: |
739 | case e1000_i354: | ||
738 | case e1000_i350: | 740 | case e1000_i350: |
739 | snprintf(adapter->ptp_caps.name, 16, "%pm", netdev->dev_addr); | 741 | snprintf(adapter->ptp_caps.name, 16, "%pm", netdev->dev_addr); |
740 | adapter->ptp_caps.owner = THIS_MODULE; | 742 | adapter->ptp_caps.owner = THIS_MODULE; |
@@ -823,6 +825,7 @@ void igb_ptp_stop(struct igb_adapter *adapter) | |||
823 | switch (adapter->hw.mac.type) { | 825 | switch (adapter->hw.mac.type) { |
824 | case e1000_82576: | 826 | case e1000_82576: |
825 | case e1000_82580: | 827 | case e1000_82580: |
828 | case e1000_i354: | ||
826 | case e1000_i350: | 829 | case e1000_i350: |
827 | cancel_delayed_work_sync(&adapter->ptp_overflow_work); | 830 | cancel_delayed_work_sync(&adapter->ptp_overflow_work); |
828 | break; | 831 | break; |
@@ -867,6 +870,7 @@ void igb_ptp_reset(struct igb_adapter *adapter) | |||
867 | wr32(E1000_TIMINCA, INCPERIOD_82576 | INCVALUE_82576); | 870 | wr32(E1000_TIMINCA, INCPERIOD_82576 | INCVALUE_82576); |
868 | break; | 871 | break; |
869 | case e1000_82580: | 872 | case e1000_82580: |
873 | case e1000_i354: | ||
870 | case e1000_i350: | 874 | case e1000_i350: |
871 | case e1000_i210: | 875 | case e1000_i210: |
872 | case e1000_i211: | 876 | case e1000_i211: |