ChangeSet 1.894, 2002/12/18 00:18:53-08:00, david-b@pacbell.net [PATCH] ehci, more small fixes - some access to urb->hcpriv and urb->status needed to be locked using urb->lock - paranoia: don't depend on two values being in lock-step. diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c --- a/drivers/usb/host/ehci-q.c Wed Dec 18 00:34:00 2002 +++ b/drivers/usb/host/ehci-q.c Wed Dec 18 00:34:00 2002 @@ -180,9 +180,10 @@ hcd_to_bus (&ehci->hcd)->bandwidth_int_reqs--; } qh_put (ehci, qh); - urb->hcpriv = 0; } + spin_lock (&urb->lock); + urb->hcpriv = 0; switch (urb->status) { case -EINPROGRESS: /* success */ urb->status = 0; @@ -199,6 +200,7 @@ COUNT (ehci->stats.unlink); break; } + spin_unlock (&urb->lock); /* complete() can reenter this HCD */ spin_unlock (&ehci->lock); @@ -686,7 +688,7 @@ head = ehci->async; if (ehci->async_idle) del_timer (&ehci->watchdog); - else if (!head->qh_next.qh) { + if (!head->qh_next.qh) { u32 cmd = readl (&ehci->regs->command); if (!(cmd & CMD_ASE)) {