Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32174
b: refs/heads/master
c: 9a53a20
h: refs/heads/master
v: v3
  • Loading branch information
Auke Kok authored and Auke Kok committed Jun 27, 2006
1 parent 482b9a5 commit 362019b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0cbabbb0725fa34a37d6b7870b2d2fe17d1a0a94
refs/heads/master: 9a53a2029885e0088e9149679215b95d04deb57b
1 change: 1 addition & 0 deletions trunk/drivers/net/e1000/e1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ struct e1000_adapter {
#ifdef NETIF_F_TSO
boolean_t tso_force;
#endif
boolean_t smart_power_down; /* phy smart power down */
unsigned long flags;
};

Expand Down
15 changes: 15 additions & 0 deletions trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,21 @@ e1000_reset(struct e1000_adapter *adapter)

e1000_reset_adaptive(&adapter->hw);
e1000_phy_get_info(&adapter->hw, &adapter->phy_info);

if (!adapter->smart_power_down &&
(adapter->hw.mac_type == e1000_82571 ||
adapter->hw.mac_type == e1000_82572)) {
uint16_t phy_data = 0;
/* speed up time to link by disabling smart power down, ignore
* the return value of this function because there is nothing
* different we would do if it failed */
e1000_read_phy_reg(&adapter->hw, IGP02E1000_PHY_POWER_MGMT,
&phy_data);
phy_data &= ~IGP02E1000_PM_SPD;
e1000_write_phy_reg(&adapter->hw, IGP02E1000_PHY_POWER_MGMT,
phy_data);
}

if (adapter->en_mng_pt) {
manc = E1000_READ_REG(&adapter->hw, MANC);
manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST);
Expand Down
25 changes: 25 additions & 0 deletions trunk/drivers/net/e1000/e1000_param.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt Delay");

E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate");

/* Enable Smart Power Down of the PHY
*
* Valid Range: 0, 1
*
* Default Value: 0 (disabled)
*/

E1000_PARAM(SmartPowerDownEnable, "Enable PHY smart power down");

#define AUTONEG_ADV_DEFAULT 0x2F
#define AUTONEG_ADV_MASK 0x2F
#define FLOW_CONTROL_DEFAULT FLOW_CONTROL_FULL
Expand Down Expand Up @@ -494,6 +503,22 @@ e1000_check_options(struct e1000_adapter *adapter)
adapter->itr = opt.def;
}
}
{ /* Smart Power Down */
struct e1000_option opt = {
.type = enable_option,
.name = "PHY Smart Power Down",
.err = "defaulting to Disabled",
.def = OPTION_DISABLED
};

if (num_SmartPowerDownEnable > bd) {
int spd = SmartPowerDownEnable[bd];
e1000_validate_option(&spd, &opt, adapter);
adapter->smart_power_down = spd;
} else {
adapter->smart_power_down = opt.def;
}
}

switch (adapter->hw.media_type) {
case e1000_media_type_fiber:
Expand Down

0 comments on commit 362019b

Please sign in to comment.