Enable bit15 in the maccontrol register for 100Mbps.
authorSteve Kipisz <s-kipisz2@ti.com>
Thu, 6 Oct 2011 20:57:45 +0000 (15:57 -0500)
committerVaibhav Hiremath <hvaibhav@ti.com>
Mon, 23 Jan 2012 19:14:32 +0000 (00:44 +0530)
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
drivers/net/ethernet/ti/cpsw.c

index 402d8f64ce0451eb27d2c4b9eb6e748ebd28e072..080388c533a73d637d47f62995d198f8b7bf5ecc 100644 (file)
@@ -399,6 +399,8 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave,
                        mac_control &= ~BIT(7); /* TODO: Do not enable  */
                        phy->speed = 100;       /* gig support now      */
                }
+               if (phy->speed == 100)
+                       mac_control |= BIT(15);
                if (phy->duplex)
                        mac_control |= BIT(0);  /* FULLDUPLEXEN */
                if (phy->interface == PHY_INTERFACE_MODE_RGMII) /* RGMII */