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. So, is there some other, more clean, way to implement support for such a chip? Should I use the usbmon interface? I already tried letting the driver have its own (*urb_enqueue)() function, where it would swap the data and call ohci_urb_enqueue() afterwards, but somehow this doesn't work. Any idea what might be wrong? As implementing an usbmon for enqueuing wouldn't be much different from a codeflow point of view, I fear it won't work, too. [4294677.915000] usb 1-1: new full speed USB device using soc-ohci and address 2 [4294677.916000] drivers/usb/host/ohci-dbg.c: SUB 819f4218 dev=0 ep=0in-ctrl flags=10 len=0/64 stat=-150 [4294677.919000] soc-ohci soc-ohci.0: ed_schedule()->PIPE_CONROL [4294677.927000] ohci-hcd irq [4294678.130000] ohci-hcd irq [4294678.130000] soc-ohci soc-ohci.0: urb 819f4218 td a1312040 (2) cc 4, len=0/64 [4294678.130000] drivers/usb/host/ohci-dbg.c: RET 819f4218 dev=0 ep=0in-ctrl flags=10 len=0/64 stat=-32 [4294678.130000] drivers/usb/host/ohci-dbg.c: setup(8): 01 00 06 80 00 40 00 00 [4294678.130000] drivers/usb/host/ohci-dbg.c: data(0/64): stat:-32 I can post some code if it would help. Greetings, Andre' ------------------------------------------------------- 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