Re: USB Device stops working after 200001 interrupts

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

 



Alan Stern <stern@...> writes:

> 
> On Thu, 23 Jan 2014, Josh Bendavid wrote:
> 
> > Hi Alan,
> > Is it understood why/how this always happens when the interrupt counter for
> > this device reaches exactly 200001?  I would have assumed that this was a
> > software counter in the kernel, in which case I don't see how this could
> > correlate to a hardware bug.
> 
> The kernel keeps track of unhandled interrupts, and you get that 
> "nobody cared" error when the number exceeds 99900 in a 0.1-second 
> period.  But the test for this condition occurs only at intervals of 
> 100000 interrupts.
> 
> In any case, you can try applying the patch below.  It should print out 
> some relevant information for the 100 interrupts before and after 
> number 200001.  In particular, we should be able to tell whether or not 
> each interrupt was handled by ohci-hcd.
> 
> Alan Stern
> 
> Index: usb-3.13/drivers/usb/host/ohci-hcd.c
> ===================================================================
> --- usb-3.13.orig/drivers/usb/host/ohci-hcd.c
> +++ usb-3.13/drivers/usb/host/ohci-hcd.c
>  <at>  <at>  -784,6 +784,7  <at>  <at>  static irqreturn_t ohci_irq
(struct usb_
>  	struct ohci_hcd		*ohci = hcd_to_ohci (hcd);
>  	struct ohci_regs __iomem *regs = ohci->regs;
>  	int			ints;
> +	static int alancnt;
> 
>  	/* Read interrupt status (and flush pending writes).  We ignore the
>  	 * optimization of checking the LSB of hcca->done_head; it doesn't
>  <at>  <at>  -791,6 +792,11  <at>  <at>  static irqreturn_t ohci_irq
(struct usb_
>  	 */
>  	ints = ohci_readl(ohci, &regs->intrstatus);
> 
> +	if (++alancnt >= 199900 && alancnt < 200100)
> +		ohci_info(ohci, "IRQ %d status %x enable %x\n",
> +				alancnt, ints,
> +				ohci_readl(ohci, &regs->intrenable));
> +
>  	/* Check for an all 1's result which is a typical consequence
>  	 * of dead, unclocked, or unplugged (CardBus...) devices
>  	 */
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@...
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

Hi Alan,
(sorry for the delay)
With this last patch (but NOT including the earlier workaround patch), I get
this additional output periodically in the dmseg

[ 6998.342658] mceusb 4-3:1.0: rx data: 9e 52 82 24 86 23 87 0e 87 23 87 7f
7f 7f 7f 7f 7f 6e 87 23 87 0e 86 0f 86 0f 87 0e 86 0f 86 (length=31)
[ 6998.342662] mceusb 4-3:1.0: Raw IR data, 30 pulse/space samples
[ 6998.342665] mceusb 4-3:1.0: Storing space with duration 4100000
[ 6998.342668] mceusb 4-3:1.0: Storing pulse with duration 100000
[ 6998.342671] mceusb 4-3:1.0: Storing space with duration 1800000
[ 6998.342674] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.342677] mceusb 4-3:1.0: Storing space with duration 1750000
[ 6998.342680] mceusb 4-3:1.0: Storing pulse with duration 350000
[ 6998.342682] mceusb 4-3:1.0: Storing space with duration 700000
[ 6998.342685] mceusb 4-3:1.0: Storing pulse with duration 350000
[ 6998.342688] mceusb 4-3:1.0: Storing space with duration 1750000
[ 6998.342691] mceusb 4-3:1.0: Storing pulse with duration 350000
[ 6998.342694] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.342697] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.342699] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.342702] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.342705] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.342708] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.342711] mceusb 4-3:1.0: Storing space with duration 5500000
[ 6998.342713] mceusb 4-3:1.0: Storing pulse with duration 350000
[ 6998.342716] mceusb 4-3:1.0: Storing space with duration 1750000
[ 6998.342719] mceusb 4-3:1.0: Storing pulse with duration 350000
[ 6998.342722] mceusb 4-3:1.0: Storing space with duration 700000
[ 6998.342725] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.342727] mceusb 4-3:1.0: Storing space with duration 750000
[ 6998.342730] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.342733] mceusb 4-3:1.0: Storing space with duration 750000
[ 6998.342736] mceusb 4-3:1.0: Storing pulse with duration 350000
[ 6998.342739] mceusb 4-3:1.0: Storing space with duration 700000
[ 6998.342742] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.342744] mceusb 4-3:1.0: Storing space with duration 750000
[ 6998.342747] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.342750] mceusb 4-3:1.0: processed IR data, calling ir_raw_event_handle
[ 6998.348752] systemd-journald[195]: Vacuuming done, freed 131072 bytes
[ 6998.442670] mceusb 4-3:1.0: rx data: 9e 7f 7f 7f 26 86 24 86 0e 87 0e 87
0e 87 0e 87 23 87 0e 87 0e 86 24 86 0f 86 24 86 24 86 24 (length=31)
[ 6998.442674] mceusb 4-3:1.0: Raw IR data, 30 pulse/space samples
[ 6998.442677] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.442681] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.442683] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.442686] mceusb 4-3:1.0: Storing space with duration 1900000
[ 6998.442692] mceusb 4-3:1.0: Storing space with duration 1800000
[ 6998.442695] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.442698] mceusb 4-3:1.0: Storing space with duration 700000
[ 6998.442701] mceusb 4-3:1.0: Storing pulse with duration 350000
[ 6998.442703] mceusb 4-3:1.0: Storing space with duration 700000
[ 6998.442706] mceusb 4-3:1.0: Storing pulse with duration 350000
[ 6998.442709] mceusb 4-3:1.0: Storing space with duration 700000
[ 6998.442712] mceusb 4-3:1.0: Storing pulse with duration 350000
[ 6998.442715] mceusb 4-3:1.0: Storing space with duration 700000
[ 6998.442718] mceusb 4-3:1.0: Storing pulse with duration 350000
[ 6998.442720] mceusb 4-3:1.0: Storing space with duration 1750000
[ 6998.442723] mceusb 4-3:1.0: Storing pulse with duration 350000
[ 6998.442726] mceusb 4-3:1.0: Storing space with duration 700000
[ 6998.442729] mceusb 4-3:1.0: Storing pulse with duration 350000
[ 6998.442732] mceusb 4-3:1.0: Storing space with duration 700000
[ 6998.442735] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.442737] mceusb 4-3:1.0: Storing space with duration 1800000
[ 6998.442740] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.442743] mceusb 4-3:1.0: Storing space with duration 750000
[ 6998.442746] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.442749] mceusb 4-3:1.0: Storing space with duration 1800000
[ 6998.442752] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.442754] mceusb 4-3:1.0: Storing space with duration 1800000
[ 6998.442757] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.442760] mceusb 4-3:1.0: Storing space with duration 1800000
[ 6998.442763] mceusb 4-3:1.0: processed IR data, calling ir_raw_event_handle
[ 6998.542729] mceusb 4-3:1.0: rx data: 99 d9 0f 86 0f 86 0f 86 24 86 0f 86
7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f (length=26)
[ 6998.542733] mceusb 4-3:1.0: Raw IR data, 25 pulse/space samples
[ 6998.542736] mceusb 4-3:1.0: Storing pulse with duration 4450000
[ 6998.542740] mceusb 4-3:1.0: Storing space with duration 750000
[ 6998.542742] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.542745] mceusb 4-3:1.0: Storing space with duration 750000
[ 6998.542748] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.542751] mceusb 4-3:1.0: Storing space with duration 750000
[ 6998.542754] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.542757] mceusb 4-3:1.0: Storing space with duration 1800000
[ 6998.542760] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.542762] mceusb 4-3:1.0: Storing space with duration 750000
[ 6998.542765] mceusb 4-3:1.0: Storing pulse with duration 300000
[ 6998.542768] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542771] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542774] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542777] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542779] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542782] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542785] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542788] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542790] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542793] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542796] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542799] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542801] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542804] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.542807] mceusb 4-3:1.0: processed IR data, calling ir_raw_event_handle
[ 6998.642658] mceusb 4-3:1.0: rx data: 82 7f 5f (length=3)
[ 6998.642662] mceusb 4-3:1.0: Raw IR data, 2 pulse/space samples
[ 6998.642665] mceusb 4-3:1.0: Storing space with duration 6350000
[ 6998.642668] mceusb 4-3:1.0: Storing space with duration 4750000
[ 6998.642671] mceusb 4-3:1.0: rx data: 80 (length=1)
[ 6998.642674] mceusb 4-3:1.0: End of raw IR data
[ 6998.642677] mceusb 4-3:1.0: processed IR data, calling ir_raw_event_handle




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