diff options
author | Antoine Ténart <antoine.tenart@free-electrons.com> | 2017-06-15 17:43:22 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-16 19:27:12 +0300 |
commit | 440ea77654d0fbb6e144dc90f6fa1d4429d83280 (patch) | |
tree | 0d72f599578523e2e37fa29c6ab34b119e454ec6 /drivers | |
parent | 1955796640a6736583b59c581d3ccddfca66cb33 (diff) | |
download | linux-440ea77654d0fbb6e144dc90f6fa1d4429d83280.tar.xz |
net: mvmdio: check the MII_ADDR_C45 bit is not set for smi operations
Add a check for the read and write smi operations, to ensure the
MII_ADDR_C45 bit isn't set. This will be needed as soon as the xSMI
support is added to the mvmdio driver.
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/marvell/mvmdio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c index e4aa8e2d2e8a..fe6072aae0a6 100644 --- a/drivers/net/ethernet/marvell/mvmdio.c +++ b/drivers/net/ethernet/marvell/mvmdio.c @@ -126,6 +126,9 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id, u32 val; int ret; + if (regnum & MII_ADDR_C45) + return -EOPNOTSUPP; + ret = orion_mdio_wait_ready(&orion_mdio_smi_ops, bus); if (ret < 0) goto out; @@ -157,6 +160,9 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id, struct orion_mdio_dev *dev = bus->priv; int ret; + if (regnum & MII_ADDR_C45) + return -EOPNOTSUPP; + ret = orion_mdio_wait_ready(&orion_mdio_smi_ops, bus); if (ret < 0) goto out; |