David Hollis wrote:

Interesting, I wonder if anyone else is using these devices on other PPC
or like systems?  I suppose they may be trying to use them but not
having much success and just not reporting it.  I wouldn't be too
surprised if it's an endian issue, though the PHY handling has been a
bit suspect as of late.  Hopefully the work I'm doing now will get the
PHYs working much more predictably.

I caught a bunch of endian problems when back porting the current usbnet.c code to 2.4 for use on a big-endian mips processor (tivo). Another one of those things I mean to wrap up to submit a patch for, but haven't yet. I have this bundled up with my ax88178 changes, but presumably it's better if I factor it out into separate patches.

In particular, in the 2.6.12 ax8817x_bind and ax88772_bind functions, you'll find the mii code that looks like this:

       ax8817x_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET);
       ax8817x_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE,
               ADVERTISE_ALL | ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP);

The "val" arguments need to be turned into le16 values:

ax8817x_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, cpu_to_le16(BMCR_RESET));
       ax8817x_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE,
cpu_to_le16(ADVERTISE_ALL | ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP));

There are endian issues with some of the mdio_read calls too, e.g. in ax88[17]72_link_reset

--Jamie





-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to