Re: "reset full-speed USB device number 6 using ehci-pci" with Dell Inspiron 15R 5537

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

 



On Mon, 22 Feb 2016, Daniel Fraga wrote:

> On Mon, 22 Feb 2016 16:22:59 -0500 (EST)
> Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> > Unfortunately I really need to see the stuff that shows up before the 
> > first couple of pictures.  Is there any way you can use a serial 
> > console or network console to capture the log data?
> 
> 	Unfortunately no :(
> 
> > Failing that, the patch below does the same thing as the previous patch 
> > but it adds a 5-second delay after each line is sent to the log.  Maybe 
> > you'll be able to photograph something useful during those delays.
> 
> 	Ok, the following picture shows more lines at the beginning,
> but it missed some lines (I tried to shoot as fast as I could):
> 
> http://imgur.com/Pri9dso
> 
> 	And this one shows lines from your patch:
> 
> http://imgur.com/fv3X2hE
> 
> 	Unfortunately I couldn't use "shift+PgUp" because it would
> return those lines instead of going back at the screen buffer.
> 
> 	And the behaviour is not constant. I mean, sometimes it shows
> these errors. Sometimes, it returns with a blank screen.

All right; let's try a slightly different approach that shouldn't cause 
any crashes at all.

Alan Stern



Index: usb-4.4/drivers/hid/usbhid/hid-core.c
===================================================================
--- usb-4.4.orig/drivers/hid/usbhid/hid-core.c
+++ usb-4.4/drivers/hid/usbhid/hid-core.c
@@ -1427,6 +1427,7 @@ static int hid_post_reset(struct usb_int
 	struct usb_host_interface *interface = intf->cur_altsetting;
 	int status;
 	char *rdesc;
+	extern int alantest;
 
 	/* Fetch and examine the HID report descriptor. If this
 	 * has changed, then rebind. Since usbcore's check of the
@@ -1457,7 +1458,10 @@ static int hid_post_reset(struct usb_int
 	clear_bit(HID_RESET_PENDING, &usbhid->iofl);
 	spin_unlock_irq(&usbhid->lock);
 	hid_set_idle(dev, intf->cur_altsetting->desc.bInterfaceNumber, 0, 0);
+	alantest = 1;
 	status = hid_start_in(hid);
+	alantest = 0;
+	dev_info(&intf->dev, "post reset hid_start_in -> %d\n", status);
 	if (status < 0)
 		hid_io_error(hid);
 	usbhid_restart_queues(usbhid);
Index: usb-4.4/drivers/usb/core/urb.c
===================================================================
--- usb-4.4.orig/drivers/usb/core/urb.c
+++ usb-4.4/drivers/usb/core/urb.c
@@ -184,6 +184,9 @@ EXPORT_SYMBOL_GPL(usb_unanchor_urb);
 
 /*-------------------------------------------------------------------*/
 
+int alantest;
+EXPORT_SYMBOL(alantest);
+
 /**
  * usb_submit_urb - issue an asynchronous transfer request for an endpoint
  * @urb: pointer to the urb describing the request
@@ -332,8 +335,14 @@ int usb_submit_urb(struct urb *urb, gfp_
 	int				is_out;
 	unsigned int			allowed;
 
+	if (alantest) {
+		pr_info("alantest: urb %p\n", urb);
+		pr_info("alantest: udev %p\n", urb->dev);
+	}
+	if (alantest)  pr_info("submit A\n");
 	if (!urb || !urb->complete)
 		return -EINVAL;
+	if (alantest)  pr_info("submit B\n");
 	if (urb->hcpriv) {
 		WARN_ONCE(1, "URB %p submitted while active\n", urb);
 		return -EBUSY;
@@ -395,6 +404,7 @@ int usb_submit_urb(struct urb *urb, gfp_
 	 * but drivers only control those sizes for ISO.
 	 * while we're checking, initialize return status.
 	 */
+	if (alantest)  pr_info("submit C\n");
 	if (xfertype == USB_ENDPOINT_XFER_ISOC) {
 		int	n, len;
 
@@ -433,6 +443,7 @@ int usb_submit_urb(struct urb *urb, gfp_
 			if (sg->length % max)
 				return -EINVAL;
 	}
+	if (alantest)  pr_info("submit D\n");
 
 	/* the I/O buffer must be mapped/unmapped, except when length=0 */
 	if (urb->transfer_buffer_length > INT_MAX)
@@ -487,6 +498,7 @@ int usb_submit_urb(struct urb *urb, gfp_
 	case USB_ENDPOINT_XFER_ISOC:
 	case USB_ENDPOINT_XFER_INT:
 		/* too small? */
+		if (alantest)  pr_info("submit E\n");
 		switch (dev->speed) {
 		case USB_SPEED_WIRELESS:
 			if ((urb->interval < 6)
@@ -497,6 +509,7 @@ int usb_submit_urb(struct urb *urb, gfp_
 				return -EINVAL;
 			break;
 		}
+		if (alantest)  pr_info("submit F\n");
 		/* too big? */
 		switch (dev->speed) {
 		case USB_SPEED_SUPER:	/* units are 125us */
@@ -532,6 +545,7 @@ int usb_submit_urb(struct urb *urb, gfp_
 		default:
 			return -EINVAL;
 		}
+		if (alantest)  pr_info("submit G\n");
 		if (dev->speed != USB_SPEED_WIRELESS) {
 			/* Round down to a power of 2, no more than max */
 			urb->interval = min(max, 1 << ilog2(urb->interval));

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