Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143599
b: refs/heads/master
c: 74bb350
h: refs/heads/master
i:
  143597: b68cd57
  143595: ab87c54
  143591: a837d7b
  143583: e2aba05
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Apr 17, 2009
1 parent 0e8f306 commit 829d6db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e13c594f3a1fc2c78e7a20d1a07974f71e4b448f
refs/heads/master: 74bb35083d889c696a0f54be76ffe85a66dcbdc1
17 changes: 8 additions & 9 deletions trunk/drivers/usb/musb/musb_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ static int musb_urb_enqueue(
unsigned long flags;
struct musb *musb = hcd_to_musb(hcd);
struct usb_host_endpoint *hep = urb->ep;
struct musb_qh *qh = hep->hcpriv;
struct musb_qh *qh;
struct usb_endpoint_descriptor *epd = &hep->desc;
int ret;
unsigned type_reg;
Expand All @@ -1853,22 +1853,21 @@ static int musb_urb_enqueue(

spin_lock_irqsave(&musb->lock, flags);
ret = usb_hcd_link_urb_to_ep(hcd, urb);
qh = ret ? NULL : hep->hcpriv;
if (qh)
urb->hcpriv = qh;
spin_unlock_irqrestore(&musb->lock, flags);
if (ret)
return ret;

/* DMA mapping was already done, if needed, and this urb is on
* hep->urb_list ... so there's little to do unless hep wasn't
* yet scheduled onto a live qh.
* hep->urb_list now ... so we're done, unless hep wasn't yet
* scheduled onto a live qh.
*
* REVISIT best to keep hep->hcpriv valid until the endpoint gets
* disabled, testing for empty qh->ring and avoiding qh setup costs
* except for the first urb queued after a config change.
*/
if (qh) {
urb->hcpriv = qh;
return 0;
}
if (qh || ret)
return ret;

/* Allocate and initialize qh, minimizing the work done each time
* hw_ep gets reprogrammed, or with irqs blocked. Then schedule it.
Expand Down

0 comments on commit 829d6db

Please sign in to comment.