macb: Fix speed setting
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Thu, 21 Feb 2008 13:50:54 +0000 (22:50 +0900)
committerJeff Garzik <jeff@garzik.org>
Sun, 24 Feb 2008 05:07:42 +0000 (00:07 -0500)
Fix NCFGR.SPD setting on 10Mbps.  This bug was introduced by
conversion to generic PHY layer in kernel 2.6.23.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/macb.c

index 81bf005ff280dd4b556c0c599a9670bc473c47bd..1d210ed4613096118b1d4e6035f357028e1860cc 100644 (file)
@@ -148,7 +148,7 @@ static void macb_handle_link_change(struct net_device *dev)
 
                        if (phydev->duplex)
                                reg |= MACB_BIT(FD);
-                       if (phydev->speed)
+                       if (phydev->speed == SPEED_100)
                                reg |= MACB_BIT(SPD);
 
                        macb_writel(bp, NCFGR, reg);