From: Peter Chen <hzpeterchen@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
linux-imx@nxp.com, Peter Chen <peter.chen@nxp.com>
Subject: [1/1] usb: host: ehci: always enable interrupt for qtd completion at test mode
Date: Fri, 2 Feb 2018 11:28:08 +0800 [thread overview]
Message-ID: <20180202032808.GA27272@b29397-desktop> (raw)
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 <peter.chen@nxp.com>
> > ---
> > 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);
next reply other threads:[~2018-02-02 3:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 3:28 Peter Chen [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-02-02 15:20 [1/1] usb: host: ehci: always enable interrupt for qtd completion at test mode Alan Stern
2018-02-01 19:24 Alan Stern
2018-02-01 2:27 Peter Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180202032808.GA27272@b29397-desktop \
--to=hzpeterchen@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-imx@nxp.com \
--cc=linux-usb@vger.kernel.org \
--cc=peter.chen@nxp.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).