On Thursday 14 March 2002 03:12, David Brownell wrote:
> > > > 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.
Unfortunately, to be safe in the writeout path, no memory at all must be allocated
or a mempool provided.
> That essential information is unavailable when the URB is allocated.
> It's known for the first time when the URB is submitted.
Could we add a pointer to a reserve page to the urb structure ?
Can you give an upper bound on the amount of memory needed ?
Regards
Oliver
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel