[U-Boot] Ethernet support broken for Wandboard Quad on master
Charles Coldwell
coldwell at gmail.com
Thu Jul 18 17:49:12 CEST 2013
On Thu, Jul 18, 2013 at 11:44 AM, Fabio Estevam <festevam at gmail.com> wrote:
>
> The following patch fixes it:
>
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -337,12 +337,8 @@ int genphy_parse_link(struct phy_device *phydev)
> estatus = phy_read(phydev, MDIO_DEVAD_NONE,
> MII_ESTATUS);
>
> - if (estatus & (ESTATUS_1000_XFULL | ESTATUS_1000_XHALF |
> - ESTATUS_1000_TFULL | ESTATUS_1000_THALF)) {
> - phydev->speed = SPEED_1000;
> - if (estatus & (ESTATUS_1000_XFULL | ESTATUS_1000_TFULL))
> - phydev->duplex = DUPLEX_FULL;
> - }
> + if (estatus & (ESTATUS_1000_XFULL | ESTATUS_1000_TFULL))
> + phydev->duplex = DUPLEX_FULL;
>
> } else {
> u32 bmcr = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR);
>
> Is this the correct fix?
No, I don't think so.
In the previous version, it would have set both phydev->speed and
phydev->duplex; after your patch it only sets phydev->duplex.
What happens if you just remove the line that assigns phydev->speed in
the previous version?
--
Charles M. Coldwell, W1CMC
Belmont, Massachusetts, New England
"Turn on, log in, tune out"
More information about the U-Boot
mailing list