From e8672e3f0ec571d0ca7ccd8cbbeb113802c1d443 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 11 Jan 2015 20:34:50 +0100 Subject: [PATCH] musb-new: Fix interrupt transfers not working For bulk and ctrl transfers common/usb.c sets udev->status = USB_ST_NOT_PROC, but it does not do so for interrupt transfers. musb_uboot.c: submit_urb() however was waiting for USB_ST_NOT_PROC to become 0, and thus without anyone setting USB_ST_NOT_PROC would exit immediately for interrupt urbs, returning the urb status of EINPROGRESS as error. This commit fixes this, thereby also making usb_kbd.c work together with musb_new and CONFIG_SYS_USB_EVENT_POLL. Signed-off-by: Hans de Goede --- drivers/usb/musb-new/musb_uboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c index f8a0346f36..28500bf157 100644 --- a/drivers/usb/musb-new/musb_uboot.c +++ b/drivers/usb/musb-new/musb_uboot.c @@ -74,7 +74,7 @@ static int submit_urb(struct usb_hcd *hcd, struct urb *urb) if (ctrlc()) return -EIO; host->isr(0, host); - } while ((urb->dev->status & USB_ST_NOT_PROC) && + } while (urb->status == -EINPROGRESS && get_timer(0) < timeout); return urb->status; -- 2.39.5