On Fri, 7 Oct 2005, Vojtech Pavlik wrote: > On Thu, Oct 06, 2005 at 04:43:44PM -0400, Alan Stern wrote: > > Vojtech: > > > > This patch (as576) removes some mistaken tests for disconnection from the > > HID driver. -EILSEQ refers to an arbitrary low-level protocol error, not > > necessarily a disconnection. Also, a completion routine will never see a > > status of -EPERM; that's used only to indicate a failure during > > usb_submit_urb. > > The -EILSEQ was needed on some UHCI hardware to prevent the driver from > resubmitting the irq urb or submitting more out/ctrl urbs on a > disconnected hardware, spamming the logs until a proper -ESHUTDOWN is > received.
Like I said to Pete, the answer is to avoid writing too many error messages to the log and maybe also add a delay before resubmitting. Don't try to avoid submitting more URBs to disconnected hardware. There's absolutely no way for a driver to tell when a device has disconnected, until it starts receiving -ESHUTDOWN errors or its disconnect method is called. > The -EPERM will also happen when an URB is submitted on an already > disconnected device. Yes, it will happen on _submission_. It won't be the status in the _callback_. (And it's not exactly right to say that -EPERM happens when an URB is submitted for an already-disconnected device. In fact it happens whenever the URB has been cancelled by usb_kill_urb.) Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
