NetBSD Problem Report #26545
Received: (qmail 17278 invoked by uid 605); 4 Aug 2004 15:37:38 -0000
Message-Id: <20040804131335.3250411152@narn.netbsd.org>
Date: Wed, 4 Aug 2004 13:13:35 +0000 (UTC)
From: dellis@conexant.com
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: dellis@conexant.com
To: gnats-bugs@gnats.NetBSD.org
Subject: ohci can miss interrupts
X-Send-Pr-Version: www-1.0
>Number: 26545
>Category: kern
>Synopsis: ohci can miss interrupts
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: skrll
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 04 15:38:00 +0000 2004
>Closed-Date: Thu Jan 05 11:19:30 +0000 2017
>Last-Modified: Thu Jan 05 11:19:30 +0000 2017
>Originator: Dan Ellis
>Release:
>Organization:
Conexant Systems Inc.
>Environment:
>Description:
The ohci driver can occasionally miss transfer completions.
>How-To-Repeat:
Heavy PCI load.
>Fix:
It's possible that the ohci interrupt can reach the CPU before the write over PCI. This results in the done head pointer being NULL. If the subsequent read of the interrupt status indicates that an OHCI_WDH has occured then the done pointer should be reread and the pointer nulled:
@@ -1122,8 +1128,15 @@
if (done & OHCI_DONE_INTRS)
intrs |= OREAD4(sc, OHCI_INTERRUPT_STATUS);
sc->sc_hcca->hcca_done_head = 0;
- } else
- intrs = OREAD4(sc, OHCI_INTERRUPT_STATUS) & ~OHCI_WDH;
+ } else {
+ intrs = OREAD4(sc, OHCI_INTERRUPT_STATUS);
+ /* if we've flushed out a WDH, then reread */
+ if (intrs & OHCI_WDH)
+ {
+ done = le32toh(sc->sc_hcca->hcca_done_head);
+ sc->sc_hcca->hcca_done_head = 0;
+ }
+ }
if (!intrs)
return (0);
>Release-Note:
>Audit-Trail:
From: IWAMOTO Toshihiro <toshii@netbsd.org>
To: dellis@conexant.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: misc/26545: ohci can miss interrupts
Date: Sun, 08 Aug 2004 19:12:54 +0900
At Wed, 4 Aug 2004 13:13:35 +0000 (UTC),
dellis@conexant.com wrote:
> >Number: 26545
> >Description:
> The ohci driver can occasionally miss transfer completions.
Did you observe a real problem?
> >Fix:
> It's possible that the ohci interrupt can reach the CPU before the
> write over PCI. This results in the done head pointer being
> NULL.
Such cases are handled by next interrupt, which should happen soon as
the status bit isn't cleared.
Am I missing something?
> If the subsequent read of the interrupt status indicates that
> an OHCI_WDH has occured then the done pointer should be reread and
> the pointer nulled:
If you do that, you have to repeat reading the pointer until it isn't
NULL.
--
IWAMOTO Toshihiro
From: Dan Ellis <dellis@conexant.com>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: Re: misc/26545: ohci can miss interrupts
Date: Wed, 11 Aug 2004 14:37:10 +0100
IWAMOTO Toshihiro wrote:
>Did you observe a real problem?
>
Yes, there I have definitely seen problems in this area. I've ported the
code to 2 quite different architectures, and there are sometimes delays
in the writes to memory due to the PCI bus latency.
It can result in an indefinite freeze with the right mixture of traffic
going on. E.g. if it's a control transfer which fails to get seen then
it could time out and the operation cancelled resulting in an
inoperative device.
>Such cases are handled by next interrupt, which should happen soon as
>the status bit isn't cleared.
>Am I missing something?
>
Ah! I see the change you made 9 months ago. I think that fixes the
problem. I hadn't picked up changes to that line since I'd altered the
area of code.
>If you do that, you have to repeat reading the pointer until it isn't
>NULL.
The read of the interrupt status should have ensured that the done head
pointer will have been written back. Although you're right, there's no
assurance of that on all architectures, and maybe it should reread until
non-null. But surely that's more efficient that running through
interrupt despatch twice?
You should really return 1 from the routine in the case that the
OHCI_WDH bit was set though, even if you handle it on the next interrupt.
Dan Ellis.
******************Legal Disclaimer**************************
"This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you."
************************************************************
Responsible-Changed-From-To: misc-bug-people->kern-bug-people
Responsible-Changed-By: jmc@netbsd.org
Responsible-Changed-When: Thu, 20 Jan 2005 07:49:03 +0000
Responsible-Changed-Why:
kernel issue
State-Changed-From-To: open->feedback
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Fri, 22 Mar 2013 13:07:51 +0000
State-Changed-Why:
Is this still a problem as hcca_done_head handling is significantly different now
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 02 Jun 2013 00:38:46 +0000
State-Changed-Why:
feedback mail is bouncing.
Responsible-Changed-From-To: kern-bug-people->skrll
Responsible-Changed-By: skrll@NetBSD.org
Responsible-Changed-When: Sun, 25 Aug 2013 07:13:00 +0000
Responsible-Changed-Why:
Take (should really close?)
State-Changed-From-To: open->closed
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Thu, 05 Jan 2017 11:19:30 +0000
State-Changed-Why:
No chance of feedback
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.