Patchwork [17/27] UBUNTU: SAUCE: Convert mii_bus users to new MDIO bus API

login
register
mail settings
Submitter Benjamin Collins
Date Oct. 15, 2009, 10:33 p.m.
Message ID <8bdcadb98cd3574ea09de76e46b39220edeabd75.1339455422.git.bcollins@ubuntu.com>
Download mbox | patch
Permalink /patch/164280/
State New
Headers show

Comments

Benjamin Collins - Oct. 15, 2009, 10:33 p.m.
The MDIO bus API now takes an extra argument to support 10G.

This patch is being maintained and will eventually be merged upstream by
Freescale directly. The powerpc-e500mc flavour uses this.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
---
 drivers/net/dsa/mv88e6060.c                       |    6 +++---
 drivers/net/dsa/mv88e6xxx.c                       |   14 +++++++-------
 drivers/net/ethernet/broadcom/tg3.c               |    4 ++--
 drivers/net/ethernet/dnet.c                       |    7 ++++---
 drivers/net/ethernet/ethoc.c                      |    5 +++--
 drivers/net/ethernet/rdc/r6040.c                  |    5 +++--
 drivers/net/ethernet/smsc/smsc9420.c              |    9 +++++----
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c |    7 ++++---
 drivers/net/ethernet/xilinx/ll_temac_mdio.c       |    6 ++++--
 drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c |    7 ++++---
 drivers/net/ethernet/xilinx/xilinx_emaclite.c     |    7 ++++---
 drivers/net/phy/fixed.c                           |    7 ++++---
 drivers/net/phy/icplus.c                          |   12 ++++++------
 drivers/net/phy/mdio-bitbang.c                    |    4 ++--
 drivers/net/phy/mdio-mux.c                        |    8 ++++----
 drivers/staging/et131x/et131x.c                   |    5 +++--
 16 files changed, 62 insertions(+), 51 deletions(-)

Patch

diff --git a/drivers/net/dsa/mv88e6060.c b/drivers/net/dsa/mv88e6060.c
index 325391d..5711dce 100644
--- a/drivers/net/dsa/mv88e6060.c
+++ b/drivers/net/dsa/mv88e6060.c
@@ -19,7 +19,7 @@ 
 
 static int reg_read(struct dsa_switch *ds, int addr, int reg)
 {
-	return mdiobus_read(ds->master_mii_bus, ds->pd->sw_addr + addr, reg);
+	return mdiobus_read(ds->master_mii_bus, ds->pd->sw_addr + addr, 0, reg);
 }
 
 #define REG_READ(addr, reg)					\
@@ -35,7 +35,7 @@  static int reg_read(struct dsa_switch *ds, int addr, int reg)
 
 static int reg_write(struct dsa_switch *ds, int addr, int reg, u16 val)
 {
-	return mdiobus_write(ds->master_mii_bus, ds->pd->sw_addr + addr,
+	return mdiobus_write(ds->master_mii_bus, ds->pd->sw_addr + addr, 0,
 			     reg, val);
 }
 
@@ -52,7 +52,7 @@  static char *mv88e6060_probe(struct mii_bus *bus, int sw_addr)
 {
 	int ret;
 
-	ret = mdiobus_read(bus, sw_addr + REG_PORT(0), 0x03);
+	ret = mdiobus_read(bus, sw_addr + REG_PORT(0), 0, 0x03);
 	if (ret >= 0) {
 		ret &= 0xfff0;
 		if (ret == 0x0600)
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
index a2c62c2..3965ef3 100644
--- a/drivers/net/dsa/mv88e6xxx.c
+++ b/drivers/net/dsa/mv88e6xxx.c
@@ -30,7 +30,7 @@  static int mv88e6xxx_reg_wait_ready(struct mii_bus *bus, int sw_addr)
 	int i;
 
 	for (i = 0; i < 16; i++) {
-		ret = mdiobus_read(bus, sw_addr, 0);
+		ret = mdiobus_read(bus, sw_addr, 0, 0);
 		if (ret < 0)
 			return ret;
 
@@ -46,7 +46,7 @@  int __mv88e6xxx_reg_read(struct mii_bus *bus, int sw_addr, int addr, int reg)
 	int ret;
 
 	if (sw_addr == 0)
-		return mdiobus_read(bus, addr, reg);
+		return mdiobus_read(bus, addr, 0, reg);
 
 	/*
 	 * Wait for the bus to become free.
@@ -58,7 +58,7 @@  int __mv88e6xxx_reg_read(struct mii_bus *bus, int sw_addr, int addr, int reg)
 	/*
 	 * Transmit the read command.
 	 */
-	ret = mdiobus_write(bus, sw_addr, 0, 0x9800 | (addr << 5) | reg);
+	ret = mdiobus_write(bus, sw_addr, 0, 0, 0x9800 | (addr << 5) | reg);
 	if (ret < 0)
 		return ret;
 
@@ -72,7 +72,7 @@  int __mv88e6xxx_reg_read(struct mii_bus *bus, int sw_addr, int addr, int reg)
 	/*
 	 * Read the data.
 	 */
-	ret = mdiobus_read(bus, sw_addr, 1);
+	ret = mdiobus_read(bus, sw_addr, 0, 1);
 	if (ret < 0)
 		return ret;
 
@@ -98,7 +98,7 @@  int __mv88e6xxx_reg_write(struct mii_bus *bus, int sw_addr, int addr,
 	int ret;
 
 	if (sw_addr == 0)
-		return mdiobus_write(bus, addr, reg, val);
+		return mdiobus_write(bus, addr, 0, reg, val);
 
 	/*
 	 * Wait for the bus to become free.
@@ -110,14 +110,14 @@  int __mv88e6xxx_reg_write(struct mii_bus *bus, int sw_addr, int addr,
 	/*
 	 * Transmit the data to write.
 	 */
-	ret = mdiobus_write(bus, sw_addr, 1, val);
+	ret = mdiobus_write(bus, sw_addr, 0, 1, val);
 	if (ret < 0)
 		return ret;
 
 	/*
 	 * Transmit the write command.
 	 */
-	ret = mdiobus_write(bus, sw_addr, 0, 0x9400 | (addr << 5) | reg);
+	ret = mdiobus_write(bus, sw_addr, 0, 0, 0x9400 | (addr << 5) | reg);
 	if (ret < 0)
 		return ret;
 
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index edeeb51..e648f68 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -1175,7 +1175,7 @@  static int tg3_bmcr_reset(struct tg3 *tp)
 	return 0;
 }
 
-static int tg3_mdio_read(struct mii_bus *bp, int mii_id, int reg)
+static int tg3_mdio_read(struct mii_bus *bp, int mii_id, int dev_addr, int reg)
 {
 	struct tg3 *tp = bp->priv;
 	u32 val;
@@ -1190,7 +1190,7 @@  static int tg3_mdio_read(struct mii_bus *bp, int mii_id, int reg)
 	return val;
 }
 
-static int tg3_mdio_write(struct mii_bus *bp, int mii_id, int reg, u16 val)
+static int tg3_mdio_write(struct mii_bus *bp, int mii_id, int dev_addr, int reg, u16 val)
 {
 	struct tg3 *tp = bp->priv;
 	u32 ret = 0;
diff --git a/drivers/net/ethernet/dnet.c b/drivers/net/ethernet/dnet.c
index 290b26f..eb6f02c 100644
--- a/drivers/net/ethernet/dnet.c
+++ b/drivers/net/ethernet/dnet.c
@@ -100,7 +100,8 @@  static void __devinit dnet_get_hwaddr(struct dnet *bp)
 		memcpy(bp->dev->dev_addr, addr, sizeof(addr));
 }
 
-static int dnet_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
+static int dnet_mdio_read(struct mii_bus *bus, int mii_id, int dev_addr,
+			  int regnum)
 {
 	struct dnet *bp = bus->priv;
 	u16 value;
@@ -132,8 +133,8 @@  static int dnet_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
 	return value;
 }
 
-static int dnet_mdio_write(struct mii_bus *bus, int mii_id, int regnum,
-			   u16 value)
+static int dnet_mdio_write(struct mii_bus *bus, int mii_id, int dev_addr,
+			   int regnum, u16 value)
 {
 	struct dnet *bp = bus->priv;
 	u16 tmp;
diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c
index a381678..8a0e8cc 100644
--- a/drivers/net/ethernet/ethoc.c
+++ b/drivers/net/ethernet/ethoc.c
@@ -612,7 +612,7 @@  static int ethoc_poll(struct napi_struct *napi, int budget)
 	return rx_work_done;
 }
 
-static int ethoc_mdio_read(struct mii_bus *bus, int phy, int reg)
+static int ethoc_mdio_read(struct mii_bus *bus, int phy, int dev_addr, int reg)
 {
 	struct ethoc *priv = bus->priv;
 	int i;
@@ -634,7 +634,8 @@  static int ethoc_mdio_read(struct mii_bus *bus, int phy, int reg)
 	return -EBUSY;
 }
 
-static int ethoc_mdio_write(struct mii_bus *bus, int phy, int reg, u16 val)
+static int ethoc_mdio_write(struct mii_bus *bus, int phy, int dev_addr,
+			    int reg, u16 val)
 {
 	struct ethoc *priv = bus->priv;
 	int i;
diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index d1827e8..a555ead 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -245,7 +245,8 @@  static void r6040_phy_write(void __iomem *ioaddr,
 	}
 }
 
-static int r6040_mdiobus_read(struct mii_bus *bus, int phy_addr, int reg)
+static int r6040_mdiobus_read(struct mii_bus *bus, int phy_addr,
+			      int dev_addr, int reg)
 {
 	struct net_device *dev = bus->priv;
 	struct r6040_private *lp = netdev_priv(dev);
@@ -255,7 +256,7 @@  static int r6040_mdiobus_read(struct mii_bus *bus, int phy_addr, int reg)
 }
 
 static int r6040_mdiobus_write(struct mii_bus *bus, int phy_addr,
-						int reg, u16 value)
+			       int dev_addr, int reg, u16 value)
 {
 	struct net_device *dev = bus->priv;
 	struct r6040_private *lp = netdev_priv(dev);
diff --git a/drivers/net/ethernet/smsc/smsc9420.c b/drivers/net/ethernet/smsc/smsc9420.c
index fd33b21..40a5bf4 100644
--- a/drivers/net/ethernet/smsc/smsc9420.c
+++ b/drivers/net/ethernet/smsc/smsc9420.c
@@ -129,7 +129,8 @@  static inline void smsc9420_pci_flush_write(struct smsc9420_pdata *pd)
 	smsc9420_reg_read(pd, ID_REV);
 }
 
-static int smsc9420_mii_read(struct mii_bus *bus, int phyaddr, int regidx)
+static int smsc9420_mii_read(struct mii_bus *bus, int phyaddr, int dev_addr,
+			     int regidx)
 {
 	struct smsc9420_pdata *pd = (struct smsc9420_pdata *)bus->priv;
 	unsigned long flags;
@@ -166,8 +167,8 @@  out:
 	return reg;
 }
 
-static int smsc9420_mii_write(struct mii_bus *bus, int phyaddr, int regidx,
-			   u16 val)
+static int smsc9420_mii_write(struct mii_bus *bus, int phyaddr, int dev_addr,
+			      int regidx, u16 val)
 {
 	struct smsc9420_pdata *pd = (struct smsc9420_pdata *)bus->priv;
 	unsigned long flags;
@@ -331,7 +332,7 @@  smsc9420_ethtool_getregs(struct net_device *dev, struct ethtool_regs *regs,
 		return;
 
 	for (i = 0; i <= 31; i++)
-		data[j++] = smsc9420_mii_read(phy_dev->bus, phy_dev->addr, i);
+		data[j++] = smsc9420_mii_read(phy_dev->bus, phy_dev->addr, 0, i);
 }
 
 static void smsc9420_eeprom_enable_access(struct smsc9420_pdata *pd)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index ade1082..1cde137 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -60,7 +60,8 @@  static int stmmac_mdio_busy_wait(void __iomem *ioaddr, unsigned int mii_addr)
  * accessing the PHY registers.
  * Fortunately, it seems this has no drawback for the 7109 MAC.
  */
-static int stmmac_mdio_read(struct mii_bus *bus, int phyaddr, int phyreg)
+static int stmmac_mdio_read(struct mii_bus *bus, int phyaddr, int dev_addr,
+			    int phyreg)
 {
 	struct net_device *ndev = bus->priv;
 	struct stmmac_priv *priv = netdev_priv(ndev);
@@ -94,8 +95,8 @@  static int stmmac_mdio_read(struct mii_bus *bus, int phyaddr, int phyreg)
  * @phydata: phy data
  * Description: it writes the data into the MII register from within the device.
  */
-static int stmmac_mdio_write(struct mii_bus *bus, int phyaddr, int phyreg,
-			     u16 phydata)
+static int stmmac_mdio_write(struct mii_bus *bus, int phyaddr, int dev_addr,
+			     int phyreg, u16 phydata)
 {
 	struct net_device *ndev = bus->priv;
 	struct stmmac_priv *priv = netdev_priv(ndev);
diff --git a/drivers/net/ethernet/xilinx/ll_temac_mdio.c b/drivers/net/ethernet/xilinx/ll_temac_mdio.c
index 8cf9d4f..ad7c36e 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_mdio.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_mdio.c
@@ -19,7 +19,8 @@ 
 /* ---------------------------------------------------------------------
  * MDIO Bus functions
  */
-static int temac_mdio_read(struct mii_bus *bus, int phy_id, int reg)
+static int temac_mdio_read(struct mii_bus *bus, int phy_id, int dev_addr,
+			   int reg)
 {
 	struct temac_local *lp = bus->priv;
 	u32 rc;
@@ -38,7 +39,8 @@  static int temac_mdio_read(struct mii_bus *bus, int phy_id, int reg)
 	return rc;
 }
 
-static int temac_mdio_write(struct mii_bus *bus, int phy_id, int reg, u16 val)
+static int temac_mdio_write(struct mii_bus *bus, int phy_id, int dev_addr,
+			    int reg, u16 val)
 {
 	struct temac_local *lp = bus->priv;
 
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
index e90e1f4..bbc13c1 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
@@ -43,7 +43,8 @@  int axienet_mdio_wait_until_ready(struct axienet_local *lp)
  * address by first writing the details into MCR register. After a while
  * the register MRD is read to obtain the PHY register content.
  */
-static int axienet_mdio_read(struct mii_bus *bus, int phy_id, int reg)
+static int axienet_mdio_read(struct mii_bus *bus, int phy_id, int dev_addr,
+			     int reg)
 {
 	u32 rc;
 	int ret;
@@ -86,8 +87,8 @@  static int axienet_mdio_read(struct mii_bus *bus, int phy_id, int reg)
  * into MWD register. The the MCR register is then appropriately setup
  * to finish the write operation.
  */
-static int axienet_mdio_write(struct mii_bus *bus, int phy_id, int reg,
-			      u16 val)
+static int axienet_mdio_write(struct mii_bus *bus, int phy_id, int dev_addr,
+			      int reg, u16 val)
 {
 	int ret;
 	struct axienet_local *lp = bus->priv;
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 77cfe51..609dfba 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -749,7 +749,8 @@  static int xemaclite_mdio_wait(struct net_local *lp)
  *
  * Return:	Value read from the MII management register
  */
-static int xemaclite_mdio_read(struct mii_bus *bus, int phy_id, int reg)
+static int xemaclite_mdio_read(struct mii_bus *bus, int phy_id, int dev_addr,
+			       int reg)
 {
 	struct net_local *lp = bus->priv;
 	u32 ctrl_reg;
@@ -791,8 +792,8 @@  static int xemaclite_mdio_read(struct mii_bus *bus, int phy_id, int reg)
  * This function waits till the device is ready to accept a new MDIO
  * request and then writes the val to the MDIO Write Data register.
  */
-static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg,
-				u16 val)
+static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int dev_addr,
+				int reg, u16 val)
 {
 	struct net_local *lp = bus->priv;
 	u32 ctrl_reg;
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index 65e106b..4bc3393 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -123,7 +123,8 @@  static int fixed_phy_update_regs(struct fixed_phy *fp)
 	return 0;
 }
 
-static int fixed_mdio_read(struct mii_bus *bus, int phy_id, int reg_num)
+static int fixed_mdio_read(struct mii_bus *bus, int phy_id, int devad,
+				int reg_num)
 {
 	struct fixed_mdio_bus *fmb = bus->priv;
 	struct fixed_phy *fp;
@@ -146,8 +147,8 @@  static int fixed_mdio_read(struct mii_bus *bus, int phy_id, int reg_num)
 	return 0xFFFF;
 }
 
-static int fixed_mdio_write(struct mii_bus *bus, int phy_id, int reg_num,
-			    u16 val)
+static int fixed_mdio_write(struct mii_bus *bus, int phy_id, int devad,
+			    int reg_num, u16 val)
 {
 	return 0;
 }
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c
index 5ac46f5..72fb06e 100644
--- a/drivers/net/phy/icplus.c
+++ b/drivers/net/phy/icplus.c
@@ -50,36 +50,36 @@  static int ip175c_config_init(struct phy_device *phydev)
 	if (full_reset_performed == 0) {
 
 		/* master reset */
-		err = mdiobus_write(phydev->bus, 30, 0, 0x175c);
+		err = mdiobus_write(phydev->bus, 30, 0, 0, 0x175c);
 		if (err < 0)
 			return err;
 
 		/* ensure no bus delays overlap reset period */
-		err = mdiobus_read(phydev->bus, 30, 0);
+		err = mdiobus_read(phydev->bus, 30, 0, 0);
 
 		/* data sheet specifies reset period is 2 msec */
 		mdelay(2);
 
 		/* enable IP175C mode */
-		err = mdiobus_write(phydev->bus, 29, 31, 0x175c);
+		err = mdiobus_write(phydev->bus, 29, 0, 31, 0x175c);
 		if (err < 0)
 			return err;
 
 		/* Set MII0 speed and duplex (in PHY mode) */
-		err = mdiobus_write(phydev->bus, 29, 22, 0x420);
+		err = mdiobus_write(phydev->bus, 29, 0, 22, 0x420);
 		if (err < 0)
 			return err;
 
 		/* reset switch ports */
 		for (i = 0; i < 5; i++) {
-			err = mdiobus_write(phydev->bus, i,
+			err = mdiobus_write(phydev->bus, i, 0,
 					    MII_BMCR, BMCR_RESET);
 			if (err < 0)
 				return err;
 		}
 
 		for (i = 0; i < 5; i++)
-			err = mdiobus_read(phydev->bus, i, MII_BMCR);
+			err = mdiobus_read(phydev->bus, i, 0, MII_BMCR);
 
 		mdelay(2);
 
diff --git a/drivers/net/phy/mdio-bitbang.c b/drivers/net/phy/mdio-bitbang.c
index daec9b0..c0e5577 100644
--- a/drivers/net/phy/mdio-bitbang.c
+++ b/drivers/net/phy/mdio-bitbang.c
@@ -152,7 +152,7 @@  static int mdiobb_cmd_addr(struct mdiobb_ctrl *ctrl, int phy, u32 addr)
 	return dev_addr;
 }
 
-static int mdiobb_read(struct mii_bus *bus, int phy, int reg)
+static int mdiobb_read(struct mii_bus *bus, int phy, int dev_addr, int reg)
 {
 	struct mdiobb_ctrl *ctrl = bus->priv;
 	int ret, i;
@@ -181,7 +181,7 @@  static int mdiobb_read(struct mii_bus *bus, int phy, int reg)
 	return ret;
 }
 
-static int mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val)
+static int mdiobb_write(struct mii_bus *bus, int phy, int dev_addr, int reg, u16 val)
 {
 	struct mdiobb_ctrl *ctrl = bus->priv;
 
diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c
index 39ea067..d137c40 100644
--- a/drivers/net/phy/mdio-mux.c
+++ b/drivers/net/phy/mdio-mux.c
@@ -40,7 +40,7 @@  struct mdio_mux_child_bus {
 /*
  * The parent bus' lock is used to order access to the switch_fn.
  */
-static int mdio_mux_read(struct mii_bus *bus, int phy_id, int regnum)
+static int mdio_mux_read(struct mii_bus *bus, int phy_id, int dev_addr, int regnum)
 {
 	struct mdio_mux_child_bus *cb = bus->priv;
 	struct mdio_mux_parent_bus *pb = cb->parent;
@@ -53,7 +53,7 @@  static int mdio_mux_read(struct mii_bus *bus, int phy_id, int regnum)
 
 	pb->current_child = cb->bus_number;
 
-	r = pb->mii_bus->read(pb->mii_bus, phy_id, regnum);
+	r = pb->mii_bus->read(pb->mii_bus, phy_id, dev_addr, regnum);
 out:
 	mutex_unlock(&pb->mii_bus->mdio_lock);
 
@@ -63,7 +63,7 @@  out:
 /*
  * The parent bus' lock is used to order access to the switch_fn.
  */
-static int mdio_mux_write(struct mii_bus *bus, int phy_id,
+static int mdio_mux_write(struct mii_bus *bus, int phy_id, int dev_addr,
 			  int regnum, u16 val)
 {
 	struct mdio_mux_child_bus *cb = bus->priv;
@@ -78,7 +78,7 @@  static int mdio_mux_write(struct mii_bus *bus, int phy_id,
 
 	pb->current_child = cb->bus_number;
 
-	r = pb->mii_bus->write(pb->mii_bus, phy_id, regnum, val);
+	r = pb->mii_bus->write(pb->mii_bus, phy_id, dev_addr, regnum, val);
 out:
 	mutex_unlock(&pb->mii_bus->mdio_lock);
 
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 5b11c5e..b2afb85 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -1695,7 +1695,8 @@  static void et1310_handle_macstat_interrupt(struct et131x_adapter *adapter)
 		adapter->stats.tx_collisions	+= COUNTER_WRAP_12_BIT;
 }
 
-static int et131x_mdio_read(struct mii_bus *bus, int phy_addr, int reg)
+static int et131x_mdio_read(struct mii_bus *bus, int phy_addr, int dev_addr,
+			    int reg)
 {
 	struct net_device *netdev = bus->priv;
 	struct et131x_adapter *adapter = netdev_priv(netdev);
@@ -1711,7 +1712,7 @@  static int et131x_mdio_read(struct mii_bus *bus, int phy_addr, int reg)
 }
 
 static int et131x_mdio_write(struct mii_bus *bus, int phy_addr,
-			     int reg, u16 value)
+			     int dev_addr, int reg, u16 value)
 {
 	struct net_device *netdev = bus->priv;
 	struct et131x_adapter *adapter = netdev_priv(netdev);