Hi, as you probably know from my previous posts I am working on getting the ohci-isp1362 driver working for my isp1160 HC, based on Lothar's and Olav's work. Unfortunately, I am working with a 2.6.6 kernel and not the latest versions as others are. When porting Lothar's and Olav's patches, I was unable to find an equivalent to the function dma_to_virt() in my kernel tree. I see these functions/macros have been introduced in 2.6.8.1, but only for arm architectures and they seem to be simple bus_to_virt macros.
In essence, the ohci layer writes endpoint decsriptor addresses to the control head / bulk head / ... ohci registers in dma address from, which is returned from dma_pool_alloc(). Lothar's ohci emulation layer then picks up this register value, dam_to_virt converts these to virtual addresses and continues with the list processing. From what I gather, this conversion is not always straight-forward, which can be seen by the fact that the transfer descriptor lists in the ohci layer employ hashing methods to keep track of corresponding virtual addresses. Unfortunately, the endpoint descriptors don't seem to have a similar mechanism (correct me if I am wrong). I am no memory management expert, so I would appreciate any ideas or pointers, how I could implement a similar translation mechanism without having to change the ohci layer. What I have done sofar and I have had some success with, is to alter the ed->dma field to contain the physical address (i.e. virt_to_phys) of the corresponding ed structure. I then redefined dma_to_virt to phys_to_virt. This is not a clean solution and a dirty hack at best and I'm sure I'm going to run into trouble at some point. Can anyone think of a better way? Could this functionality easily be patched into my source tree? Any help would be appreciated. Thanks ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
