Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: host: ehci: always enable interrupt for qtd completion at test mode

At former code, the SETUP stage does not enable interrupt
for qtd completion, it relies on IAA watchdog to complete
interrupt, then the transcation would be considered timeout
if the flag need_io_watchdog is cleared by platform code.

In this commit, we always add enable interrupt for qtd completion,
then the qtd completion can be notified by hardware interrupt.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peter Chen and committed by
Greg Kroah-Hartman
91b11935 52ad2bd8

+4 -8
+4 -8
drivers/usb/host/ehci-q.c
··· 1188 1188 * 15 secs after the setup 1189 1189 */ 1190 1190 if (is_setup) { 1191 - /* SETUP pid */ 1191 + /* SETUP pid, and interrupt after SETUP completion */ 1192 1192 qtd_fill(ehci, qtd, urb->setup_dma, 1193 1193 sizeof(struct usb_ctrlrequest), 1194 - token | (2 /* "setup" */ << 8), 8); 1194 + QTD_IOC | token | (2 /* "setup" */ << 8), 8); 1195 1195 1196 1196 submit_async(ehci, urb, &qtd_list, GFP_ATOMIC); 1197 1197 return 0; /*Return now; we shall come back after 15 seconds*/ ··· 1228 1228 qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma); 1229 1229 list_add_tail(&qtd->qtd_list, head); 1230 1230 1231 - /* dont fill any data in such packets */ 1232 - qtd_fill(ehci, qtd, 0, 0, token, 0); 1233 - 1234 - /* by default, enable interrupt on urb completion */ 1235 - if (likely(!(urb->transfer_flags & URB_NO_INTERRUPT))) 1236 - qtd->hw_token |= cpu_to_hc32(ehci, QTD_IOC); 1231 + /* Interrupt after STATUS completion */ 1232 + qtd_fill(ehci, qtd, 0, 0, token | QTD_IOC, 0); 1237 1233 1238 1234 submit_async(ehci, urb, &qtd_list, GFP_KERNEL); 1239 1235