Skip to content

Commit cec8abb

Browse files
liuyonglong86davem330
authored andcommitted
net: hns: Fix wrong read accesses via Clause 45 MDIO protocol
When reading phy registers via Clause 45 MDIO protocol, after write address operation, the driver use another write address operation, so can not read the right value of any phy registers. This patch fixes it. Signed-off-by: Yonglong Liu <[email protected]> Signed-off-by: Peng Li <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ed29ca8 commit cec8abb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/hisilicon/hns_mdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ static int hns_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
321321
}
322322

323323
hns_mdio_cmd_write(mdio_dev, is_c45,
324-
MDIO_C45_WRITE_ADDR, phy_id, devad);
324+
MDIO_C45_READ, phy_id, devad);
325325
}
326326

327327
/* Step 5: waitting for MDIO_COMMAND_REG 's mdio_start==0,*/

0 commit comments

Comments
 (0)