Re: newbie question: usb_kill_urb necessary in disconnect?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 27 Jan 2010 mikedunn@xxxxxxxxxxx wrote:

> Hi,
> 
> Quick question that will save a lot of time slogging through usbcore code if
> someone will indulge me.
> 
> Is it necessary to kill all outstanding urbs in a driver's disconnect
> function?  I've seen documentation saying that the usbcore takes care of this
> when the disconnect is detected, suggesting that tracking outstanding urbs and
> killing them in the driver's disconnect function is unnecessary.  But I also
> see drivers that do just that.  As I understand it, an urb killed by usbcore
> will have its callback invoked, with the result code indicating that it was
> killed, which the callback can handle gracefully.  Any errors in my
> understanding?

That's basically right.  A driver doesn't have to kill its own URBs, 
but it is considered good form to do so.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux