public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	quic_ugoswami@quicinc.com, Jung Daehwan <dh10.jung@samsung.com>
Subject: Re: [PATCH v2] xhci: reduce xhci_handshake timeout in xhci_reset
Date: Mon, 14 Feb 2022 13:29:12 +0100	[thread overview]
Message-ID: <YgpLGGYI0W9mL2gg@kroah.com> (raw)
In-Reply-To: <1644841216-1468-1-git-send-email-quic_pkondeti@quicinc.com>

On Mon, Feb 14, 2022 at 05:50:16PM +0530, Pavankumar Kondeti wrote:
> From: Daehwan Jung <dh10.jung@samsung.com>
> 
> xhci_reset() is called with interrupts disabled. Waiting 10 seconds for
> controller reset and controller ready operations can be fatal to the
> system when controller is timed out. Reduce the timeout to 1 second
> and print a error message when the time out happens.
> 
> Fixes: 22ceac191211 ("xhci: Increase reset timeout for Renesas 720201 host.")
> Signed-off-by: Daehwan Jung <dh10.jung@samsung.com>
> Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
> ---
> 
> v2:
> - Add error print statements in the code that change log refers to
> 
>  drivers/usb/host/xhci.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index dc357ca..bb9ea3f 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -196,9 +196,11 @@ int xhci_reset(struct xhci_hcd *xhci)
>  		udelay(1000);
>  
>  	ret = xhci_handshake(&xhci->op_regs->command,
> -			CMD_RESET, 0, 10 * 1000 * 1000);
> -	if (ret)
> +			CMD_RESET, 0, 1 * 1000 * 1000);
> +	if (ret) {
> +		xhci_err(xhci, "Host controller reset timed out\n");

A timeout is not the only error that could have happened here.  So why
claim that all errors are timeout errors?

How did you test this?

thanks,

greg k-h

  reply	other threads:[~2022-02-14 12:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 11:04 [PATCH] xhci: reduce xhci_handshake timeout in xhci_reset Pavankumar Kondeti
2022-02-14 11:36 ` Greg Kroah-Hartman
2022-02-14 12:17   ` Pavan Kondeti
2022-02-14 12:20 ` [PATCH v2] " Pavankumar Kondeti
2022-02-14 12:29   ` Greg Kroah-Hartman [this message]
2022-02-14 13:19     ` Pavan Kondeti
2022-02-14 12:51   ` Mathias Nyman
2022-02-14 13:53     ` Pavan Kondeti
2022-02-15  8:51       ` Jung Daehwan
2022-02-15  9:43         ` Oliver Neukum
2022-02-15 10:16       ` Mathias Nyman
2022-02-15 10:49         ` Pavan Kondeti
2022-02-15 17:07           ` Pavan Kondeti
2022-02-16 15:58             ` Mathias Nyman
2022-02-16 16:44               ` Sergey Shtylyov
2022-02-17  3:03               ` Pavan Kondeti
2022-02-14 15:45 ` [PATCH] " Sergei Shtylyov
2022-02-15  3:38   ` 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=YgpLGGYI0W9mL2gg@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dh10.jung@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=quic_pkondeti@quicinc.com \
    --cc=quic_ugoswami@quicinc.com \
    /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