@@ -261,8 +261,11 @@ static int mv88e61xx_reg_read(struct phy_device *phydev, int dev, int reg)
int smi_addr = priv->smi_addr;
int res;
- /* In single-chip mode, the device can be addressed directly */
- if (smi_addr == 0)
+ /*
+ * In single-chip or dual-chip (like mv88e6020) mode, the device can
+ * be addressed directly.
+ */
+ if (smi_addr == 0 || priv->direct_access)
return mdio_bus->read(mdio_bus, dev, MDIO_DEVAD_NONE, reg);
/* Wait for the bus to become free */
@@ -298,11 +301,13 @@ static int mv88e61xx_reg_write(struct phy_device *phydev, int dev, int reg,
int smi_addr = priv->smi_addr;
int res;
- /* In single-chip mode, the device can be addressed directly */
- if (smi_addr == 0) {
+ /*
+ * In single-chip or dual-chip (like mv88e6020) mode, the device can
+ * be addressed directly.
+ */
+ if (smi_addr == 0 || priv->direct_access)
return mdio_bus->write(mdio_bus, dev, MDIO_DEVAD_NONE, reg,
val);
- }
/* Wait for the bus to become free */
res = mv88e61xx_smi_wait(mdio_bus, smi_addr);