Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp137293pxj; Mon, 17 May 2021 23:13:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUbgR77YK1MBqDioHfOoc8HbPq98hZeSpBPSSF36iEBco/xAoPbk3s6tmSeCToKfte3hYd X-Received: by 2002:a17:907:c1f:: with SMTP id ga31mr4402560ejc.348.1621318420159; Mon, 17 May 2021 23:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621318420; cv=none; d=google.com; s=arc-20160816; b=SATKt354KqaeJ2cxgE7rk9xre4QFB5mYQQsMOmzOCVKHX0RnqkFAYCb5Hz5PzfXzY4 YUz6p/3jk1Jvy9tqRkhkhWSPsqp3u1J3vGSaRrdRFoFrKNdeSckyt2WuU4/7T6UGattS xH6JXTRs4toYRnMHbntndt0V1q9KREtpzdYEpWp2aOKd3O6n0QefcufacPWsXlJWmFgT ulpD/JhSCnAZIXlOaBaxRy00QmAcnxZ4ipz+R6fU8CXG2dWu4ZXe/LZFRuf6iHX1us5w +aCxDa74ZX9v+QfLlz9s0P+2jEearCr9zMu9hTUDX3AS4pE6BFNLFMwN7y+PpUKlT5DX 44cw== 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=koF+1GPlKaurBKFVZUDm5KX59Hl1+G374CuVVuDmauXyYtbhgxM0ay0eioj1mePwka OgtG7SwGNWrJcob8oCIrFaNLiBLSuj8vWfBQ3bZDyPNK/2HX/y9ED8UCxczcEzdWJq48 1XvMySgG44KfLDlA+hlB7X2f+8aWKq5Be++rkx5QUdZ56l8CJCdI8pcGdNlX3kB8mS5v 2SozTVusu7B/Up3/bMwqbAUQJIJMimzpLK57fiTt5905UdtJlnljJw95ynQpVEJJIsu+ LyVILLmU5ZpQkgov0pqB/+GC0ft/zRNksr3JU+8e5gXv0su41Q+o1lILp1sBkGkDVWSO In8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lpWpsQYF; 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 j5si16710699edj.274.2021.05.17.23.13.14; Mon, 17 May 2021 23:13:40 -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=lpWpsQYF; 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 S241603AbhEQOs1 (ORCPT + 99 others); Mon, 17 May 2021 10:48:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:34294 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241106AbhEQOjh (ORCPT ); Mon, 17 May 2021 10:39:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 788186193F; Mon, 17 May 2021 14:18:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621261119; bh=M8RgQpG2b4ai5zpHDappdZ5NZAFlHdCK45JXNfJIUtw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lpWpsQYFnqS3FqYqFFYoMND0dNqQZhnaf+rrbex/QOnCMx1wug3W8bCH7IdWIb4lB yPtG1TWTUtEWWl13E7wczfpa6++/0lZ2LUKfwvbopEh1EAXEzgyItWATS84njrVJcX iK/y8A0462T1pCA3bhdOExZNEACruu3acSzGRWCk= 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.12 310/363] usb: xhci: Increase timeout for HC halt Date: Mon, 17 May 2021 16:02:56 +0200 Message-Id: <20210517140313.077768224@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@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)