diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index b59ce9ad14ce..8a01ed5cae44 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -2050,6 +2050,27 @@ static int musb_schedule( best_diff = 4096; best_end = -1; + /* use bulk reserved ep1 */ + if (qh->type == USB_ENDPOINT_XFER_BULK) { + hw_ep = musb->bulk_ep; + if (is_in) + head = &musb->in_bulk; + else + head = &musb->out_bulk; + + /* Enable bulk RX/TX NAK timeout scheme when bulk requests are + * multiplexed. This scheme does not work in high speed to full + * speed scenario as NAK interrupts are not coming from a + * full speed device connected to a high speed device. + * NAK timeout interval is 8 (128 uframe or 16ms) for HS and + * 4 (8 frame or 8ms) for FS device. + */ + if (qh->dev) + qh->intv_reg = + (USB_SPEED_HIGH == qh->dev->speed) ? 8 : 4; + goto success; + } + for (epnum = 1, hw_ep = musb->endpoints + 1; epnum < musb->nr_endpoints; epnum++, hw_ep++) { @@ -2093,26 +2114,8 @@ static int musb_schedule( best_end = epnum; } } - /* use bulk reserved ep1 if no other ep is free */ - if (best_end < 0 && qh->type == USB_ENDPOINT_XFER_BULK) { - hw_ep = musb->bulk_ep; - if (is_in) - head = &musb->in_bulk; - else - head = &musb->out_bulk; - /* Enable bulk RX/TX NAK timeout scheme when bulk requests are - * multiplexed. This scheme does not work in high speed to full - * speed scenario as NAK interrupts are not coming from a - * full speed device connected to a high speed device. - * NAK timeout interval is 8 (128 uframe or 16ms) for HS and - * 4 (8 frame or 8ms) for FS device. - */ - if (qh->dev) - qh->intv_reg = - (USB_SPEED_HIGH == qh->dev->speed) ? 8 : 4; - goto success; - } else if (best_end < 0) { + if (best_end < 0) { dev_err(musb->controller, "%s hwep alloc failed for %dx%d\n", musb_ep_xfertype_string(qh->type),