Hi,
I've been making some changes for USB bandwidth
allocation & management and came across the following
(collected, not necessarily related) questions.
1. For a particular urb, can a driver (erroneously)
call usb_unlink_urb() more than one time?
If so, what happens on the second, third, etc. calls?
2. Is usb_free_urb() safe? As it is, it looks like
it could free an urb that is in use.
Should it call usb_unlink_urb() before calling
kfree()?
If the urb is in use, what happens now?
Just a quick, hard system crash/hang?
3. In uhci.c: uhci_submit_isochronous(), in the for-loop,
if uhci_alloc_td() fails and the function returns -ENOMEM,
aren't any previously allocated TDs still allocated?
To generalize, I'm asking two things:
a. Does Linux basically trust its drivers to act nicely vs.
having safeguards?
b. I've noticed that error handling and undoing what has
been "done" (such as returning partially allocated memory)
is not always handled cleanly. Is this on purpose?
Is this a Linux philosophy/style?
I have two goals with this set of questions: to improve
linux-usb and to learn more about Linux (for myself and
others).
~Randy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]