Commit cc1de78c authored by Emil Tantilov's avatar Emil Tantilov Committed by Jeff Kirsher

ixgbe: correct CS4223/7 PHY identification

Previous method was unreliable. Use a different register to
differentiate between the SKUs.
Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 80666035
...@@ -84,8 +84,9 @@ ...@@ -84,8 +84,9 @@
#define IXGBE_CS4227_GLOBAL_ID_LSB 0 #define IXGBE_CS4227_GLOBAL_ID_LSB 0
#define IXGBE_CS4227_GLOBAL_ID_MSB 1 #define IXGBE_CS4227_GLOBAL_ID_MSB 1
#define IXGBE_CS4227_SCRATCH 2 #define IXGBE_CS4227_SCRATCH 2
#define IXGBE_CS4223_PHY_ID 0x7003 /* Quad port */ #define IXGBE_CS4227_EFUSE_PDF_SKU 0x19F
#define IXGBE_CS4227_PHY_ID 0x3003 /* Dual port */ #define IXGBE_CS4223_SKU_ID 0x0010 /* Quad port */
#define IXGBE_CS4227_SKU_ID 0x0014 /* Dual port */
#define IXGBE_CS4227_RESET_PENDING 0x1357 #define IXGBE_CS4227_RESET_PENDING 0x1357
#define IXGBE_CS4227_RESET_COMPLETE 0x5AA5 #define IXGBE_CS4227_RESET_COMPLETE 0x5AA5
#define IXGBE_CS4227_RETRIES 15 #define IXGBE_CS4227_RETRIES 15
......
...@@ -1807,8 +1807,8 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed, ...@@ -1807,8 +1807,8 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed,
if (hw->phy.mdio.prtad == MDIO_PRTAD_NONE) if (hw->phy.mdio.prtad == MDIO_PRTAD_NONE)
return IXGBE_ERR_PHY_ADDR_INVALID; return IXGBE_ERR_PHY_ADDR_INVALID;
/* Get external PHY device id */ /* Get external PHY SKU id */
ret_val = hw->phy.ops.read_reg(hw, IXGBE_CS4227_GLOBAL_ID_MSB, ret_val = hw->phy.ops.read_reg(hw, IXGBE_CS4227_EFUSE_PDF_SKU,
IXGBE_MDIO_ZERO_DEV_TYPE, &reg_phy_ext); IXGBE_MDIO_ZERO_DEV_TYPE, &reg_phy_ext);
if (ret_val) if (ret_val)
return ret_val; return ret_val;
...@@ -1816,7 +1816,7 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed, ...@@ -1816,7 +1816,7 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed,
/* When configuring quad port CS4223, the MAC instance is part /* When configuring quad port CS4223, the MAC instance is part
* of the slice offset. * of the slice offset.
*/ */
if (reg_phy_ext == IXGBE_CS4223_PHY_ID) if (reg_phy_ext == IXGBE_CS4223_SKU_ID)
slice_offset = (hw->bus.lan_id + slice_offset = (hw->bus.lan_id +
(hw->bus.instance_id << 1)) << 12; (hw->bus.instance_id << 1)) << 12;
else else
......
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