For OHCI another way to solve the done_list bus_to_virt isssue:
struct td {
...
struct td *dma_hash; /* grows size 64 -> 68/72 */
dma_addr_t dma_addr; /* ... 72 */
};
#define TD_HASH_SIZE 53 /* prime */
struct ohci {
...
struct td *dma_hash [TD_HASH_SIZE];
};
static inline td *dma_to_td (struct ohci *ohci, u32 dma)
{
struct td *td;
td = ohci->dma_hash[(dma>>SOME_SHIFT)%TD_HASH_SIZE];
while (td && td->dma_addr != dma) td = td->dma_hash;
return td;
}
Hashes maintained in td_alloc and td_free. Seems familiar.
Brad, Steve -- that kind of thing? It'd be great to see a patch
along these lines. I think Roman's right: most systems won't
have many tds active at a time. Usually one td per urb.
- Dave
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel