
Hi Matthias,
Matthias Fuchs matthias.fuchs@esd-electronics.com writes:
On Thursday 11 January 2007 11:17, Markus Klotzbücher wrote:
Hi Matthias,
Matthias Fuchs matthias.fuchs@esd-electronics.com writes:
On Wednesday 10 January 2007 23:01, Markus Klotzbücher wrote:
Matthias Fuchs matthias.fuchs@esd-electronics.com writes:
The main changes concern endianess fixes. The former code only supports OHCI controller with the same endianess as the CPU. The other fix allows a offset
IIRC same problem with the 440EP and MPC5200, thats what the extra #ifdef in drivers/usb_ohci.c:103 is for.
These are different issues! usb_ohci.c uses readl and writel to access the controller's registers from the CPU (e.g. ohci.regs). The original code never swaps here. But a PCI OHCI controller on a PowerPC needs it. The mXX_swap macros are used to swap data fields in structures that are passed to the host controller indirectly.
I get it. So in the end we have four cases: byte swapping register access or not _and_ byte swapping data or not. Right? Doesn't sound too complicated.
What about taking some code / macros from the linux kernel (usb/host/ohci.h)? It seems that all we need is the CONFIG_USB_OHCI_BIG_ENDIAN define.
Seems reasonable. So we'll use these for register accesses, and the rest stays as is doing CPU dependant byteswapping based on the LITTLEENDIAN define (include/usb.h). Ok?
- I had to disable the 'return -1' statement for an unfinished urb in
sohci_submit_job(). Why isn't it finished?
I really don't know, I guess only you can answer this!
This answer helps me a lot. Why is the urb_finished stuff needed? I go better without :-)
Did you see the comment in usb_ohci.c:1355? It's to make sure a transaction has completed before a new one is started. I'm not insisting to keep this if it's useless, but we need to prove that first. Obviously it was put there for some reason.
The code makes sense. But it does not work for me. I will investigate some more time on this and figure it out.
Thanks!
Regards
Markus Klotzbuecher