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

Bug#314954: [Linux-usb-users] Re: logitech usb mouse "dies"



On Wed, 21 Dec 2005, Willi Mann wrote:

> > By the way, it looks like you don't need the entire patch.  Just the parts 
> > the remove the lines saying
> > 
> > 	case -EILSEQ:
> > 
> > should be enough to help.
> 
> confirmed. What's needed to get that into the offical kernel releases?

I've tried; it wasn't accepted.  The patch below should be more acceptable
to the maintainer.  Try it instead of the other one; it ought to get rid
of all those error messages showing up in the log as well as fixing the
mouse problem.  That is, it won't prevent the actual errors from occurring
at a rate of ~1 per minute -- it will just stop the driver from logging
the messages.

If it works well, I'll submit it.

> - Now see what's happening when I unplug the mouse "fast":
> 
> Dec 21 14:40:44 wmiwilli kernel: drivers/usb/input/hid-core.c: input irq
> status -84 received
> Dec 21 14:40:44 wmiwilli last message repeated 2 times
> Dec 21 14:40:44 wmiwilli kernel: hub 2-0:1.0: state 5 ports 2 chg 0000
> evt 0002
> Dec 21 14:40:44 wmiwilli kernel: uhci_hcd 0000:00:1d.1: port 1 portsc
> 008a,00
> Dec 21 14:40:44 wmiwilli kernel: hub 2-0:1.0: port 1, status 0100,
> change 0003, 12 Mb/s
> Dec 21 14:40:44 wmiwilli kernel: usb 2-1: USB disconnect, address 2
> Dec 21 14:40:44 wmiwilli kernel: usb 2-1: usb_disable_device nuking all URBs
> Dec 21 14:40:44 wmiwilli kernel: uhci_hcd 0000:00:1d.1: shutdown urb
> dd36b740 pipe 40408280 ep1in-intr
> Dec 21 14:40:44 wmiwilli kernel: usb 2-1: unregistering interface 2-1:1.0
> Dec 21 14:40:44 wmiwilli kernel: usb 2-1:1.0: hotplug
> Dec 21 14:40:44 wmiwilli kernel: usb 2-1: unregistering device
> Dec 21 14:40:44 wmiwilli kernel: usb 2-1: hotplug
> Dec 21 14:40:44 wmiwilli kernel: hub 2-0:1.0: debounce: port 1: total
> 100ms stable 100ms status 0x100

> - When I unplug it "slowly":
> 
> Dec 21 14:41:27 wmiwilli kernel: drivers/usb/input/hid-core.c: input irq
> status -84 received
> Dec 21 14:41:28 wmiwilli last message repeated 7 times
> Dec 21 14:41:28 wmiwilli kernel: hub 2-0:1.0: state 5 ports 2 chg 0000
> evt 0002
> Dec 21 14:41:28 wmiwilli kernel: uhci_hcd 0000:00:1d.1: port 1 portsc
> 008a,00
> Dec 21 14:41:28 wmiwilli kernel: hub 2-0:1.0: port 1, status 0100,
> change 0003, 12 Mb/s
> Dec 21 14:41:28 wmiwilli kernel: usb 2-1: USB disconnect, address 4
> Dec 21 14:41:28 wmiwilli kernel: usb 2-1: usb_disable_device nuking all URBs
> Dec 21 14:41:28 wmiwilli kernel: uhci_hcd 0000:00:1d.1: shutdown urb
> cb373140 pipe 40408480 ep1in-intr
> Dec 21 14:41:28 wmiwilli kernel: usb 2-1: unregistering interface 2-1:1.0
> Dec 21 14:41:28 wmiwilli kernel: usb 2-1:1.0: hotplug
> Dec 21 14:41:28 wmiwilli kernel: usb 2-1: unregistering device
> Dec 21 14:41:28 wmiwilli kernel: usb 2-1: hotplug
> Dec 21 14:41:28 wmiwilli kernel: hub 2-0:1.0: debounce: port 1: total
> 100ms stable 100ms status 0x100

I don't see any significant difference.  Did I miss something?

Alan Stern



Index: linux-2.6.15-rc6/drivers/usb/input/hid-core.c
===================================================================
--- linux-2.6.15-rc6.orig/drivers/usb/input/hid-core.c
+++ linux-2.6.15-rc6/drivers/usb/input/hid-core.c
@@ -927,8 +927,8 @@ static void hid_irq_in(struct urb *urb, 
 		case -ENOENT:
 		case -EPERM:
 		case -ESHUTDOWN:	/* unplug */
-		case -EILSEQ:		/* unplug timeout on uhci */
 			return;
+		case -EILSEQ:		/* protocol error or unplug */
 		case -ETIMEDOUT:	/* NAK */
 			break;
 		default:		/* error */
@@ -1101,8 +1101,8 @@ static void hid_irq_out(struct urb *urb,
 		case 0:			/* success */
 			break;
 		case -ESHUTDOWN:	/* unplug */
-		case -EILSEQ:		/* unplug timeout on uhci */
 			unplug = 1;
+		case -EPROTO:		/* protocol error or unplug */
 		case -ECONNRESET:	/* unlink */
 		case -ENOENT:
 			break;
@@ -1149,8 +1149,9 @@ 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 -EILSEQ:		/* protocol error or unplug */
+		case -EPROTO:		/* protocol error or unplug */
 		case -ECONNRESET:	/* unlink */
 		case -ENOENT:
 		case -EPIPE:		/* report not available */




Reply to: