Re: uvcvideo: Failed to resubmit video URB (-27)

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

 



On Thu, 29 Sep 2011, Pitt, Jason N wrote:

> Thanks Alan-
> 
> Here's the first part of the dmesg output with that patch:
> 
> jpitt@selenide:~$ dmesg
> [  552.541851] ehci_hcd 0000:09:00.5: Bad iTD frame 233 index0 0 startf 1864
> [  552.541858] ehci_hcd 0000:09:00.5:   clockuf 1856 nowuf 1864 oclock 1863 clock0 1863 uframe0 1831

Wow!  This indicates a hardware bug, not a software error.  Apparently
this EHCI controller's frame index register occasionally goes backward:  
After initially reading 1863, it changed to 1856!  That's only a
one-bit error, but it's enough to throw everything off.  I'd guess that
the controller updates the microframe number (bits 0-2 in the register)
a little before the frame number (bits 3-13), and we just happened to
read the invalid intermediate value.

Let's find out for certain.  This patch should catch exactly that 
problem, and even tries to work around it.

By the way, what does "lspci" show for your system?

Alan Stern



Index: usb-3.1/drivers/usb/host/ehci-sched.c
===================================================================
--- usb-3.1.orig/drivers/usb/host/ehci-sched.c
+++ usb-3.1/drivers/usb/host/ehci-sched.c
@@ -2459,6 +2459,17 @@ restart:
 			if (now_uframe == now)
 				break;
 
+if (((now - clock) & 1023) > 200) {
+	unsigned now0 = now;
+
+	udelay(1);
+	now = ehci_readl(ehci, &ehci->regs->frame_index) & (mod - 1);
+	ehci_info(ehci, "Bad frame counter change: %u %u %u\n",
+		clock, now0, now);
+	if (((now - clock) & 1023) > 200)
+		break;
+}
+
 			/* rescan the rest of this frame, then ... */
 			clock = now;
 			clock_frame = clock >> 3;

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