Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp630669pxj; Tue, 18 May 2021 10:36:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3GVIb0VNYT/hB2CZJCuT4Pbe3Y5sToliv3o+eW+x5+7CqQOtLgv1jn4jlzG3bj7xqlFcH X-Received: by 2002:a92:ab01:: with SMTP id v1mr5715914ilh.190.1621359360002; Tue, 18 May 2021 10:36:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621359359; cv=none; d=google.com; s=arc-20160816; b=D98m6wKWjfvHVdI9sC6xgT2BjiV0hqIBLP3NoYj/Is/TJEFBG5dOFBr7c1sJ0uKpUM EZvbt+0BhYg0uMiTZEaDw+2bi2ltfhGtUq/ZN2jiQw41F3cXXJw6k842QNMoJlxZyxSk /ylcxruIobocwwpI1FbmkyHGk7yeBo7KPd8XERtMNiG94Ft5JT+whY5VLvyzzbnHsNrO L++ufQuTuJVvg5aLKp7y/LRFu9FRKyxMcy/t6qDrd2weDaYuvBmf4LaK7ltsSWi3LQtH WuqjzR2A/X0p/LPIsRiEJs7bgQj0hzOIRQdYXiwfGXWWOATGHgystgr95sIVFxpTIpFD 8mTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=D2oIH8i6fcrpo5rT5N0cPAQ5dNcZaNbFhXzGcodDI5U=; b=P/L79XGw7LRXWBDH153yrO2aKFuMxocpYMiNLhebP60ftYq5ncZlI0nIWOsXINl39L rYltVNKxuic6zLRZx6n+ZozH9/KkP7hT0BJIrhj+87wYaIQvDtpRlPyB742kJhsfPmmT B99bl55KkDLSV3qT6owFQFDqc/xq8Om7VcQv+mx9SZF2mGwrhzrnhJwB914uf4/Fa1qA Ra7jFuR+l2XeJRsUgw9X3DfmWajGU9oI6FsPGyA7pcALmD44jRye79E+n8gZhwT5UTvs 7ixua4T4/IC0/Uz1bFr/4F9KyLSeQNYVS3IPKiILf05ABKho60rP6snuk+xrqhimLueF ysnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="tq3OfvC/"; 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 r4si17201846iov.63.2021.05.18.10.34.54; Tue, 18 May 2021 10:35:59 -0700 (PDT) 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="tq3OfvC/"; 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 S1344148AbhEQQIz (ORCPT + 99 others); Mon, 17 May 2021 12:08:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:36780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344818AbhEQPpm (ORCPT ); Mon, 17 May 2021 11:45:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ABA4B613B9; Mon, 17 May 2021 14:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262638; bh=M8RgQpG2b4ai5zpHDappdZ5NZAFlHdCK45JXNfJIUtw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tq3OfvC/bkt6KoChSvez5TUSprKUZzBCgcjP8c9vhanjAdjSN+2FaiHTVrSFnIhj9 Ll37ka9RSaH7yWlxRIsn8B9ad9OO6bKe6vpscN+FxDgnUlpMurekdfbcPyS0SX96Wo kOIFQwqU9QIV5ewVNEnnhAZ2O0N68wQra723vV9A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maximilian Luz , Mathias Nyman Subject: [PATCH 5.10 242/289] usb: xhci: Increase timeout for HC halt Date: Mon, 17 May 2021 16:02:47 +0200 Message-Id: <20210517140313.306092975@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maximilian Luz commit ca09b1bea63ab83f4cca3a2ae8bc4f597ec28851 upstream. On some devices (specifically the SC8180x based Surface Pro X with QCOM04A6) HC halt / xhci_halt() times out during boot. Manually binding the xhci-hcd driver at some point later does not exhibit this behavior. To work around this, double XHCI_MAX_HALT_USEC, which also resolves this issue. Cc: Signed-off-by: Maximilian Luz Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210512080816.866037-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-ext-caps.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/usb/host/xhci-ext-caps.h +++ b/drivers/usb/host/xhci-ext-caps.h @@ -7,8 +7,9 @@ * Author: Sarah Sharp * Some code borrowed from the Linux EHCI driver. */ -/* Up to 16 ms to halt an HC */ -#define XHCI_MAX_HALT_USEC (16*1000) + +/* HC should halt within 16 ms, but use 32 ms as some hosts take longer */ +#define XHCI_MAX_HALT_USEC (32 * 1000) /* HC not running - set to 1 when run/stop bit is cleared. */ #define XHCI_STS_HALT (1<<0)