On Tuesday 11 April 2006 8:56 am, Andre' Draszik wrote: > Hi, > > I am working on an OHCI driver for a SOC that expects all but control > transfers to the root hub to be big endian. Also, it swaps incoming data.
Sounds buggy as all get-out. What policy could it use to swap incoming data bytes? It can't assume all data bytes are 16-bit integers, because some device protocols use 32-bit integers. Many intermix the two... USB provides a stream of _bytes_ and there's no way silicion should ever be trying to interpret them as anything else. If that's not buggy-as-designed, then it's just another chip erratum and you'll have to get the details and provide a workaround. I'm thinking for example of drivers/mmc/at91_mci.c which works around a silicon bug by doing a swab32() on all ingoing and outgoing data buffers. There's already some infrastructure to cope with cases where a handful of controllers use curious byte ordering for data specific to the controller. Presumably you already noticed that big_endian() stuff?? Your messages say you're using the "soc-ohci" PPC stuff which was the source of that ... - Dave ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel