LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: David Brownell <david-b@pacbell.net>
Cc: Andre Tomt <andre@tomt.net>,
	Kernel development list <linux-kernel@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>
Subject: Re: USB OOPS 2.6.25-rc2-git1
Date: Thu, 21 Feb 2008 10:56:55 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.0802211054550.4528-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <200802201356.28723.david-b@pacbell.net>

On Wed, 20 Feb 2008, David Brownell wrote:

> ========= 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);

There's one little problem here.  As a result of this change, the line 
where pcd_status gets set (not shown in this patch) needs to be changed 
to:

		pcd_status |= (status & STS_PCD);

Then the test shown above can be simplified to:

	if (pcd_status)

Alan Stern


  parent reply	other threads:[~2008-02-21 16:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-19 15:19 USB OOPS 2.6.25-rc2-git1 Andre Tomt
2008-02-19 18:49 ` David Brownell
2008-02-19 23:04   ` Andre Tomt
2008-02-20  0:32     ` David Brownell
2008-02-20 20:33       ` Andre Tomt
2008-02-20 21:16         ` Alan Stern
2008-02-20 21:56           ` David Brownell
2008-02-20 22:33             ` Alan Stern
2008-02-20 22:54               ` David Brownell
2008-02-21 16:15                 ` Alan Stern
2008-03-05  4:15                   ` David Brownell
2008-03-05 17:04                     ` Alan Stern
2008-03-05 17:39                       ` David Brownell
2008-02-21 15:56             ` Alan Stern [this message]
2008-02-25  9:13               ` David Brownell
2008-02-20 21:24         ` David Brownell
2008-02-21  0:25           ` Andre Tomt
2008-02-21  0:53             ` David Brownell
2008-02-19 19:31 ` Alan Stern
2008-02-19 21:58   ` Andre Tomt
2008-02-19 22:24 ` David Miller
2008-02-20  0:19   ` David Brownell
2008-02-20  1:40     ` David Miller
2008-02-20 16:10     ` Alan Stern
2008-02-19 22:28 ` Andre Tomt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44L0.0802211054550.4528-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=andre@tomt.net \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).