> > > Can we in this way totally avoid allocating memory in the HCDs ? > > > > There's a principle called "modularity" that argues against pushing > > knowledge to places it doesn't belong ... like details of QH/ED and > > TD memory allocations being handled outside the HCDs that need > > those data structures! :) > > Agreed. But we can ask the HCD how much to reserve allocating the urb.
And that would work ... how? Remember it's a multi-dimensional problem. Remember that TDs come in several types (three for EHCI, two for OHCI, and I think just one for UHCI) that are chosen based on the device and the type of transfer. And the number of TDs needed is an additional function of the HC, buffer alignment, buffer size, and TD type. That essential information is unavailable when the URB is allocated. It's known for the first time when the URB is submitted. However, I did describe how to ensure that the other essential memory can be safely allocated out of the URB submission path. - Dave _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel