forked from Imagelibrary/rtems
2009-04-14 Till Straumann <strauman@slac.stanford.edu>
* libnetworking/rtems/rtems_mii_ioctl_kern.c: poll BMSR twice to clear latched link-status low.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2009-04-14 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
|
* libnetworking/rtems/rtems_mii_ioctl_kern.c: poll BMSR twice
|
||||||
|
to clear latched link-status low.
|
||||||
|
|
||||||
2009-04-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
2009-04-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
|
||||||
* Makefile.am, preinstall.am, libmisc/shell/login.h: Removed login.h.
|
* Makefile.am, preinstall.am, libmisc/shell/login.h: Removed login.h.
|
||||||
|
|||||||
@@ -101,6 +101,9 @@ rtems_mii_ioctl (struct rtems_mdio_info *info, void *uarg, int cmd,
|
|||||||
#endif
|
#endif
|
||||||
case SIOCGIFMEDIA:
|
case SIOCGIFMEDIA:
|
||||||
if (info->mdio_r (phy, uarg, MII_BMCR, &bmcr))
|
if (info->mdio_r (phy, uarg, MII_BMCR, &bmcr))
|
||||||
|
return EINVAL;
|
||||||
|
/* read BMSR twice to clear latched link status low */
|
||||||
|
if (info->mdio_r (phy, uarg, MII_BMSR, &bmsr))
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
if (info->mdio_r (phy, uarg, MII_BMSR, &bmsr))
|
if (info->mdio_r (phy, uarg, MII_BMSR, &bmsr))
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@@ -216,6 +219,15 @@ rtems_mii_ioctl (struct rtems_mdio_info *info, void *uarg, int cmd,
|
|||||||
|
|
||||||
if (!(bmsr2 & (tmp ? EXTSR_1000TFDX : EXTSR_1000THDX)))
|
if (!(bmsr2 & (tmp ? EXTSR_1000TFDX : EXTSR_1000THDX)))
|
||||||
return EOPNOTSUPP;
|
return EOPNOTSUPP;
|
||||||
|
|
||||||
|
/* NOTE: gige standard demands auto-negotiation for gige links.
|
||||||
|
* Disabling autoneg did NOT work on the PHYs I tried
|
||||||
|
* (BCM5421S, intel 82540).
|
||||||
|
* I've seen drivers that simply change what they advertise
|
||||||
|
* to the desired gig mode and re-negotiate.
|
||||||
|
* We could do that here, too, but we don't see the point -
|
||||||
|
* If autoneg works fine then we can as well use it.
|
||||||
|
*/
|
||||||
bmcr = BMCR_S1000;
|
bmcr = BMCR_S1000;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user