All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jack Pham <quic_jackp@quicinc.com>
To: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: <quic_pkondeti@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: Mon, 28 Feb 2022 17:49:49 -0800	[thread overview]
Message-ID: <20220301014949.GG13801@jackp-linux.qualcomm.com> (raw)
In-Reply-To: <20220217135643.1321889-1-mathias.nyman@linux.intel.com>

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?

>  		spin_unlock_irq(&xhci->lock);
>  		if (retval)
>  			return retval;
> @@ -5297,7 +5295,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
>  
>  	xhci_dbg(xhci, "Resetting HCD\n");
>  	/* Reset the internal HC memory state and registers. */
> -	retval = xhci_reset(xhci);
> +	retval = xhci_reset(xhci, XHCI_RESET_LONG_USEC);
>  	if (retval)
>  		return retval;
>  	xhci_dbg(xhci, "Reset complete\n");

Thanks,
Jack

  parent reply	other threads:[~2022-03-01  1:50 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 [this message]
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
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=20220301014949.GG13801@jackp-linux.qualcomm.com \
    --to=quic_jackp@quicinc.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.