From: Frank Li <Frank.li@nxp.com>
To: Peter Chen <peter.chen@kernel.org>, gregkh@linuxfoundation.org
Cc: imx@lists.linux.dev, Pawel Laszczak <pawell@cadence.com>,
Roger Quadros <rogerq@kernel.org>,
Aswath Govindraju <a-govindraju@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"open list:CADENCE USB3 DRD IP DRIVER"
<linux-usb@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] usb: cdns3: skip set TRB_IOC when usb_request: no_interrupt is true
Date: Mon, 27 Nov 2023 10:28:57 -0500 [thread overview]
Message-ID: <ZWS1ucR7dXs153R1@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20231031084521.GA1948529@nchen-desktop>
On Tue, Oct 31, 2023 at 04:45:21PM +0800, Peter Chen wrote:
> On 23-10-27 14:39:19, Frank Li wrote:
> > No completion irq is needed if no_interrupt is true. Needn't set TRB_IOC
> > at this case.
> >
> > Check usb_request: no_interrupt and set/skip TRB_IOC in
> > cdns3_ep_run_transfer().
> >
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
>
> Acked-by: Peter Chen <peter.chen@kernel.org>
@Greg:
ping
Frank
>
> Peter
> > ---
> > drivers/usb/cdns3/cdns3-gadget.c | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c
> > index 69a44bd7e5d02..cd08897f8da8b 100644
> > --- a/drivers/usb/cdns3/cdns3-gadget.c
> > +++ b/drivers/usb/cdns3/cdns3-gadget.c
> > @@ -1124,6 +1124,7 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep,
> > u16 total_tdl = 0;
> > struct scatterlist *s = NULL;
> > bool sg_supported = !!(request->num_mapped_sgs);
> > + u32 ioc = request->no_interrupt ? 0 : TRB_IOC;
> >
> > if (priv_ep->type == USB_ENDPOINT_XFER_ISOC)
> > num_trb = priv_ep->interval;
> > @@ -1233,11 +1234,11 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep,
> > control |= pcs;
> >
> > if (priv_ep->type == USB_ENDPOINT_XFER_ISOC && !priv_ep->dir) {
> > - control |= TRB_IOC | TRB_ISP;
> > + control |= ioc | TRB_ISP;
> > } else {
> > /* for last element in TD or in SG list */
> > if (sg_iter == (num_trb - 1) && sg_iter != 0)
> > - control |= pcs | TRB_IOC | TRB_ISP;
> > + control |= pcs | ioc | TRB_ISP;
> > }
> >
> > if (sg_iter)
> > @@ -1268,7 +1269,7 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep,
> > priv_req->num_of_trb = num_trb;
> >
> > if (sg_iter == 1)
> > - trb->control |= cpu_to_le32(TRB_IOC | TRB_ISP);
> > + trb->control |= cpu_to_le32(ioc | TRB_ISP);
> >
> > if (priv_dev->dev_ver < DEV_VER_V2 &&
> > (priv_ep->flags & EP_TDLCHK_EN)) {
> > --
> > 2.34.1
> >
>
> --
>
> Thanks,
> Peter Chen
next prev parent reply other threads:[~2023-11-27 15:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 18:39 [PATCH 1/1] usb: cdns3: skip set TRB_IOC when usb_request: no_interrupt is true Frank Li
2023-10-31 8:45 ` Peter Chen
2023-11-27 15:28 ` Frank Li [this message]
2023-11-27 15:52 ` Greg KH
2023-11-27 16:07 ` Frank Li
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=ZWS1ucR7dXs153R1@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=a-govindraju@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=imx@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pawell@cadence.com \
--cc=peter.chen@kernel.org \
--cc=rogerq@kernel.org \
/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