From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: John Youn <John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>,
"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH 3/6] Documentation: devicetree: dwc3: Add interrupt moderation
Date: Fri, 28 Oct 2016 11:38:44 +0100 [thread overview]
Message-ID: <20161028103843.GE5806@leverpostej> (raw)
In-Reply-To: <87mvhosr4g.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
On Fri, Oct 28, 2016 at 01:30:07PM +0300, Felipe Balbi wrote:
> Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org> writes:
> > On Thu, Oct 27, 2016 at 02:08:25PM -0700, John Youn wrote:
> >> On 10/26/2016 3:57 AM, Mark Rutland wrote:
> >> > On Tue, Oct 25, 2016 at 12:42:46PM -0700, John Youn wrote:
> >> >> Add interrupt moderation interval binding for dwc3.
> >
> >> >> + - snps,imod_interval: the interrupt moderation interval.
> >> This series implements the feature and enables it as a workaround for
> >> a particular version of the controller.
> >
> > ... as a workaround for *what*? Is there a bug in that IP version, or an
>
> you didn't receive the entire series, I guess. Here's last patch in the
> series:
No, I did not. Thanks for forwarding this.
> This is a workaround for STAR 9000961433 which affects only version
> 3.00a of the DWC_usb3 core. This prevents the controller interrupt from
> being masked while handling events. Enabling interrupt moderation allows
> us to work around this issue because once the GEVNTCOUNT.count is
> written the IRQ is immediately deasserted and won't be asserted again
> until GEVNTCOUNT.EHB is cleared.
>
> Signed-off-by: John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
> ---
> drivers/usb/dwc3/core.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 6733838..7fa0832 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -1050,6 +1050,18 @@ static void dwc3_check_params(struct dwc3 *dwc)
> dwc->imod_interval = 0;
> }
>
> + /*
> + * Workaround for STAR 9000961433 which affects only version
> + * 3.00a of the DWC_usb3 core. This prevents the controller
> + * interrupt from being masked while handling events. IMOD
> + * allows us to work around this issue. Enable it for the
> + * affected version.
> + */
> + if (!dwc->imod_interval &&
> + (dwc->revision == DWC3_REVISION_300A)) {
> + dwc->imod_interval = 1;
> + }
> +
> /* Check the maximum_speed parameter */
> switch (dwc->maximum_speed) {
> case USB_SPEED_LOW:
>
> > integration issue? Does the problem vary per-board?
> >
> > Generally, if there's a problem that needs to be worked around, we
> > describe the problem in the DT (perhaps implicitly in the compatible
> > string), and then the kernel chooses the workaround.
>
> Regardless of the silicon erratum, interrupt moderation is a *feature*
> of the IP, common to all instances since revision v3.00a (IIRC). John is
> just using interrupt moderation in the context of implementing this
> workaround. But the actual feature is valid also without the erratum.
Sure, I understand this.
> Another thing to remember is that different applications (i.e. boards)
> might want to moderate the interrupt for different periods. That's,
> again, not related to the erratum at all.
... again, the question is *why*?
If this varies per use-case, then it would be better to handle this
dynamically -- people can run wildly different use-cases on the same
hardware.
I'm not sure that it makes sense for this to be in the DT, though I may
have misunderstood.
Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-10-28 10:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-25 19:42 [PATCH 0/6] usb: dwc3: Interrupt moderation John Youn
[not found] ` <cover.1477424426.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-10-25 19:42 ` [PATCH 3/6] Documentation: devicetree: dwc3: Add interrupt moderation John Youn
[not found] ` <e7a864e5a2af12d5a8d97f2591065f4aa85f86cb.1477424426.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-10-26 10:21 ` Sergei Shtylyov
[not found] ` <37f3eec3-b026-97ad-8b33-353a3b93f840-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-10-27 21:06 ` John Youn
2016-10-26 10:56 ` Mark Rutland
2016-10-27 21:08 ` John Youn
[not found] ` <36413315-16eb-d690-b559-ab5ae103c5f9-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-10-28 10:23 ` Mark Rutland
2016-10-28 10:30 ` Felipe Balbi
[not found] ` <87mvhosr4g.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-10-28 10:38 ` Mark Rutland [this message]
2016-10-31 20:07 ` John Youn
[not found] ` <75a1dc4a-1d7e-a8e3-dd71-c0bed1927dca-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-11-01 11:16 ` Felipe Balbi
2016-10-27 10:47 ` Felipe Balbi
[not found] ` <87eg32t6fn.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-10-27 21:11 ` John Youn
[not found] ` <911fcadd-b852-d9db-c733-2df7c106c8d1-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-10-28 10:09 ` Felipe Balbi
[not found] ` <87shrgss3f.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-10-31 20:28 ` John Youn
[not found] ` <d2e54dd2-a400-39d4-3fc9-c41ba45bdb18-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-11-01 11:18 ` Felipe Balbi
[not found] ` <87lgx3phxi.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-11-07 12:00 ` Mark Rutland
2016-10-25 19:42 ` John Youn
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=20161028103843.GE5806@leverpostej \
--to=mark.rutland-5wv7dgnigg8@public.gmane.org \
--cc=John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
--cc=balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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;
as well as URLs for NNTP newsgroup(s).