Re: USB OOPS 2.6.25-rc2-git1

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Alan Stern <stern@...>
Cc: Andre Tomt <andre@...>, Kernel development list <linux-kernel@...>, USB list <linux-usb@...>
Date: Wednesday, February 20, 2008 - 5:56 pm

On Wednesday 20 February 2008, Alan Stern wrote:

The curious bit IMO being STS_INT (0001), which should also have
triggered an IRQ.  Suggesting to me that the race might be lower
level than that ... at the level of a conflict between the various
mechanisms to ack irqs.

See the appended patch (Andre, this is the additional one I meant)
for a tweak at that level.



The driver's spinlock should prevent that particular problem from
appearing.

- Dave


========= CUT HERE
Modify EHCI irq handling on the theory that at least some of the
"lost" IRQs are caused by goofage between multiple lowlevel IRQ
acking mechanisms:  try rescanning before we exit the handler, in
case the EHCI-internal ack (by clearing the irq status) doesn't
always suffice for IRQs triggered nearly back-to-back.

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

--- g26.orig/drivers/usb/host/ehci-hcd.c	2008-02-20 13:26:00.000000000 -0800
+++ g26/drivers/usb/host/ehci-hcd.c	2008-02-20 13:54:37.000000000 -0800
@@ -638,6 +638,8 @@ static irqreturn_t ehci_irq (struct usb_
 		return IRQ_NONE;
 	}
 
+retrigger:
+
 	/* clear (just) interrupts */
 	ehci_writel(ehci, status, &ehci->regs->status);
 	cmd = ehci_readl(ehci, &ehci->regs->command);
@@ -725,6 +727,12 @@ dead:
 
 	if (bh)
 		ehci_work (ehci);
+
+	status = ehci_readl(ehci, &ehci->regs->status);
+	status &= INTR_MASK;
+	if (status)
+		goto retrigger;
+
 	spin_unlock (&ehci->lock);
 	if (pcd_status & STS_PCD)
 		usb_hcd_poll_rh_status(hcd);
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
USB OOPS 2.6.25-rc2-git1, Andre Tomt, (Tue Feb 19, 11:19 am)
Re: USB OOPS 2.6.25-rc2-git1, Andre Tomt, (Tue Feb 19, 6:28 pm)
Re: USB OOPS 2.6.25-rc2-git1, David Miller, (Tue Feb 19, 6:24 pm)
Re: USB OOPS 2.6.25-rc2-git1, David Brownell, (Tue Feb 19, 8:19 pm)
Re: USB OOPS 2.6.25-rc2-git1, Alan Stern, (Wed Feb 20, 12:10 pm)
Re: USB OOPS 2.6.25-rc2-git1, David Miller, (Tue Feb 19, 9:40 pm)
Re: USB OOPS 2.6.25-rc2-git1, Alan Stern, (Tue Feb 19, 3:31 pm)
Re: USB OOPS 2.6.25-rc2-git1, Andre Tomt, (Tue Feb 19, 5:58 pm)
Re: USB OOPS 2.6.25-rc2-git1, David Brownell, (Tue Feb 19, 2:49 pm)
Re: USB OOPS 2.6.25-rc2-git1, Andre Tomt, (Tue Feb 19, 7:04 pm)
Re: USB OOPS 2.6.25-rc2-git1, David Brownell, (Tue Feb 19, 8:32 pm)
Re: USB OOPS 2.6.25-rc2-git1, Andre Tomt, (Wed Feb 20, 4:33 pm)
Re: USB OOPS 2.6.25-rc2-git1, David Brownell, (Wed Feb 20, 5:24 pm)
Re: USB OOPS 2.6.25-rc2-git1, Andre Tomt, (Wed Feb 20, 8:25 pm)
Re: USB OOPS 2.6.25-rc2-git1, David Brownell, (Wed Feb 20, 8:53 pm)
Re: USB OOPS 2.6.25-rc2-git1, Alan Stern, (Wed Feb 20, 5:16 pm)
Re: USB OOPS 2.6.25-rc2-git1, David Brownell, (Wed Feb 20, 5:56 pm)
Re: USB OOPS 2.6.25-rc2-git1, Alan Stern, (Thu Feb 21, 11:56 am)
Re: USB OOPS 2.6.25-rc2-git1, David Brownell, (Mon Feb 25, 5:13 am)
Re: USB OOPS 2.6.25-rc2-git1, Alan Stern, (Wed Feb 20, 6:33 pm)
Re: USB OOPS 2.6.25-rc2-git1, David Brownell, (Wed Feb 20, 6:54 pm)
Re: USB OOPS 2.6.25-rc2-git1, Alan Stern, (Thu Feb 21, 12:15 pm)
Re: USB OOPS 2.6.25-rc2-git1, David Brownell, (Wed Mar 5, 12:15 am)
Re: USB OOPS 2.6.25-rc2-git1, Alan Stern, (Wed Mar 5, 1:04 pm)
Re: USB OOPS 2.6.25-rc2-git1, David Brownell, (Wed Mar 5, 1:39 pm)