Skip to content

Commit cc1de78

Browse files
etantilovJeff Kirsher
authored andcommitted
ixgbe: correct CS4223/7 PHY identification
Previous method was unreliable. Use a different register to differentiate between the SKUs. Signed-off-by: Emil Tantilov <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 8066603 commit cc1de78

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@
8484
#define IXGBE_CS4227_GLOBAL_ID_LSB 0
8585
#define IXGBE_CS4227_GLOBAL_ID_MSB 1
8686
#define IXGBE_CS4227_SCRATCH 2
87-
#define IXGBE_CS4223_PHY_ID 0x7003 /* Quad port */
88-
#define IXGBE_CS4227_PHY_ID 0x3003 /* Dual port */
87+
#define IXGBE_CS4227_EFUSE_PDF_SKU 0x19F
88+
#define IXGBE_CS4223_SKU_ID 0x0010 /* Quad port */
89+
#define IXGBE_CS4227_SKU_ID 0x0014 /* Dual port */
8990
#define IXGBE_CS4227_RESET_PENDING 0x1357
9091
#define IXGBE_CS4227_RESET_COMPLETE 0x5AA5
9192
#define IXGBE_CS4227_RETRIES 15

drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,16 +1807,16 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed,
18071807
if (hw->phy.mdio.prtad == MDIO_PRTAD_NONE)
18081808
return IXGBE_ERR_PHY_ADDR_INVALID;
18091809

1810-
/* Get external PHY device id */
1811-
ret_val = hw->phy.ops.read_reg(hw, IXGBE_CS4227_GLOBAL_ID_MSB,
1812-
IXGBE_MDIO_ZERO_DEV_TYPE, &reg_phy_ext);
1810+
/* Get external PHY SKU id */
1811+
ret_val = hw->phy.ops.read_reg(hw, IXGBE_CS4227_EFUSE_PDF_SKU,
1812+
IXGBE_MDIO_ZERO_DEV_TYPE, &reg_phy_ext);
18131813
if (ret_val)
18141814
return ret_val;
18151815

18161816
/* When configuring quad port CS4223, the MAC instance is part
18171817
* of the slice offset.
18181818
*/
1819-
if (reg_phy_ext == IXGBE_CS4223_PHY_ID)
1819+
if (reg_phy_ext == IXGBE_CS4223_SKU_ID)
18201820
slice_offset = (hw->bus.lan_id +
18211821
(hw->bus.instance_id << 1)) << 12;
18221822
else

0 commit comments

Comments
 (0)