[Patch] ehci-hcd.c causes: irq <number>: nobody cared

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

 



Avoid that the ehci driver cause that the shared IRQ will disabled.
This behaviour was seen now over several kernel versions with the

00:1a.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 05) (prog-if 20 [EHCI])
    Subsystem: ASRock Incorporation Device [1849:1c2d]
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 16
    Region 0: Memory at f7e08000 (32-bit, non-prefetchable) [size=1K]
    Capabilities: <access denied>
    Kernel driver in use: ehci_hcd

as reported by the command lspci -nnvv on IRQ 16 and as I see in /proc/interrupts

 16:         38     158526        127          0          0          0          0          0   IO-APIC-fasteoi   ehci_hcd:usb1, eth1

I had tried two different ethernetcards but the problem never disapeared.

Signed-off-by: Werner Fink <werner@xxxxxxx>

---
 drivers/usb/host/ehci-hcd.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

--- drivers/usb/host/ehci-hcd.c
+++ drivers/usb/host/ehci-hcd.c	2014-05-13 15:32:03.362235113 +0000
@@ -686,6 +686,7 @@ static irqreturn_t ehci_irq (struct usb_
 	u32			status, masked_status, pcd_status = 0, cmd;
 	int			bh;
 	unsigned long		flags;
+	static u32		spurious_recl;
 
 	/*
 	 * For threadirqs option we use spin_lock_irqsave() variant to prevent
@@ -707,11 +708,19 @@ static irqreturn_t ehci_irq (struct usb_
 	 * We don't use STS_FLR, but some controllers don't like it to
 	 * remain on, so mask it out along with the other status bits.
 	 */
-	masked_status = status & (INTR_MASK | STS_FLR);
+	masked_status = status & (INTR_MASK | STS_FLR | spurious_recl);
 
 	/* Shared IRQ? */
 	if (!masked_status || unlikely(ehci->rh_state == EHCI_RH_HALTED)) {
 		spin_unlock_irqrestore(&ehci->lock, flags);
+		if (masked_status & STS_RECL) {
+			/*
+			 * Avoid repeated schedule status reclamation done
+			 * by some controllers.
+			 */
+			printk(KERN_WARNING "ehci_irq status: %#8.8x", status);
+			spurious_recl |= STS_RECL;
+		}
 		return IRQ_NONE;
 	}
 

Attachment: pgpdgn62Zb5Vj.pgp
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux