Lines 1734-1740
Link Here
|
1734 |
|
1734 |
|
1735 |
e1000_reset_hw(&adapter->hw); |
1735 |
e1000_reset_hw(&adapter->hw); |
1736 |
if (adapter->hw.mac.type >= e1000_82544) |
1736 |
if (adapter->hw.mac.type >= e1000_82544) |
1737 |
E1000_WRITE_REG(&adapter->hw, E1000_WUC, 0); |
1737 |
E1000_WRITE_REG(&adapter->hw, E1000_WUFC, 0); |
1738 |
|
1738 |
|
1739 |
e1000_led_off(&adapter->hw); |
1739 |
e1000_led_off(&adapter->hw); |
1740 |
e1000_cleanup_led(&adapter->hw); |
1740 |
e1000_cleanup_led(&adapter->hw); |
Lines 2309-2315
Link Here
|
2309 |
|
2309 |
|
2310 |
/* Issue a global reset */ |
2310 |
/* Issue a global reset */ |
2311 |
e1000_reset_hw(hw); |
2311 |
e1000_reset_hw(hw); |
2312 |
E1000_WRITE_REG(hw, E1000_WUC, 0); |
2312 |
E1000_WRITE_REG(hw, E1000_WUFC, 0); |
2313 |
em_disable_aspm(adapter); |
2313 |
em_disable_aspm(adapter); |
2314 |
/* and a re-init */ |
2314 |
/* and a re-init */ |
2315 |
if (e1000_init_hw(hw) < 0) { |
2315 |
if (e1000_init_hw(hw) < 0) { |
Lines 2510-2518
Link Here
|
2510 |
|
2510 |
|
2511 |
/* Enable only WOL MAGIC by default */ |
2511 |
/* Enable only WOL MAGIC by default */ |
2512 |
if (adapter->wol) { |
2512 |
if (adapter->wol) { |
2513 |
if_setcapabilitiesbit(ifp, IFCAP_WOL, 0); |
2513 |
if_setcapenablebit(ifp, IFCAP_WOL_MAGIC, |
2514 |
if_setcapenablebit(ifp, IFCAP_WOL_MAGIC, 0); |
2514 |
IFCAP_WOL_MCAST| IFCAP_WOL_UCAST); |
2515 |
} |
2515 |
} else { |
|
|
2516 |
if_setcapenablebit(ifp, 0, IFCAP_WOL_MAGIC | |
2517 |
IFCAP_WOL_MCAST| IFCAP_WOL_UCAST); |
2518 |
} |
2516 |
|
2519 |
|
2517 |
/* |
2520 |
/* |
2518 |
* Specify the media types supported by this adapter and register |
2521 |
* Specify the media types supported by this adapter and register |
Lines 3310-3315
Link Here
|
3310 |
case e1000_pch2lan: |
3313 |
case e1000_pch2lan: |
3311 |
case e1000_pch_lpt: |
3314 |
case e1000_pch_lpt: |
3312 |
case e1000_pch_spt: |
3315 |
case e1000_pch_spt: |
|
|
3316 |
case e1000_82575: /* listing all igb devices */ |
3317 |
case e1000_82576: |
3318 |
case e1000_82580: |
3319 |
case e1000_i350: |
3320 |
case e1000_i354: |
3321 |
case e1000_i210: |
3322 |
case e1000_i211: |
3323 |
case e1000_vfadapt: |
3324 |
case e1000_vfadapt_i350: |
3313 |
apme_mask = E1000_WUC_APME; |
3325 |
apme_mask = E1000_WUC_APME; |
3314 |
adapter->has_amt = TRUE; |
3326 |
adapter->has_amt = TRUE; |
3315 |
eeprom_data = E1000_READ_REG(&adapter->hw, E1000_WUC); |
3327 |
eeprom_data = E1000_READ_REG(&adapter->hw, E1000_WUC); |
Lines 3389-3395
Link Here
|
3389 |
ctrl |= (E1000_CTRL_SWDPIN2 | E1000_CTRL_SWDPIN3); |
3401 |
ctrl |= (E1000_CTRL_SWDPIN2 | E1000_CTRL_SWDPIN3); |
3390 |
E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); |
3402 |
E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); |
3391 |
wuc = E1000_READ_REG(&adapter->hw, E1000_WUC); |
3403 |
wuc = E1000_READ_REG(&adapter->hw, E1000_WUC); |
3392 |
wuc |= E1000_WUC_PME_EN ; |
3404 |
wuc |= (E1000_WUC_PME_EN | E1000_WUC_APME); |
3393 |
E1000_WRITE_REG(&adapter->hw, E1000_WUC, wuc); |
3405 |
E1000_WRITE_REG(&adapter->hw, E1000_WUC, wuc); |
3394 |
|
3406 |
|
3395 |
if ((adapter->hw.mac.type == e1000_ich8lan) || |
3407 |
if ((adapter->hw.mac.type == e1000_ich8lan) || |
Lines 3413-3418
Link Here
|
3413 |
if ((if_getcapenable(ifp) & IFCAP_WOL_MAGIC) == 0) |
3425 |
if ((if_getcapenable(ifp) & IFCAP_WOL_MAGIC) == 0) |
3414 |
adapter->wol &= ~E1000_WUFC_MAG; |
3426 |
adapter->wol &= ~E1000_WUFC_MAG; |
3415 |
|
3427 |
|
|
|
3428 |
if ((if_getcapenable(ifp) & IFCAP_WOL_UCAST) == 0) |
3429 |
adapter->wol &= ~E1000_WUFC_EX; |
3430 |
|
3416 |
if ((if_getcapenable(ifp) & IFCAP_WOL_MCAST) == 0) |
3431 |
if ((if_getcapenable(ifp) & IFCAP_WOL_MCAST) == 0) |
3417 |
adapter->wol &= ~E1000_WUFC_MC; |
3432 |
adapter->wol &= ~E1000_WUFC_MC; |
3418 |
else { |
3433 |
else { |
Lines 3421-3430
Link Here
|
3421 |
E1000_WRITE_REG(&adapter->hw, E1000_RCTL, rctl); |
3436 |
E1000_WRITE_REG(&adapter->hw, E1000_RCTL, rctl); |
3422 |
} |
3437 |
} |
3423 |
|
3438 |
|
3424 |
if ((adapter->hw.mac.type == e1000_pchlan) || |
3439 |
if ( adapter->hw.mac.type >= e1000_pchlan) { |
3425 |
(adapter->hw.mac.type == e1000_pch2lan) || |
|
|
3426 |
(adapter->hw.mac.type == e1000_pch_lpt) || |
3427 |
(adapter->hw.mac.type == e1000_pch_spt)) { |
3428 |
if (em_enable_phy_wakeup(adapter)) |
3440 |
if (em_enable_phy_wakeup(adapter)) |
3429 |
return; |
3441 |
return; |
3430 |
} else { |
3442 |
} else { |
Lines 3489-3495
Link Here
|
3489 |
|
3501 |
|
3490 |
/* enable PHY wakeup in MAC register */ |
3502 |
/* enable PHY wakeup in MAC register */ |
3491 |
E1000_WRITE_REG(hw, E1000_WUC, |
3503 |
E1000_WRITE_REG(hw, E1000_WUC, |
3492 |
E1000_WUC_PHY_WAKE | E1000_WUC_PME_EN); |
3504 |
E1000_WUC_PHY_WAKE | E1000_WUC_PME_EN | E1000_WUC_APME); |
3493 |
E1000_WRITE_REG(hw, E1000_WUFC, adapter->wol); |
3505 |
E1000_WRITE_REG(hw, E1000_WUFC, adapter->wol); |
3494 |
|
3506 |
|
3495 |
/* configure and enable PHY wakeup in PHY registers */ |
3507 |
/* configure and enable PHY wakeup in PHY registers */ |