From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Pavan Kondeti <quic_pkondeti@quicinc.com>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>,
Jack Pham <quic_jackp@quicinc.com>,
s.shtylyov@omp.ru, linux-usb@vger.kernel.org
Subject: Re: [RFT PATCH] xhci: make xhci_handshake timeout for xhci_reset() adjustable
Date: Wed, 2 Mar 2022 08:49:08 +0100 [thread overview]
Message-ID: <Yh8hdPneD8GXsQuW@kroah.com> (raw)
In-Reply-To: <20220302032306.GB11371@hu-pkondeti-hyd.qualcomm.com>
On Wed, Mar 02, 2022 at 08:53:06AM +0530, Pavan Kondeti wrote:
> On Tue, Mar 01, 2022 at 10:47:36AM +0200, Mathias Nyman wrote:
> > On 1.3.2022 6.03, Pavan Kondeti wrote:
> > > On Mon, Feb 28, 2022 at 05:49:49PM -0800, Jack Pham wrote:
> > >> Hi Mathias,
> > >>
> > >> On Thu, Feb 17, 2022 at 03:56:43PM +0200, Mathias Nyman wrote:
> > >>> xhci_reset() timeout was increased from 250ms to 10 seconds in order to
> > >>> give Renesas 720201 xHC enough time to get ready in probe.
> > >>
> > >> This suggests that the only place we really need the long timeout is
> > >> in xhci_gen_setup().
> > >>
> > >>> @@ -1163,7 +1161,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
> > >>> xhci_dbg(xhci, "Stop HCD\n");
> > >>> xhci_halt(xhci);
> > >>> xhci_zero_64b_regs(xhci);
> > >>> - retval = xhci_reset(xhci);
> > >>> + retval = xhci_reset(xhci, XHCI_RESET_LONG_USEC);
> > >>
> > >> Since preemption is disabled here (spin_lock_irq() is called near the
> > >> start of this function), shouldn't we also limit this to 250ms here in
> > >> xhci_resume() as well?
> > >>> The rationale of decreasing the timeout to 250 in certain places is based
> > > on the criticality of the operation but not on the preemption/irq state.
> > > Since xHC reset is critical in startup and resume, the 10 seconds timeout
> > > is enforced so that we don't break Renesas 720201 xHC.
> > >
> > > Since all of our internl test reports indicate that the timeout is happening
> > > from stop hcd, this patch is helping.
> > >
> >
> > This was pretty much my reasoning as well.
> > I could add a comment about this to the commit message
> >
> > In addition we want a targeted fix for a real world issue that we can send to
> > stable without changing too much, risking regressions.
> >
> Makes complete sense.
>
> Greg,
>
> Do you plan to include this patch?
I need it to be forwarded to me by the maintainer with their
signed-off-by, like any other xhci core patch :)
What is the rush here? Your hardware is obviously broken somehow if you
are hitting this problem just now. Why not fix the root cause here,
this patch should only affect rare situations, right? Are you having
this problem a lot?
thanks,
greg k-h
next prev parent reply other threads:[~2022-03-02 7:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 13:56 [RFT PATCH] xhci: make xhci_handshake timeout for xhci_reset() adjustable Mathias Nyman
2022-02-18 9:41 ` Pavan Kondeti
2022-02-24 8:44 ` Udipto Goswami
2022-02-28 11:39 ` Mathias Nyman
2022-02-28 12:10 ` Pavan Kondeti
2022-03-01 1:49 ` Jack Pham
2022-03-01 4:03 ` Pavan Kondeti
2022-03-01 8:47 ` Mathias Nyman
2022-03-02 3:23 ` Pavan Kondeti
2022-03-02 7:49 ` Greg Kroah-Hartman [this message]
2022-03-02 7:57 ` Pavan Kondeti
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=Yh8hdPneD8GXsQuW@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=quic_jackp@quicinc.com \
--cc=quic_pkondeti@quicinc.com \
--cc=s.shtylyov@omp.ru \
/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).