mii: GigE support bug fixes
Subsystems (2)
PATCH 1/1 mii: GigE support bug fixes
This patch fixes a couple bugs in mii.c GigE support.
Signed-off-by Dale Farnsworth <[email protected]>
Acked-by James Chapman <[email protected]>
drivers/net/mii.c +6 -3
@@ -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);
Jeff Garzik
AppliedQuoted 4 lines · Dale Farnsworth
This patch fixes a couple bugs in
mii.cGigE support.Signed-off-by Dale Farnsworth <[email protected]>Acked-by James Chapman <[email protected]>
Applied, but a small nit: Don't bother including a patch description in the body of the email, if it simply re-states the Subject and nothing more.
Jeff