ChangeSet 1.2181.22.9, 2005/03/22 18:24:56-05:00, [EMAIL PROTECTED]

        [PATCH] mii: GigE support bug fixes
        
        Signed-off-by: Dale Farnsworth <[EMAIL PROTECTED]>
        Acked-by: James Chapman <[EMAIL PROTECTED]>
        Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>



 mii.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


diff -Nru a/drivers/net/mii.c b/drivers/net/mii.c
--- a/drivers/net/mii.c 2005-03-29 14:07:35 -08:00
+++ b/drivers/net/mii.c 2005-03-29 14:07:35 -08:00
@@ -43,6 +43,9 @@
            (SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full |
             SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full |
             SUPPORTED_Autoneg | SUPPORTED_TP | SUPPORTED_MII);
+       if (mii->supports_gmii)
+               ecmd->supported |= SUPPORTED_1000baseT_Half |
+                       SUPPORTED_1000baseT_Full;
 
        /* only supports twisted-pair */
        ecmd->port = PORT_MII;
@@ -100,7 +103,7 @@
        } else {
                ecmd->autoneg = AUTONEG_DISABLE;
 
-               ecmd->speed = ((bmcr2 & BMCR_SPEED1000 && 
+               ecmd->speed = ((bmcr & BMCR_SPEED1000 && 
                                (bmcr & BMCR_SPEED100) == 0) ? SPEED_1000 :
                               (bmcr & BMCR_SPEED100) ? SPEED_100 : SPEED_10);
                ecmd->duplex = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : 
DUPLEX_HALF;
@@ -163,9 +166,9 @@
                        tmp |= ADVERTISE_100FULL;
                if (mii->supports_gmii) {
                        if (ecmd->advertising & ADVERTISED_1000baseT_Half)
-                               advert2 |= ADVERTISE_1000HALF;
+                               tmp2 |= ADVERTISE_1000HALF;
                        if (ecmd->advertising & ADVERTISED_1000baseT_Full)
-                               advert2 |= ADVERTISE_1000FULL;
+                               tmp2 |= ADVERTISE_1000FULL;
                }
                if (advert != tmp) {
                        mii->mdio_write(dev, mii->phy_id, MII_ADVERTISE, tmp);
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to