From: Emil Tantilov Date: Sat, 10 Dec 2011 08:21:47 +0000 (+0000) Subject: ixgbe: fix incorrect PHY register reads X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~134 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=424b24ff588adac3c554deca13e1c80620ab6996;p=users%2Fjedix%2Flinux-maple.git ixgbe: fix incorrect PHY register reads Fix some register reads that had the opcode and register parameters swapped. Also use define instead of a magic (0x3) number. (cherry picked from commit c1085b10925a3271f90cb9619f22835e701e8657) Signed-off-by: Emil Tantilov Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher Signed-off-by: Joe Jin --- diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index f1365fef4ed2b..7c3fb072c33ab 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c @@ -266,10 +266,10 @@ s32 ixgbe_clear_hw_cntrs_generic(struct ixgbe_hw *hw) if (hw->mac.type == ixgbe_mac_X540) { if (hw->phy.id == 0) hw->phy.ops.identify(hw); - hw->phy.ops.read_reg(hw, 0x3, IXGBE_PCRC8ECL, &i); - hw->phy.ops.read_reg(hw, 0x3, IXGBE_PCRC8ECH, &i); - hw->phy.ops.read_reg(hw, 0x3, IXGBE_LDPCECL, &i); - hw->phy.ops.read_reg(hw, 0x3, IXGBE_LDPCECH, &i); + hw->phy.ops.read_reg(hw, IXGBE_PCRC8ECL, MDIO_MMD_PCS, &i); + hw->phy.ops.read_reg(hw, IXGBE_PCRC8ECH, MDIO_MMD_PCS, &i); + hw->phy.ops.read_reg(hw, IXGBE_LDPCECL, MDIO_MMD_PCS, &i); + hw->phy.ops.read_reg(hw, IXGBE_LDPCECH, MDIO_MMD_PCS, &i); } return 0;