diff options
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r-- | drivers/net/e1000e/82571.c | 19 | ||||
-rw-r--r-- | drivers/net/e1000e/defines.h | 2 | ||||
-rw-r--r-- | drivers/net/e1000e/es2lan.c | 9 | ||||
-rw-r--r-- | drivers/net/e1000e/hw.h | 1 | ||||
-rw-r--r-- | drivers/net/e1000e/ich8lan.c | 6 | ||||
-rw-r--r-- | drivers/net/e1000e/lib.c | 31 |
6 files changed, 52 insertions, 16 deletions
diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c index 1e73eddee24a..8bad24da2289 100644 --- a/drivers/net/e1000e/82571.c +++ b/drivers/net/e1000e/82571.c | |||
@@ -234,9 +234,6 @@ static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter) | |||
234 | mac->mta_reg_count = 128; | 234 | mac->mta_reg_count = 128; |
235 | /* Set rar entry count */ | 235 | /* Set rar entry count */ |
236 | mac->rar_entry_count = E1000_RAR_ENTRIES; | 236 | mac->rar_entry_count = E1000_RAR_ENTRIES; |
237 | /* Set if manageability features are enabled. */ | ||
238 | mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK) | ||
239 | ? true : false; | ||
240 | /* Adaptive IFS supported */ | 237 | /* Adaptive IFS supported */ |
241 | mac->adaptive_ifs = true; | 238 | mac->adaptive_ifs = true; |
242 | 239 | ||
@@ -271,6 +268,16 @@ static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter) | |||
271 | func->set_lan_id = e1000_set_lan_id_single_port; | 268 | func->set_lan_id = e1000_set_lan_id_single_port; |
272 | func->check_mng_mode = e1000e_check_mng_mode_generic; | 269 | func->check_mng_mode = e1000e_check_mng_mode_generic; |
273 | func->led_on = e1000e_led_on_generic; | 270 | func->led_on = e1000e_led_on_generic; |
271 | |||
272 | /* FWSM register */ | ||
273 | mac->has_fwsm = true; | ||
274 | /* | ||
275 | * ARC supported; valid only if manageability features are | ||
276 | * enabled. | ||
277 | */ | ||
278 | mac->arc_subsystem_valid = | ||
279 | (er32(FWSM) & E1000_FWSM_MODE_MASK) | ||
280 | ? true : false; | ||
274 | break; | 281 | break; |
275 | case e1000_82574: | 282 | case e1000_82574: |
276 | case e1000_82583: | 283 | case e1000_82583: |
@@ -281,6 +288,9 @@ static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter) | |||
281 | default: | 288 | default: |
282 | func->check_mng_mode = e1000e_check_mng_mode_generic; | 289 | func->check_mng_mode = e1000e_check_mng_mode_generic; |
283 | func->led_on = e1000e_led_on_generic; | 290 | func->led_on = e1000e_led_on_generic; |
291 | |||
292 | /* FWSM register */ | ||
293 | mac->has_fwsm = true; | ||
284 | break; | 294 | break; |
285 | } | 295 | } |
286 | 296 | ||
@@ -993,9 +1003,10 @@ static s32 e1000_init_hw_82571(struct e1000_hw *hw) | |||
993 | /* ...for both queues. */ | 1003 | /* ...for both queues. */ |
994 | switch (mac->type) { | 1004 | switch (mac->type) { |
995 | case e1000_82573: | 1005 | case e1000_82573: |
1006 | e1000e_enable_tx_pkt_filtering(hw); | ||
1007 | /* fall through */ | ||
996 | case e1000_82574: | 1008 | case e1000_82574: |
997 | case e1000_82583: | 1009 | case e1000_82583: |
998 | e1000e_enable_tx_pkt_filtering(hw); | ||
999 | reg_data = er32(GCR); | 1010 | reg_data = er32(GCR); |
1000 | reg_data |= E1000_GCR_L1_ACT_WITHOUT_L0S_RX; | 1011 | reg_data |= E1000_GCR_L1_ACT_WITHOUT_L0S_RX; |
1001 | ew32(GCR, reg_data); | 1012 | ew32(GCR, reg_data); |
diff --git a/drivers/net/e1000e/defines.h b/drivers/net/e1000e/defines.h index 227147f09af2..4dc02c71ffd6 100644 --- a/drivers/net/e1000e/defines.h +++ b/drivers/net/e1000e/defines.h | |||
@@ -629,6 +629,8 @@ | |||
629 | #define NVM_ALT_MAC_ADDR_PTR 0x0037 | 629 | #define NVM_ALT_MAC_ADDR_PTR 0x0037 |
630 | #define NVM_CHECKSUM_REG 0x003F | 630 | #define NVM_CHECKSUM_REG 0x003F |
631 | 631 | ||
632 | #define E1000_NVM_INIT_CTRL2_MNGM 0x6000 /* Manageability Operation Mode mask */ | ||
633 | |||
632 | #define E1000_NVM_CFG_DONE_PORT_0 0x40000 /* MNG config cycle done */ | 634 | #define E1000_NVM_CFG_DONE_PORT_0 0x40000 /* MNG config cycle done */ |
633 | #define E1000_NVM_CFG_DONE_PORT_1 0x80000 /* ...for second port */ | 635 | #define E1000_NVM_CFG_DONE_PORT_1 0x80000 /* ...for second port */ |
634 | 636 | ||
diff --git a/drivers/net/e1000e/es2lan.c b/drivers/net/e1000e/es2lan.c index 27d21589a69a..7fcac7827865 100644 --- a/drivers/net/e1000e/es2lan.c +++ b/drivers/net/e1000e/es2lan.c | |||
@@ -221,9 +221,12 @@ static s32 e1000_init_mac_params_80003es2lan(struct e1000_adapter *adapter) | |||
221 | mac->mta_reg_count = 128; | 221 | mac->mta_reg_count = 128; |
222 | /* Set rar entry count */ | 222 | /* Set rar entry count */ |
223 | mac->rar_entry_count = E1000_RAR_ENTRIES; | 223 | mac->rar_entry_count = E1000_RAR_ENTRIES; |
224 | /* Set if manageability features are enabled. */ | 224 | /* FWSM register */ |
225 | mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK) | 225 | mac->has_fwsm = true; |
226 | ? true : false; | 226 | /* ARC supported; valid only if manageability features are enabled. */ |
227 | mac->arc_subsystem_valid = | ||
228 | (er32(FWSM) & E1000_FWSM_MODE_MASK) | ||
229 | ? true : false; | ||
227 | /* Adaptive IFS not supported */ | 230 | /* Adaptive IFS not supported */ |
228 | mac->adaptive_ifs = false; | 231 | mac->adaptive_ifs = false; |
229 | 232 | ||
diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h index 6f66c3721349..287ee954448f 100644 --- a/drivers/net/e1000e/hw.h +++ b/drivers/net/e1000e/hw.h | |||
@@ -830,6 +830,7 @@ struct e1000_mac_info { | |||
830 | u8 forced_speed_duplex; | 830 | u8 forced_speed_duplex; |
831 | 831 | ||
832 | bool adaptive_ifs; | 832 | bool adaptive_ifs; |
833 | bool has_fwsm; | ||
833 | bool arc_subsystem_valid; | 834 | bool arc_subsystem_valid; |
834 | bool autoneg; | 835 | bool autoneg; |
835 | bool autoneg_failed; | 836 | bool autoneg_failed; |
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index e1f244a47807..8efe9a7cbaad 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -503,8 +503,10 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_adapter *adapter) | |||
503 | mac->rar_entry_count = E1000_ICH_RAR_ENTRIES; | 503 | mac->rar_entry_count = E1000_ICH_RAR_ENTRIES; |
504 | if (mac->type == e1000_ich8lan) | 504 | if (mac->type == e1000_ich8lan) |
505 | mac->rar_entry_count--; | 505 | mac->rar_entry_count--; |
506 | /* Set if manageability features are enabled. */ | 506 | /* FWSM register */ |
507 | mac->arc_subsystem_valid = true; | 507 | mac->has_fwsm = true; |
508 | /* ARC subsystem not supported */ | ||
509 | mac->arc_subsystem_valid = false; | ||
508 | /* Adaptive IFS supported */ | 510 | /* Adaptive IFS supported */ |
509 | mac->adaptive_ifs = true; | 511 | mac->adaptive_ifs = true; |
510 | 512 | ||
diff --git a/drivers/net/e1000e/lib.c b/drivers/net/e1000e/lib.c index b32361dc340e..a968e3a416ac 100644 --- a/drivers/net/e1000e/lib.c +++ b/drivers/net/e1000e/lib.c | |||
@@ -2272,6 +2272,11 @@ static s32 e1000_mng_enable_host_if(struct e1000_hw *hw) | |||
2272 | u32 hicr; | 2272 | u32 hicr; |
2273 | u8 i; | 2273 | u8 i; |
2274 | 2274 | ||
2275 | if (!(hw->mac.arc_subsystem_valid)) { | ||
2276 | e_dbg("ARC subsystem not valid.\n"); | ||
2277 | return -E1000_ERR_HOST_INTERFACE_COMMAND; | ||
2278 | } | ||
2279 | |||
2275 | /* Check that the host interface is enabled. */ | 2280 | /* Check that the host interface is enabled. */ |
2276 | hicr = er32(HICR); | 2281 | hicr = er32(HICR); |
2277 | if ((hicr & E1000_HICR_EN) == 0) { | 2282 | if ((hicr & E1000_HICR_EN) == 0) { |
@@ -2530,9 +2535,9 @@ bool e1000e_enable_mng_pass_thru(struct e1000_hw *hw) | |||
2530 | manc = er32(MANC); | 2535 | manc = er32(MANC); |
2531 | 2536 | ||
2532 | if (!(manc & E1000_MANC_RCV_TCO_EN)) | 2537 | if (!(manc & E1000_MANC_RCV_TCO_EN)) |
2533 | return ret_val; | 2538 | goto out; |
2534 | 2539 | ||
2535 | if (hw->mac.arc_subsystem_valid) { | 2540 | if (hw->mac.has_fwsm) { |
2536 | fwsm = er32(FWSM); | 2541 | fwsm = er32(FWSM); |
2537 | factps = er32(FACTPS); | 2542 | factps = er32(FACTPS); |
2538 | 2543 | ||
@@ -2540,16 +2545,28 @@ bool e1000e_enable_mng_pass_thru(struct e1000_hw *hw) | |||
2540 | ((fwsm & E1000_FWSM_MODE_MASK) == | 2545 | ((fwsm & E1000_FWSM_MODE_MASK) == |
2541 | (e1000_mng_mode_pt << E1000_FWSM_MODE_SHIFT))) { | 2546 | (e1000_mng_mode_pt << E1000_FWSM_MODE_SHIFT))) { |
2542 | ret_val = true; | 2547 | ret_val = true; |
2543 | return ret_val; | 2548 | goto out; |
2544 | } | 2549 | } |
2545 | } else { | 2550 | } else if ((hw->mac.type == e1000_82574) || |
2546 | if ((manc & E1000_MANC_SMBUS_EN) && | 2551 | (hw->mac.type == e1000_82583)) { |
2547 | !(manc & E1000_MANC_ASF_EN)) { | 2552 | u16 data; |
2553 | |||
2554 | factps = er32(FACTPS); | ||
2555 | e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data); | ||
2556 | |||
2557 | if (!(factps & E1000_FACTPS_MNGCG) && | ||
2558 | ((data & E1000_NVM_INIT_CTRL2_MNGM) == | ||
2559 | (e1000_mng_mode_pt << 13))) { | ||
2548 | ret_val = true; | 2560 | ret_val = true; |
2549 | return ret_val; | 2561 | goto out; |
2550 | } | 2562 | } |
2563 | } else if ((manc & E1000_MANC_SMBUS_EN) && | ||
2564 | !(manc & E1000_MANC_ASF_EN)) { | ||
2565 | ret_val = true; | ||
2566 | goto out; | ||
2551 | } | 2567 | } |
2552 | 2568 | ||
2569 | out: | ||
2553 | return ret_val; | 2570 | return ret_val; |
2554 | } | 2571 | } |
2555 | 2572 | ||