usb/isp1760: Fix bug preventing the unlinking of control urbs
authorArvid Brodin <arvid.brodin@enea.com>
Fri, 17 Jun 2011 16:45:37 +0000 (18:45 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Jun 2011 20:46:43 +0000 (13:46 -0700)
Both control and bulk transfers use isp1760 slots of type ATL, but the
driver unlink code for ATL slots only acts on urbs describing a bulk
transfer, letting the code for INT slots take care of the unlink instead,
which often ended up removing the interrupt transfer for root hub events
instead. That's not good, and gets fixed by this patch.

Signed-off-by: Arvid Brodin <arvid.brodin@enea.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/isp1760-hcd.c

index c9e6e454c625248e61d093666f562c01ea33db53..55d3d5859ac5667da2332a3a782588e4541bbdc9 100644 (file)
@@ -1555,7 +1555,7 @@ static void kill_transfer(struct usb_hcd *hcd, struct urb *urb,
 
        /* We need to forcefully reclaim the slot since some transfers never
           return, e.g. interrupt transfers and NAKed bulk transfers. */
-       if (usb_pipebulk(urb->pipe)) {
+       if (usb_pipecontrol(urb->pipe) || usb_pipebulk(urb->pipe)) {
                skip_map = reg_read32(hcd->regs, HC_ATL_PTD_SKIPMAP_REG);
                skip_map |= (1 << qh->slot);
                reg_write32(hcd->regs, HC_ATL_PTD_SKIPMAP_REG, skip_map);