* [PATCH net-next 0/2] Fix breakage from mdio device
@ 2016-01-07 20:55 Andrew Lunn
2016-01-07 20:55 ` [PATCH net-next 1/2] net: lantiq_etop.c: Use helper to find first phy Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Andrew Lunn @ 2016-01-07 20:55 UTC (permalink / raw)
To: David Miller; +Cc: Florian Fainelli, netdev, Andrew Lunn
These two patches fix MIPS platforms which got broken by
the recent mdio device patchset.
Andrew Lunn (2):
net: lantiq_etop.c: Use helper to find first phy
net: ethernet-rgmii.c: Fix breakage from moving phdev bus
drivers/net/ethernet/lantiq_etop.c | 10 ++--------
drivers/staging/octeon/ethernet-rgmii.c | 6 +++---
2 files changed, 5 insertions(+), 11 deletions(-)
--
2.6.4
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH net-next 1/2] net: lantiq_etop.c: Use helper to find first phy
2016-01-07 20:55 [PATCH net-next 0/2] Fix breakage from mdio device Andrew Lunn
@ 2016-01-07 20:55 ` Andrew Lunn
2016-01-07 20:55 ` [PATCH net-next 2/2] net: ethernet-rgmii.c: Fix breakage from moving phdev bus Andrew Lunn
2016-01-10 23:04 ` [PATCH net-next 0/2] Fix breakage from mdio device David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2016-01-07 20:55 UTC (permalink / raw)
To: David Miller; +Cc: Florian Fainelli, netdev, Andrew Lunn
Make use of the helper to find the first phy device.
This also fixes the compile breakage.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/ethernet/lantiq_etop.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index fb61f7f96bb4..b630ef1e9646 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -375,15 +375,9 @@ static int
ltq_etop_mdio_probe(struct net_device *dev)
{
struct ltq_etop_priv *priv = netdev_priv(dev);
- struct phy_device *phydev = NULL;
- int phy_addr;
+ struct phy_device *phydev;
- for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) {
- if (priv->mii_bus->phy_map[phy_addr]) {
- phydev = priv->mii_bus->phy_map[phy_addr];
- break;
- }
- }
+ phydev = phy_find_first(priv->mii_bus);
if (!phydev) {
netdev_err(dev, "no PHY found\n");
--
2.6.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH net-next 2/2] net: ethernet-rgmii.c: Fix breakage from moving phdev bus
2016-01-07 20:55 [PATCH net-next 0/2] Fix breakage from mdio device Andrew Lunn
2016-01-07 20:55 ` [PATCH net-next 1/2] net: lantiq_etop.c: Use helper to find first phy Andrew Lunn
@ 2016-01-07 20:55 ` Andrew Lunn
2016-01-10 23:04 ` [PATCH net-next 0/2] Fix breakage from mdio device David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2016-01-07 20:55 UTC (permalink / raw)
To: David Miller; +Cc: Florian Fainelli, netdev, Andrew Lunn
The mdio device patches moved the bus member in phy_device into a
substructure. This driver got missed. Fix it.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/staging/octeon/ethernet-rgmii.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/octeon/ethernet-rgmii.c b/drivers/staging/octeon/ethernet-rgmii.c
index 613344b886e1..1055ee14b66a 100644
--- a/drivers/staging/octeon/ethernet-rgmii.c
+++ b/drivers/staging/octeon/ethernet-rgmii.c
@@ -78,7 +78,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev)
*/
spin_lock_irqsave(&global_register_lock, flags);
} else {
- mutex_lock(&priv->phydev->bus->mdio_lock);
+ mutex_lock(&priv->phydev->mdio.bus->mdio_lock);
}
link_info = cvmx_helper_link_get(priv->port);
@@ -113,7 +113,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev)
if (use_global_register_lock)
spin_unlock_irqrestore(&global_register_lock, flags);
else
- mutex_unlock(&priv->phydev->bus->mdio_lock);
+ mutex_unlock(&priv->phydev->mdio.bus->mdio_lock);
return;
}
@@ -132,7 +132,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev)
if (use_global_register_lock)
spin_unlock_irqrestore(&global_register_lock, flags);
else
- mutex_unlock(&priv->phydev->bus->mdio_lock);
+ mutex_unlock(&priv->phydev->mdio.bus->mdio_lock);
if (priv->phydev == NULL) {
/* Tell core. */
--
2.6.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next 0/2] Fix breakage from mdio device
2016-01-07 20:55 [PATCH net-next 0/2] Fix breakage from mdio device Andrew Lunn
2016-01-07 20:55 ` [PATCH net-next 1/2] net: lantiq_etop.c: Use helper to find first phy Andrew Lunn
2016-01-07 20:55 ` [PATCH net-next 2/2] net: ethernet-rgmii.c: Fix breakage from moving phdev bus Andrew Lunn
@ 2016-01-10 23:04 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-01-10 23:04 UTC (permalink / raw)
To: andrew; +Cc: f.fainelli, netdev
From: Andrew Lunn <andrew@lunn.ch>
Date: Thu, 7 Jan 2016 21:55:50 +0100
> These two patches fix MIPS platforms which got broken by
> the recent mdio device patchset.
Series applied, thanks Andrew.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-01-10 23:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-07 20:55 [PATCH net-next 0/2] Fix breakage from mdio device Andrew Lunn
2016-01-07 20:55 ` [PATCH net-next 1/2] net: lantiq_etop.c: Use helper to find first phy Andrew Lunn
2016-01-07 20:55 ` [PATCH net-next 2/2] net: ethernet-rgmii.c: Fix breakage from moving phdev bus Andrew Lunn
2016-01-10 23:04 ` [PATCH net-next 0/2] Fix breakage from mdio device David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).