Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150039
b: refs/heads/master
c: 52fbc10
h: refs/heads/master
i:
  150037: 2c41897
  150035: f0d3a34
  150031: 7b9eb1c
v: v3
  • Loading branch information
Jie Yang authored and David S. Miller committed Apr 28, 2009
1 parent 8e50d4d commit c7a524d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 36e7b1b8dac1a785abca3a121b6b0b79f1a8d7df
refs/heads/master: 52fbc1007eb071c40a367462476eee695b412578
24 changes: 7 additions & 17 deletions trunk/drivers/net/atl1c/atl1c_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ static void atl1c_check_link_status(struct atl1c_adapter *adapter)
/* link down */
if (netif_carrier_ok(netdev)) {
hw->hibernate = true;
atl1c_set_aspm(hw, false);
if (atl1c_stop_mac(hw) != 0)
if (netif_msg_hw(adapter))
dev_warn(&pdev->dev,
"stop mac failed\n");
atl1c_set_aspm(hw, false);
}
netif_carrier_off(netdev);
} else {
Expand All @@ -240,10 +240,10 @@ static void atl1c_check_link_status(struct atl1c_adapter *adapter)
adapter->link_duplex != duplex) {
adapter->link_speed = speed;
adapter->link_duplex = duplex;
atl1c_set_aspm(hw, true);
atl1c_enable_tx_ctrl(hw);
atl1c_enable_rx_ctrl(hw);
atl1c_setup_mac_ctrl(adapter);
atl1c_set_aspm(hw, true);
if (netif_msg_link(adapter))
dev_info(&pdev->dev,
"%s: %s NIC Link is Up<%d Mbps %s>\n",
Expand Down Expand Up @@ -1242,9 +1242,7 @@ static void atl1c_set_aspm(struct atl1c_hw *hw, bool linkup)

AT_READ_REG(hw, REG_PM_CTRL, &pm_ctrl_data);

pm_ctrl_data &= PM_CTRL_SERDES_PD_EX_L1;
pm_ctrl_data |= ~PM_CTRL_SERDES_BUDS_RX_L1_EN;
pm_ctrl_data |= ~PM_CTRL_SERDES_L1_EN;
pm_ctrl_data &= ~PM_CTRL_SERDES_PD_EX_L1;
pm_ctrl_data &= ~(PM_CTRL_L1_ENTRY_TIMER_MASK <<
PM_CTRL_L1_ENTRY_TIMER_SHIFT);

Expand All @@ -1254,19 +1252,11 @@ static void atl1c_set_aspm(struct atl1c_hw *hw, bool linkup)
pm_ctrl_data |= PM_CTRL_SERDES_PLL_L1_EN;
pm_ctrl_data &= ~PM_CTRL_CLK_SWH_L1;

if (hw->ctrl_flags & ATL1C_ASPM_L1_SUPPORT) {
pm_ctrl_data |= AT_ASPM_L1_TIMER <<
PM_CTRL_L1_ENTRY_TIMER_SHIFT;
pm_ctrl_data |= PM_CTRL_ASPM_L1_EN;
} else
pm_ctrl_data &= ~PM_CTRL_ASPM_L1_EN;

if (hw->ctrl_flags & ATL1C_ASPM_L0S_SUPPORT)
pm_ctrl_data |= PM_CTRL_ASPM_L0S_EN;
else
pm_ctrl_data &= ~PM_CTRL_ASPM_L0S_EN;

pm_ctrl_data |= PM_CTRL_SERDES_BUDS_RX_L1_EN;
pm_ctrl_data |= PM_CTRL_SERDES_L1_EN;
} else {
pm_ctrl_data &= ~PM_CTRL_SERDES_BUDS_RX_L1_EN;
pm_ctrl_data &= ~PM_CTRL_SERDES_L1_EN;
pm_ctrl_data &= ~PM_CTRL_ASPM_L0S_EN;
pm_ctrl_data &= ~PM_CTRL_SERDES_PLL_L1_EN;

Expand Down

0 comments on commit c7a524d

Please sign in to comment.