Patchwork [net-next] cxgb3: set phy's mdio dev before the phy init sequence

login
register
mail settings
Submitter Divy Le Ray
Date May 21, 2009, 1:56 a.m.
Message ID <20090521015602.1905.98758.stgit@speedy5>
Download mbox | patch
Permalink /patch/27477/
State Accepted
Delegated to: David Miller
Headers show

Comments

Divy Le Ray - May 21, 2009, 1:56 a.m.
From: Divy Le Ray <divy@chelsio.com>

mdio's dev field needs to be set before mdio ops occur.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
---

 drivers/net/cxgb3/t3_hw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - May 21, 2009, 3:52 a.m.
From: Divy Le Ray <divy@chelsio.com>
Date: Wed, 20 May 2009 18:56:02 -0700

> From: Divy Le Ray <divy@chelsio.com>
> 
> mdio's dev field needs to be set before mdio ops occur.
> 
> Signed-off-by: Divy Le Ray <divy@chelsio.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index c8a865a..7e502ff 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -3864,11 +3864,11 @@  int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
 			return -EINVAL;
 		}
 
+		p->phy.mdio.dev = adapter->port[i];
 		ret = pti->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
 				    ai->mdio_ops);
 		if (ret)
 			return ret;
-		p->phy.mdio.dev = adapter->port[i];
 		mac_prep(&p->mac, adapter, j);
 
 		/*