+@@ -1111,9 +1118,13 @@ static int __devinit cpmac_probe(struct
+ struct cpmac_priv *priv;
+ struct net_device *dev;
+ struct plat_cpmac_data *pdata;
++ void __iomem *mii_reg;
++ u32 tmp;
++ unsigned external_mii = 0;
+
+ pdata = pdev->dev.platform_data;
+
++detect_again:
+ for (phy_id = 0; phy_id < PHY_MAX_ADDR; phy_id++) {
+ if (!(pdata->phy_mask & (1 << phy_id)))
+ continue;
+@@ -1122,12 +1133,43 @@ static int __devinit cpmac_probe(struct