On 13/01/2012 13:10, Dirk Behme wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> > > Allow boards to change what is advertised before an autoneg > restart happens. > > Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> > CC: Troy Kisky <troy.ki...@boundarydevices.com> > CC: Stefano Babic <sba...@denx.de> > CC: Marek Vasut <marek.va...@gmail.com> > --- > drivers/net/fec_mxc.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c > index b50e01c..6271df5 100644 > --- a/drivers/net/fec_mxc.c > +++ b/drivers/net/fec_mxc.c > @@ -206,12 +206,12 @@ static int miiphy_restart_aneg(struct eth_device *dev) > miiphy_write(dev->name, fec->phy_id, MII_ADVERTISE, > LPA_100FULL | LPA_100HALF | LPA_10FULL | > LPA_10HALF | PHY_ANLPAR_PSB_802_3); > - miiphy_write(dev->name, fec->phy_id, MII_BMCR, > - BMCR_ANENABLE | BMCR_ANRESTART); > - > if (fec->mii_postcall) > ret = fec->mii_postcall(fec->phy_id); > > + miiphy_write(dev->name, fec->phy_id, MII_BMCR, > + BMCR_ANENABLE | BMCR_ANRESTART); > +
...but you change the postcall into a precall... The current implementation is correct. Something is set / written , and after that a specific supplied function (if any) is called, then the name postcall. Changing the order is not correct if the fec->mii_postcall thinks (as it should be) that the MII_BMCR register was already written. But you missed to mention why you need such as change : which is the failure / bug you discovered ? Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de ===================================================================== _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot