usb: host: ehci: always enable interrupt for qtd completion at test mode
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/usb/host/ehci-q.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/host/ehci-q.c +3 -3
@@ -1192,6 +1192,8 @@ static int submit_single_step_set_feature(qtd_fill (ehci, qtd, urb->setup_dma,sizeof (struct usb_ctrlrequest ), token | (2 /* "setup" */ <<8 ),8 ); +/* Always enable interrupt on qtd completion */ + qtd->hw_token |=cpu_to_hc32 (ehci,QTD_IOC );submit_async (ehci, urb, &qtd_list,GFP_ATOMIC );return 0 ;/*Return now; we shall come back after 15 seconds*/
@@ -1231,9 +1233,7 @@ static int submit_single_step_set_feature(/* dont fill any data in such packets */ qtd_fill (ehci, qtd,0 ,0 , token,0 ); -/* by default, enable interrupt on urb completion */ -if (likely (!(urb->transfer_flags &URB_NO_INTERRUPT ))) - qtd->hw_token |=cpu_to_hc32 (ehci,QTD_IOC ); + qtd->hw_token |=cpu_to_hc32 (ehci,QTD_IOC );submit_async (ehci, urb, &qtd_list,GFP_KERNEL );