]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
isp1760-hcd: move dequeued qtds to the front in qh
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Wed, 18 Apr 2012 07:58:23 +0000 (09:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Apr 2012 20:51:19 +0000 (13:51 -0700)
Make sure that dequeued urbs get handled first
by collect_qtds. To achieve that we better move them
up to the head in the qh list.

This for instance fixes hanging serial devices, which wait
for dequeued urbs to properly close their device node.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/isp1760-hcd.c

index 02198ee56a1f372e000b3efc854a3617427728e2..4a378d38b954ebc3b220a91330733e18fe6ad087 100644 (file)
@@ -1683,6 +1683,7 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
        list_for_each_entry(qtd, &qh->qtd_list, qtd_list)
                if (qtd->urb == urb) {
                        dequeue_urb_from_qtd(hcd, qh, qtd);
+                       list_move(&qtd->qtd_list, &qh->qtd_list);
                        break;
                }