On Tue, 11 Apr 2006, 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.
> 
> Therefore, I placed some byteswapping code into
> storage/transport.c:usb_stor_bulk_transfer_sglist(),
> host/ohci-q.c:finish_urb(), and
> include/linux/usb.h:usb_fill_control_urb() and usb_fill_bulk_urb.
> 
> My patch works fine for usb mass storage devices, but other devices,
> like a USB bluetooth adaptor and a USB network adaptor fail.

Regardless of how you decide to pursue this (following David's advice 
would be a good idea), the changes you list here are definitely bad.

    (1) You shouldn't need to change a class-based device driver such as 
        usb-storage to work with your special host controller.  Besides,
        if you need to change one then you need to change them all, and
        that hardly seems practical.  Better to change your driver to
        make it work with all the existing code.

    (2) The data structures that usb_fill_control_urb and 
        usb_fill_bulk_urb create are pre-defined and well documented.
        In particular, the byte order is fixed and should not be
        changed.

Alan Stern



-------------------------------------------------------
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

Reply via email to