On Sun, 2006-08-20 at 22:07 +0200, Arnd Bergmann wrote:

> +static int mcs7830_set_autoneg(struct usbnet *dev, int ptrUserPhyMode)
> +{
> +     int ret;
> +     /* Enable all media types */
> +     ret = mcs7830_write_phy(dev, MII_ADVERTISE, 0x05e1);
> +     /* First Disable All */
> +     if (!ret)
> +             ret = mcs7830_write_phy(dev, MII_BMCR, 0x0000);
> +     /* Enable Auto Neg */
> +     if (!ret)
> +             ret = mcs7830_write_phy(dev, MII_BMCR, 0x1000);
> +     /* Restart Auto Neg (Keep the Enable Auto Neg Bit Set) */
> +     if (!ret)
> +             ret = mcs7830_write_phy(dev, MII_BMCR, 0x1200);
> +     return ret < 0 ? : 0;
> +}

include/linux/mii.h also has defines for the flags for MII_ADVERTISE and
MII_BMCR:

So your 0x1200 can be 'BMCR_ANENABLE | BMCR_ANRESTART' for example.
Makes it easier to tell whats going on.

Other than that, it's looking pretty good.


-- 
David Hollis <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to