David S. Miller wrote:
On Sun, 03 Aug 2003 20:45:01 -0700
David Brownell <david-b@xxxxxxxxxxx> wrote:
What can't be pre-allocated in a reliable way is the resources
used by the host controller drivers, specifically the transfer
descriptors. EHCI and OHCI usually need one per URB, unless
MTU is over 4 KB. UHCI normally needs quite a few.
Ok, that's interesting.
All TDs get allocated in usb_submit_urb(), which is the first
time the "real" core of USB connects an urb with an I/O queue.
That's host-side, not device-side.
Is there a callback that tells the USB driver that some host
controller "resources" have become available? I mean, these host
controllers either have to queue requests when out of resources or
provide a callback so that the drivers can resubmit.
No such callback. If no resources, they fail -ENOMEM and the
caller must recover. Which is why hard_start_xmit() needs to
do something.
- Dave
|