# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.390 -> 1.391
# drivers/usb/uhci.c 1.26 -> 1.27
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/04/08 [EMAIL PROTECTED] 1.391
# [PATCH] uhci.c 2.4.19-pre6 incorrect locking
#
# This fixes a problem that I've not run into and is difficult to trigger,
# but definately a bug. We locked urb->lock, when we meant u->lock. It also
# cleans up the code a little to make it easier to understand and removes
# an obsolete comment.
# --------------------------------------------
#
diff -Nru a/drivers/usb/uhci.c b/drivers/usb/uhci.c
--- a/drivers/usb/uhci.c Mon Apr 8 09:45:39 2002
+++ b/drivers/usb/uhci.c Mon Apr 8 09:45:39 2002
@@ -1833,10 +1833,6 @@
uhci_dec_fsbr(uhci, urb);
- /* There is a race with updating IOC in here, but it's not worth */
- /* trying to fix since this is merely an optimization. The only */
- /* time we'd lose is if the status of the packet got updated */
- /* and we'd be turning on FSBR next frame anyway, so it's a wash */
urbp->fsbr_timeout = 1;
head = &urbp->td_list;
@@ -2000,23 +1996,23 @@
tmp = head->next;
while (tmp != head) {
struct urb *u = list_entry(tmp, struct urb, urb_list);
- struct urb_priv *urbp = (struct urb_priv *)u->hcpriv;
+ struct urb_priv *up = (struct urb_priv *)u->hcpriv;
tmp = tmp->next;
- spin_lock(&urb->lock);
+ spin_lock(&u->lock);
/* Check if the FSBR timed out */
- if (urbp->fsbr && !urbp->fsbr_timeout && time_after_eq(jiffies,
urbp->fsbrtime + IDLE_TIMEOUT))
+ if (up->fsbr && !up->fsbr_timeout && time_after_eq(jiffies,
+up->fsbrtime + IDLE_TIMEOUT))
uhci_fsbr_timeout(uhci, u);
/* Check if the URB timed out */
- if (u->timeout && time_after_eq(jiffies, urbp->inserttime +
u->timeout)) {
+ if (u->timeout && time_after_eq(jiffies, up->inserttime + u->timeout))
+{
list_del(&u->urb_list);
list_add_tail(&u->urb_list, &list);
}
- spin_unlock(&urb->lock);
+ spin_unlock(&u->lock);
}
spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel