Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp637251pxj; Thu, 20 May 2021 18:37:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoZWtMgXNyra4k/IOb36M//QvKJGxSDj7vlKnyQfkDoxROOBmCRISdhogFChoF2Oxx88r7 X-Received: by 2002:a05:6e02:8e3:: with SMTP id n3mr4271017ilt.115.1621561036855; Thu, 20 May 2021 18:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621561036; cv=none; d=google.com; s=arc-20160816; b=UH60FFm5AwJVDHCmk/XD4HI3gDuw1MlDRqw7gBwXA6oBssw08GsyT3r2Sz9neKjXQA RgIuncd3F0s5jMJI1GbUz4uNUf0ri06gtkOPQY9NOKeO/Hi62k5aLKb93hqVm4Zwi69c tUNekd2u/Vs2SNOYgIw2uOEK7znB8Xg1j4HDXEFZlOe34LZewrzV6hd6mzJHqOr3D6/D LHJo0E5rFCnT/fJd9m2W8U1PZK0MYRK80pTejEfRJw/x1Xl7jS6KBoT2YyuEAwO/FOgR 3UJUP8JlzrAWG3LRCmfu4fHAkI2DUAc/1SHcUArVTI/JYlFIGQjOAhzfyFqL+QxeCom+ FjWQ== 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=ktNkOmW+RZyb3uGVGLRIqVwQfuEr+RtBy14p+R5UdQY=; b=TLzZbstH+sWSlOVsk67gIA/rJ6p4bNpM6VnEaKeMzOBZa+j013y6r+hl6WpJwgcEL2 X+pSxLsLCWLdxoCgaaqVUtWdAgT5RHKQIR4GLZG2SpEOOrcYO6iy2XNm2fU0SanwIh9b QHD8/2m8uKMKi5Jxn7SfI8bhw43LmJ1wOs9KQEaCFIBPwIkrd+7s0Nazor7I4nZdBom/ uNmjsVWfGke7mjPTdpd0AYXbtdLtAlYP36PENHBqxbp1xm1+1B+yi8nOMyxvnYNZz/Jw TSmQwhDudVQQEiMcAm6K7QQu8n4ijBrjcLsSfnrz257HQRYFzMkKOd6F0I7wZCxiToti uFgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=O+0BmuWS; 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 e1si4245724jap.46.2021.05.20.18.37.04; Thu, 20 May 2021 18:37:16 -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=O+0BmuWS; 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 S242220AbhETLnN (ORCPT + 99 others); Thu, 20 May 2021 07:43:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:43412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240300AbhETLW0 (ORCPT ); Thu, 20 May 2021 07:22:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E4CEE61CF8; Thu, 20 May 2021 10:11:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505507; bh=GgrLl6uBq4OvXt0I0ec1fvwloYaMRa2/9eAwroYI6aM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O+0BmuWSlEsayLcyy4gL1HwknvSVS9PQGsLpnPhIpxnt9xb4fH/q7RyzcuK1c2goS d2fpRPU44VldIAUG1UpbiJMtnCTaxRRQhmrdBmsEw4mIraB8/RYzRsN9HAssd/5x3g VrBzPkUcaDVGoAWHbDGGtgTmN8uxU6A14YH3qwoU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maximilian Luz , Mathias Nyman Subject: [PATCH 4.4 166/190] usb: xhci: Increase timeout for HC halt Date: Thu, 20 May 2021 11:23:50 +0200 Message-Id: <20210520092107.663247523@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092102.149300807@linuxfoundation.org> References: <20210520092102.149300807@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 @@ -19,8 +19,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* 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)