Re: ehci-hcd.c causes: irq <number>: nobody cared

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

 



On Tue, 13 May 2014, Dr. Werner Fink wrote:

> OK ... the patch was changed as I had been told that I should do it this
> way.  In my original code I simply use
> 
> 	masked_status = status & (INTR_MASK | STS_FLR | STS_RECL);
> 
> 	/* Shared IRQ? */
> 	if (!masked_status || unlikely(ehci->rh_state == EHCI_RH_HALTED)) {
> 		spin_unlock_irqrestore(&ehci->lock, flags);
> 		printk("ehci_irq status: %#8.8x", status);
> 		return IRQ_NONE;
> 	}
> 
> and with this I can use my ethernet card more than 15 minutes.  The printk()
> line I used first after I had also used some printk() lines in the ethernet
> driver to see what was wrong with the shared IRQ.  Then I had identified the
> STS_RECL from the printk() above in my logs and or'd the STS_RECL to the
> masked status bits.  After this all problems had been gone.

What about something like this instead?

 	masked_status = status & (INTR_MASK | STS_FLR);
 
 	/* Shared IRQ? */
 	if (!masked_status || unlikely(ehci->rh_state == EHCI_RH_HALTED)) {
+		if (status & STS_RECL) {
+			ehci_writel(ehci, STS_RECL, &ehci->regs->status);
+			ehci_readl(ehci, &ehci->regs->status);
+		}
 		spin_unlock_irqrestore(&ehci->lock, flags);
 		return IRQ_NONE;
 	}

That should do about the same thing as your change, except for
returning IRQ_NONE rather than IRQ_HANDLED.

However, I don't see why writing the STS_RECL bit should fix anything.  
It is a ReadOnly bit, after all.  And returning IRQ_HANDLED wouldn't 
fix anything either; it would merely cause your system to keep on 
running while an interrupt storm occurred.

Alan Stern

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