Skip to content

Commit

Permalink
usb: renesas_usbhs: pop packet when urb dequeued
Browse files Browse the repository at this point in the history
usbhsh_ureq_free() is not enough when urb dequeued.

Without this patch, the driver can not recognize re-connected
USB device after USB hub disconnected

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Kuninori Morimoto authored and Felipe Balbi committed Dec 12, 2011
1 parent 37332ee commit 5479654
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/usb/renesas_usbhs/mod_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,8 +800,13 @@ static int usbhsh_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
struct usbhsh_hpriv *hpriv = usbhsh_hcd_to_hpriv(hcd);
struct usbhsh_request *ureq = usbhsh_urb_to_ureq(urb);

if (ureq)
usbhsh_ureq_free(hpriv, ureq);
if (ureq) {
struct usbhs_priv *priv = usbhsh_hpriv_to_priv(hpriv);
struct usbhs_pkt *pkt = &ureq->pkt;

usbhs_pkt_pop(pkt->pipe, pkt);
usbhsh_queue_done(priv, pkt);
}

return 0;
}
Expand Down

0 comments on commit 5479654

Please sign in to comment.