drivers: net: qfec: Reset PHY during init.

When the chip is soft reset but the PHY is not, the ethernet
link does not come up. The PHY and MAC go out of sync. Reseting
PHY starts auto-negotiation.

Change-Id: I379774908dc8a536080cc1d5600eeda57da28e88
Acked-by: Kaushik Sikdar <ksikdar@qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
diff --git a/drivers/net/qfec.c b/drivers/net/qfec.c
index fc27837..e1f4be2 100644
--- a/drivers/net/qfec.c
+++ b/drivers/net/qfec.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -1899,6 +1899,11 @@
 	setup_timer(&priv->phy_tmr, qfec_phy_monitor, (unsigned long)dev);
 	mod_timer(&priv->phy_tmr, jiffies + HZ);
 
+	/* driver supports AN capable PHY only */
+	qfec_mdio_write(dev, priv->phy_id, MII_BMCR, BMCR_RESET);
+	res = (BMCR_ANENABLE|BMCR_ANRESTART);
+	qfec_mdio_write(dev, priv->phy_id, MII_BMCR, res);
+
 	/* initialize interrupts */
 	QFEC_LOG(QFEC_LOG_DBG, " %s: request irq %d\n", __func__, dev->irq);
 	res = request_irq(dev->irq, qfec_int, 0, dev->name, dev);