e1000e: initial support for 82579 LOMs
[deliverable/linux.git] / drivers / net / e1000e / ethtool.c
index 86c6a26c0a39901ae6580db39422587eebcf0a71..312c704aec343d8a5b2f6f737983bf60d9cca1ca 100644 (file)
@@ -880,6 +880,7 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data)
        switch (mac->type) {
        case e1000_ich10lan:
        case e1000_pchlan:
+       case e1000_pch2lan:
                mask |= (1 << 18);
                break;
        default:
@@ -1321,6 +1322,17 @@ static int e1000_integrated_phy_loopback(struct e1000_adapter *adapter)
                /* Workaround: K1 must be disabled for stable 1Gbps operation */
                e1000_configure_k1_ich8lan(hw, false);
                break;
+       case e1000_phy_82579:
+               /* Disable PHY energy detect power down */
+               e1e_rphy(hw, PHY_REG(0, 21), &phy_reg);
+               e1e_wphy(hw, PHY_REG(0, 21), phy_reg & ~(1 << 3));
+               /* Disable full chip energy detect */
+               e1e_rphy(hw, PHY_REG(776, 18), &phy_reg);
+               e1e_wphy(hw, PHY_REG(776, 18), phy_reg | 1);
+               /* Enable loopback on the PHY */
+#define I82577_PHY_LBK_CTRL          19
+               e1e_wphy(hw, I82577_PHY_LBK_CTRL, 0x8001);
+               break;
        default:
                break;
        }
@@ -1878,6 +1890,7 @@ static int e1000_phys_id(struct net_device *netdev, u32 data)
 
        if ((hw->phy.type == e1000_phy_ife) ||
            (hw->mac.type == e1000_pchlan) ||
+           (hw->mac.type == e1000_pch2lan) ||
            (hw->mac.type == e1000_82583) ||
            (hw->mac.type == e1000_82574)) {
                INIT_WORK(&adapter->led_blink_task, e1000e_led_blink_task);
This page took 0.025836 seconds and 5 git commands to generate.