On Thu, Feb 01, 2018 at 02:24:29PM -0500, Alan Stern wrote:
> On Thu, 1 Feb 2018, Peter Chen wrote:
>
> > 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(-)
> >
> > diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
> > index 8815832..4cc2609 100644
> > --- a/drivers/usb/host/ehci-q.c
> > +++ b/drivers/usb/host/ehci-q.c
> > @@ -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);
>
> This would be cleaner if you didn't make it a separate statement.
> Before the call to qtd_fill(), you can do:
>
> token |= QTD_IOC; /* Interrupt after SETUP completion */
Since the variable "token" is used for every qtd, but I do not want
interrupt for DATA stage, how about adding QTD_IOC directly at
qtd_fill for both SETUP and STATUS stage?
qtd_fill(ehci, qtd, urb->setup_dma,
sizeof(struct usb_ctrlrequest),
QTD_IOC | token | (2 /* "setup" */ << 8), 8);
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html