Commit 29c4409a authored by Jeb J. Cramer's avatar Jeb J. Cramer Committed by Jeff Garzik

e1000 5/10:

* 2/3 wire downshift phy bits changed in newer phy revs 
parent 45733a6f
...@@ -658,6 +658,8 @@ e1000_setup_copper_link(struct e1000_hw *hw) ...@@ -658,6 +658,8 @@ e1000_setup_copper_link(struct e1000_hw *hw)
return -E1000_ERR_PHY; return -E1000_ERR_PHY;
} }
phy_data |= M88E1000_EPSCR_TX_CLK_25; phy_data |= M88E1000_EPSCR_TX_CLK_25;
if (hw->phy_revision < M88E1011_I_REV_4) {
/* Configure Master and Slave downshift values */ /* Configure Master and Slave downshift values */
phy_data &= ~(M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK | phy_data &= ~(M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK |
M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK); M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK);
...@@ -667,6 +669,7 @@ e1000_setup_copper_link(struct e1000_hw *hw) ...@@ -667,6 +669,7 @@ e1000_setup_copper_link(struct e1000_hw *hw)
DEBUGOUT("PHY Write Error\n"); DEBUGOUT("PHY Write Error\n");
return -E1000_ERR_PHY; return -E1000_ERR_PHY;
} }
}
/* SW Reset the PHY so all changes take effect */ /* SW Reset the PHY so all changes take effect */
ret_val = e1000_phy_reset(hw); ret_val = e1000_phy_reset(hw);
...@@ -2103,6 +2106,7 @@ e1000_detect_gig_phy(struct e1000_hw *hw) ...@@ -2103,6 +2106,7 @@ e1000_detect_gig_phy(struct e1000_hw *hw)
return -E1000_ERR_PHY; return -E1000_ERR_PHY;
} }
hw->phy_id |= (uint32_t) (phy_id_low & PHY_REVISION_MASK); hw->phy_id |= (uint32_t) (phy_id_low & PHY_REVISION_MASK);
hw->phy_revision = (uint32_t) phy_id_low & ~PHY_REVISION_MASK;
switch(hw->mac_type) { switch(hw->mac_type) {
case e1000_82543: case e1000_82543:
......
...@@ -854,6 +854,7 @@ struct e1000_hw { ...@@ -854,6 +854,7 @@ struct e1000_hw {
e1000_bus_type bus_type; e1000_bus_type bus_type;
uint32_t io_base; uint32_t io_base;
uint32_t phy_id; uint32_t phy_id;
uint32_t phy_revision;
uint32_t phy_addr; uint32_t phy_addr;
uint32_t original_fc; uint32_t original_fc;
uint32_t txcw; uint32_t txcw;
...@@ -1758,6 +1759,7 @@ struct e1000_hw { ...@@ -1758,6 +1759,7 @@ struct e1000_hw {
#define M88E1011_I_PHY_ID 0x01410C20 #define M88E1011_I_PHY_ID 0x01410C20
#define M88E1000_12_PHY_ID M88E1000_E_PHY_ID #define M88E1000_12_PHY_ID M88E1000_E_PHY_ID
#define M88E1000_14_PHY_ID M88E1000_E_PHY_ID #define M88E1000_14_PHY_ID M88E1000_E_PHY_ID
#define M88E1011_I_REV_4 0x04
/* Miscellaneous PHY bit definitions. */ /* Miscellaneous PHY bit definitions. */
#define PHY_PREAMBLE 0xFFFFFFFF #define PHY_PREAMBLE 0xFFFFFFFF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment