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.

The -EPERM will also happen when an URB is submitted on an already
disconnected device.

> Alan Stern
> 
> Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
> ---
> 
> Index: usb-2.6/drivers/usb/input/hid-core.c
> ===================================================================
> --- usb-2.6.orig/drivers/usb/input/hid-core.c
> +++ usb-2.6/drivers/usb/input/hid-core.c
> @@ -923,9 +923,7 @@ static void hid_irq_in(struct urb *urb, 
>                       break;
>               case -ECONNRESET:       /* unlink */
>               case -ENOENT:
> -             case -EPERM:
>               case -ESHUTDOWN:        /* unplug */
> -             case -EILSEQ:           /* unplug timeout on uhci */
>                       return;
>               case -ETIMEDOUT:        /* NAK */
>                       break;
> @@ -1099,7 +1097,6 @@ static void hid_irq_out(struct urb *urb,
>               case 0:                 /* success */
>                       break;
>               case -ESHUTDOWN:        /* unplug */
> -             case -EILSEQ:           /* unplug timeout on uhci */
>                       unplug = 1;
>               case -ECONNRESET:       /* unlink */
>               case -ENOENT:
> @@ -1147,7 +1144,6 @@ static void hid_ctrl(struct urb *urb, st
>                               
> hid_input_report(hid->ctrl[hid->ctrltail].report->type, urb, 0, regs);
>                       break;
>               case -ESHUTDOWN:        /* unplug */
> -             case -EILSEQ:           /* unplug timectrl on uhci */
>                       unplug = 1;
>               case -ECONNRESET:       /* unlink */
>               case -ENOENT:
> 
> 

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR


-------------------------------------------------------
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

Reply via email to