Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3373834pxu; Tue, 15 Dec 2020 05:41:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyl8DoQ68Cm52x2rFCC/eq5j5W7k9/RG05RrYEnXVMlYBPiN3hNM4bYlEY983t9/fZJMTFQ X-Received: by 2002:a17:906:351a:: with SMTP id r26mr26101894eja.204.1608039686418; Tue, 15 Dec 2020 05:41:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608039686; cv=none; d=google.com; s=arc-20160816; b=W2mbJI8EU2lLX6bWR/W5f0JtIv1pggfvSe+JRyj7u7aR+nKYLOWD/BosInOWKdS0vV 4fLQzNE27Oa+N0bjfIRzgsFXE5emFUnbzPRXM2EcxGX8Sgr1JgNd7GjRjsNLcpRzCTG0 ABYD2EEEOpVOOqdQQddC5gw59DQP1c0pn1SMz51nsakyemLvGKPz4qvlfpXzTlk7rc7D wtDXVUAvR6iRoZ6M7qS5bPJH4q2vkS85bcYVSF4Lnh3+7GfJ28tXbRfYNSawvVPTMEiQ nIclr35JrB9g+Xh8HhBKu0+gueeAq7ZoQYaLTWp3/u2Rv0xooHeGakL4wX96u/LG8XFv 6j6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=opRFFuweA7zZUviGtE2Cq06JGyxsLYvlk5BnV45PbtY=; b=C1T+uw8QSDODtm4MRZhfepKvTusObVLpr1+lSl+taPQcSCwiSAg6cZD2BiFb69bN+j XZID+dekY2D9+vRco5rowAWeplAfP/dh1k4GS/QMI4wADh/lnL+fJReqNEygJU1z7BrK NShANsOYj0e7OywKpCwIifjEns3YaiboPsbN/zGre/M+O5htMN6rTKhH8Y3/WD+gsWyh Eq+ouVWQvj/FFves0a7v61Nsb9I3bGmOfM9KBObQQ92BhM6796M2uKCyJpaBToJm8qzR DYnk4pgBLWV/+PBUtQPKhViatZF/i9j5CaeZIHDPumrGU5Vz11CUDnfFLnuIniPv/uQt OXIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qrOiQLM0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si841118ejb.322.2020.12.15.05.41.02; Tue, 15 Dec 2020 05:41:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qrOiQLM0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728648AbgLONi7 (ORCPT + 99 others); Tue, 15 Dec 2020 08:38:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:54810 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728619AbgLONiv (ORCPT ); Tue, 15 Dec 2020 08:38:51 -0500 Date: Tue, 15 Dec 2020 14:39:14 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1608039491; bh=4F6182ElpK4fSQTfF1pePVhieZFGbZGfkxBZYVvD/lU=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=qrOiQLM0ABxXkfc242ywPIDzbP9SJhkZfQFyAa106qk8pPHw61yb04PSHOgBbSWPE MIu/UVZ3R/tjUAOyJrBubyWOR/sXmwWVzcfVVEXmnbZxHDEEeQWlrYwx+4lc7B834X mk0af2/2u36yZUkyOJk80EMgjDja7fCk0HER/wgo= From: Greg KH To: Chen Yu Cc: Mathias Nyman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, "Muchowski, MaciejX" , "Paczynski, Lukasz" Subject: Re: [PATCH] xhci: Introduce max wait timeout in xhci_handshake() Message-ID: References: <20201215132240.4094-1-yu.c.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201215132240.4094-1-yu.c.chen@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 15, 2020 at 09:22:40PM +0800, Chen Yu wrote: > The time to finish a xhci_handshake() is platform specific > and sometimes during suspend resume test the followng > errors were encountered: > [53455.418330] ACPI: Waking up from system sleep state S4 > [66838.490856] xhci_hcd 0000:00:14.0: xHCI dying, ignoring interrupt. > Shouldn't IRQs be disabled? > After changing the poll time granularity from 1 usec to 20 usec in > xhci_handshake() this issue was not reproduced. While tuning on the > poll time granularity might be painful on different platforms, it is > applicable to introduce a module parameter to allow the xhci driver to wait > for at max 16 ms. > > Reported-by: "Muchowski, MaciejX" I doubt the "X" is part of this person's name, please just spell it out without the "," please. > Signed-off-by: Chen Yu > --- > drivers/usb/host/xhci.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c > index d4a8d0efbbc4..b8be9f3cc987 100644 > --- a/drivers/usb/host/xhci.c > +++ b/drivers/usb/host/xhci.c > @@ -38,6 +38,10 @@ static unsigned long long quirks; > module_param(quirks, ullong, S_IRUGO); > MODULE_PARM_DESC(quirks, "Bit flags for quirks to be enabled as default"); > > +static int wait_handshake; > +module_param(wait_handshake, int, 0644); > +MODULE_PARM_DESC(wait_handshake, "Force wait for completion of handshake"); This is not the 1990's, we are not adding new module parameters that no one will know how to change. Make this dynamic, and per-device, and work properly instead. This can not handle multiple controllers in the system at all :( thanks, greg k-h