return mv88e6xxx_phy_write(chip, lane, reg_c45, val);
}
-static int mv88e6352_serdes_power_set(struct mv88e6xxx_chip *chip, bool on)
+int mv88e6352_serdes_power(struct mv88e6xxx_chip *chip, int port, bool on)
{
u16 val, new_val;
int err;
+ if (!mv88e6xxx_serdes_get_lane(chip, port))
+ return 0;
+
err = mv88e6352_serdes_read(chip, MII_BMCR, &val);
if (err)
return err;
return false;
}
-int mv88e6352_serdes_power(struct mv88e6xxx_chip *chip, int port, bool on)
-{
- int err;
-
- if (mv88e6352_port_has_serdes(chip, port)) {
- err = mv88e6352_serdes_power_set(chip, on);
- if (err < 0)
- return err;
- }
-
- return 0;
-}
-
struct mv88e6352_serdes_hw_stat {
char string[ETH_GSTRING_LEN];
int sizeof_stat;