From: Pete Zaitcev <zaitcev@redhat.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
zaitcev@redhat.com, linux-kernel@vger.kernel.org
Subject: USB: fix ohci_complete_add
Date: Mon, 22 Nov 2004 23:16:50 -0800 [thread overview]
Message-ID: <20041122231650.5e259f8c@lembas.zaitcev.lan> (raw)
This is a fix for a ludicrously stupid bug in my code in usb-ohci, which
only affects 2.4, fortunately. The problem should be obvious from the code:
when adding an element to the queue, an URB is lost if the queue contains
two or more elements already. The fix is to implement the queue correctly:
add to the tail and do not corrupt the list.
Fortunately for us, this situation is rare and its impact is limited.
More than two URBs have to complete in the same interrupt for this to
happen, and this typically takes several devices operating simultaneously.
When it happens, there is no memory leak and no oops, just a "lost callback"
sort of situation. I got to know about this when a customer reported that
a when three USB-serial adapters are connected to a system, they start to
lose interrupts when traffic gets heavy.
--- linux-2.4.28-bk3-ohci/drivers/usb/host/usb-ohci.c 2004-04-14 17:33:16.000000000 -0700
+++ linux-2.4.28-rc1-usb/drivers/usb/host/usb-ohci.c 2004-11-16 15:15:44.000000000 -0800
@@ -143,7 +143,7 @@ static void ohci_complete_add(struct ohc
ohci->complete_head = urb;
ohci->complete_tail = urb;
} else {
- ohci->complete_head->hcpriv = urb;
+ ohci->complete_tail->hcpriv = urb;
ohci->complete_tail = urb;
}
}
next reply other threads:[~2004-11-23 7:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-23 7:16 Pete Zaitcev [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-11-17 0:59 Pete Zaitcev
[not found] ` <20041116212231.GA17693@logos.cnet>
2004-11-23 7:12 ` Pete Zaitcev
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=20041122231650.5e259f8c@lembas.zaitcev.lan \
--to=zaitcev@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
/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
all inboxes | Powered by JetHome®