Thread (16 messages) flat view 16 messages, 2 authors, 2017-06-12
STALE3382d

Revision v3 of 7 in this series.

Revisions (7)
  1. v3 [diff vs current]
  2. v3 [diff vs current]
  3. v3 [diff vs current]
  4. v3 [diff vs current]
  5. v3 current
  6. v3 [diff vs current]
  7. v3 [diff vs current]

Re: [PATCH v3 7/9] net: mvmdio: add xmdio xsmi support

From: Russell King - ARM Linux <linux@armlinux.org.uk>
Date: 2017-06-12 10:42:18
Also in: linux-arm-kernel
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Russell King <redacted>
Subject: [PATCH 1/2] net: mvmdio: remove duplicate locking

The MDIO layer already provides per-bus locking, so there's no need for
MDIO bus drivers to do their own internal locking.  Remove this.

Signed-off-by: Russell King <redacted>
---
 drivers/net/ethernet/marvell/mvmdio.c | 10 ----------
 1 file changed, 10 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index c43747f0be0b..d6770217965e 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -23,7 +23,6 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/mutex.h>
 #include <linux/of_device.h>
 #include <linux/of_mdio.h>
 #include <linux/phy.h>
@@ -69,7 +68,6 @@ enum orion_mdio_bus_type {
 };
 
 struct orion_mdio_dev {
-	struct mutex lock;
 	void __iomem *regs;
 	struct clk *clk[3];
 	/*
@@ -254,8 +252,6 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id,
 	if (IS_ERR(ops))
 		return PTR_ERR(ops);
 
-	mutex_lock(&dev->lock);
-
 	ret = orion_mdio_wait_ready(ops, bus);
 	if (ret < 0)
 		goto out;
@@ -274,7 +270,6 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id,
 
 	ret = ops->read(dev);
 out:
-	mutex_unlock(&dev->lock);
 	return ret;
 }
 
@@ -289,8 +284,6 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id,
 	if (IS_ERR(ops))
 		return PTR_ERR(ops);
 
-	mutex_lock(&dev->lock);
-
 	ret = orion_mdio_wait_ready(ops, bus);
 	if (ret < 0)
 		goto out;
@@ -298,7 +291,6 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id,
 	ops->write(dev, mii_id, regnum, value);
 
 out:
-	mutex_unlock(&dev->lock);
 	return ret;
 }
 
@@ -382,8 +374,6 @@ static int orion_mdio_probe(struct platform_device *pdev)
 	dev->bus_type =
 		(enum orion_mdio_bus_type)of_device_get_match_data(&pdev->dev);
 
-	mutex_init(&dev->lock);
-
 	if (pdev->dev.of_node)
 		ret = of_mdiobus_register(bus, pdev->dev.of_node);
 	else
-- 
2.7.4


-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help