cxgb3: set phy's mdio dev before the phy init sequence
authorDivy Le Ray <divy@chelsio.com>
Wed, 20 May 2009 15:56:02 +0000 (15:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 May 2009 03:51:58 +0000 (20:51 -0700)
mdio's dev field needs to be set before mdio ops occur.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/cxgb3/t3_hw.c

index 505a1871d0805bf79f2aad413ecb935f8b41ed80..fc7db8a9ba89b8f863b67aaf84e316632f19459b 100644 (file)
@@ -3866,11 +3866,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);
 
                /*