Commit a7d5f58d authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by David S. Miller

phylib: use MDIO_DEVS[12]

The bare register numbers are used despite <uapi/linux/mdio.h> has MDIO_DEVS[12]
#define'd for those.
Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 884cf705
...@@ -230,13 +230,13 @@ static int get_phy_c45_ids(struct mii_bus *bus, int addr, u32 *phy_id, ...@@ -230,13 +230,13 @@ static int get_phy_c45_ids(struct mii_bus *bus, int addr, u32 *phy_id,
for (i = 1; for (i = 1;
i < num_ids && c45_ids->devices_in_package == 0; i < num_ids && c45_ids->devices_in_package == 0;
i++) { i++) {
reg_addr = MII_ADDR_C45 | i << 16 | 6; reg_addr = MII_ADDR_C45 | i << 16 | MDIO_DEVS2;
phy_reg = mdiobus_read(bus, addr, reg_addr); phy_reg = mdiobus_read(bus, addr, reg_addr);
if (phy_reg < 0) if (phy_reg < 0)
return -EIO; return -EIO;
c45_ids->devices_in_package = (phy_reg & 0xffff) << 16; c45_ids->devices_in_package = (phy_reg & 0xffff) << 16;
reg_addr = MII_ADDR_C45 | i << 16 | 5; reg_addr = MII_ADDR_C45 | i << 16 | MDIO_DEVS1;
phy_reg = mdiobus_read(bus, addr, reg_addr); phy_reg = mdiobus_read(bus, addr, reg_addr);
if (phy_reg < 0) if (phy_reg < 0)
return -EIO; return -EIO;
......
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