1 Index: linux-2.6.24/drivers/usb/host/adm5120-hcd.c
2 ===================================================================
3 --- linux-2.6.24.orig/drivers/usb/host/adm5120-hcd.c
4 +++ linux-2.6.24/drivers/usb/host/adm5120-hcd.c
5 @@ -83,8 +83,8 @@ static void admhc_stop(struct usb_hcd *h
7 * queue up an urb for anything except the root hub
9 -static int admhc_urb_enqueue(struct usb_hcd *hcd, struct usb_host_endpoint *ep,
10 - struct urb *urb, gfp_t mem_flags)
11 +static int admhc_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
14 struct admhcd *ahcd = hcd_to_admhcd(hcd);
16 @@ -101,7 +101,7 @@ static int admhc_urb_enqueue(struct usb_
19 /* every endpoint has an ed, locate and maybe (re)initialize it */
20 - ed = ed_get(ahcd, ep, urb->dev, pipe, urb->interval);
21 + ed = ed_get(ahcd, urb->ep, urb->dev, pipe, urb->interval);
25 @@ -161,22 +161,17 @@ static int admhc_urb_enqueue(struct usb_
29 - /* in case of unlink-during-submit */
30 - spin_lock(&urb->lock);
31 - if (urb->status != -EINPROGRESS) {
32 - spin_unlock(&urb->lock);
33 - urb->hcpriv = urb_priv;
34 - finish_urb(ahcd, urb);
36 + ret = usb_hcd_link_urb_to_ep(hcd, urb);
41 /* schedule the ed if needed */
42 if (ed->state == ED_IDLE) {
43 ret = ed_schedule(ahcd, ed);
48 + usb_hcd_unlink_urb_from_ep(hcd, urb);
51 if (ed->type == PIPE_ISOCHRONOUS) {
52 u16 frame = admhc_frame_no(ahcd);
54 @@ -204,8 +199,6 @@ static int admhc_urb_enqueue(struct usb_
55 admhc_dump_ed(ahcd, "admhc_urb_enqueue", urb_priv->ed, 1);
59 - spin_unlock(&urb->lock);
62 urb_priv_free(ahcd, urb_priv);
63 @@ -220,18 +213,23 @@ fail:
64 * asynchronously, and we might be dealing with an urb that's
65 * partially transferred, or an ED with other urbs being unlinked.
67 -static int admhc_urb_dequeue(struct usb_hcd *hcd, struct urb *urb)
68 +static int admhc_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
71 struct admhcd *ahcd = hcd_to_admhcd(hcd);
75 spin_lock_irqsave(&ahcd->lock, flags);
77 #ifdef ADMHC_VERBOSE_DEBUG
78 urb_print(ahcd, urb, "DEQUEUE", 1);
81 - if (HC_IS_RUNNING(hcd->state)) {
82 + ret = usb_hcd_check_unlink_urb(hcd, urb, status);
86 + } else if (HC_IS_RUNNING(hcd->state)) {
87 struct urb_priv *urb_priv;
89 /* Unless an IRQ completed the unlink while it was being
90 @@ -253,7 +251,7 @@ static int admhc_urb_dequeue(struct usb_
92 spin_unlock_irqrestore(&ahcd->lock, flags);
98 /*-------------------------------------------------------------------------*/
99 Index: linux-2.6.24/drivers/usb/host/adm5120-q.c
100 ===================================================================
101 --- linux-2.6.24.orig/drivers/usb/host/adm5120-q.c
102 +++ linux-2.6.24/drivers/usb/host/adm5120-q.c
103 @@ -63,6 +63,7 @@ __acquires(ahcd->lock)
106 /* urb->complete() can reenter this HCD */
107 + usb_hcd_unlink_urb_from_ep(admhcd_to_hcd(ahcd), urb);
108 spin_unlock(&ahcd->lock);
109 usb_hcd_giveback_urb(admhcd_to_hcd(ahcd), urb);
110 spin_lock(&ahcd->lock);