From patchwork Mon Oct 24 11:30:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9088 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp445919wru; Mon, 24 Oct 2022 06:13:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7qWGS6qv6d5Y1JArijoImhrGMkE0e5D3ryxeZBQYr0zFqkoQ+SysOECfa6+L4XV+YTUyPx X-Received: by 2002:a17:90a:ad08:b0:212:d5f1:e0c6 with SMTP id r8-20020a17090aad0800b00212d5f1e0c6mr17609407pjq.228.1666617202446; Mon, 24 Oct 2022 06:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666617202; cv=none; d=google.com; s=arc-20160816; b=LfA9FtKm5Z1GIO/knXTS1PA7KzfwGaQpus9fcezJZpvvWu9GeAA0wY8+KgoKyBIuxT u5ka/z7wjG3E+rh2OfanRpoTVA8DiPWcCivAMU8UxL2BzjAbimha5PPimTNO0p/34f2z 04n6zo1BAB9cu5COo013ZSeXj0ThTL4Ev997+GNa8QccjuE6pQIgKhonLO5ictTYrHwq 5XTMLw5fY8SgyyY70NxtnTYyMHq92csFDoOnDvEpUwiSdvA5inL7lTh2aCLLw0hmgsMh 69Sls/NXRALsxa89s2xllTGFrLxygvjnoHYEN+q2AXLSJE1cMIQ9F7nExmTrvddZUgtV i/pQ== 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=/j5My3S8WCkPEDEaAu3Eo4fr07LyLJWFJAMAGer6+0s=; b=Dhw4TXFbweSskf0Ly2tcDXp6t/1h6wRmXn5+7Du5rWUR/XzTBHQK4AQXkFlfFUtk7D kGK+CozmhOp0iZLdI2DfoNziEAei2+srKSOdgNgLbWB+l7lM+gur4zpPoAjK1At7A6Q6 P5fQD69O0pNS9+CBGPS1Dlcj2UiFFoCxfvMJeDH06hIF/q/l9wUmf/jqVyiO4eMUo7KV T99dabj1QwCQVZa2njWnENtzBVBjoy4AwatbmstBWu1rSbSfBG/EXQ36jrPSUCfsxXjv o2nZi6q6kXcd19qWCamS9cC0X0OX3Oq8KhkheXPSRmz5blQpcsndMZyr/ojDpvDCBHZv M6oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rfWeT9cq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r7-20020a17090a940700b00205f9df1f32si15033609pjo.25.2022.10.24.06.13.07; Mon, 24 Oct 2022 06:13:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rfWeT9cq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S235759AbiJXNMr (ORCPT + 99 others); Mon, 24 Oct 2022 09:12:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235978AbiJXNKT (ORCPT ); Mon, 24 Oct 2022 09:10:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50D43233AB; Mon, 24 Oct 2022 05:24:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 05E76612BC; Mon, 24 Oct 2022 12:11:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14E23C433D6; Mon, 24 Oct 2022 12:11:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613466; bh=1/qEl5ij5KZbVIEpccmHs7XOPhQhjB56i1GxS68K0+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rfWeT9cqpRfPy7i07wTcw0Rf16zYr5QIp921rgfGdGcKl1D0ZO+fLF4GgwPAj8f9p 8xtj8Oe3hMCUur/K4sJXi2Z1raQ8Ii43/rZUYBWaYBdBXTCmbW/CM/zw/VJbsA+TSb dqLuLQfYOFrcCrXKowy20ZXwe/G5AUmhsBFjIlRc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Artem S. Tashkinov" , Mario Limonciello , Mathias Nyman , Sasha Levin Subject: [PATCH 5.4 147/255] xhci: Dont show warning for reinit on known broken suspend Date: Mon, 24 Oct 2022 13:30:57 +0200 Message-Id: <20221024113007.509934646@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113002.471093005@linuxfoundation.org> References: <20221024113002.471093005@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747574799909104863?= X-GMAIL-MSGID: =?utf-8?q?1747574799909104863?= From: Mario Limonciello [ Upstream commit 484d6f7aa3283d082c87654b7fe7a7f725423dfb ] commit 8b328f8002bc ("xhci: re-initialize the HC during resume if HCE was set") introduced a new warning message when the host controller error was set and re-initializing. This is expected behavior on some designs which already set `xhci->broken_suspend` so the new warning is alarming to some users. Modify the code to only show the warning if this was a surprising behavior to the XHCI driver. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216470 Fixes: 8b328f8002bc ("xhci: re-initialize the HC during resume if HCE was set") Reported-by: Artem S. Tashkinov Signed-off-by: Mario Limonciello Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20220921123450.671459-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/host/xhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 5ce16a259e61..3537113f006f 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1163,7 +1163,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) /* re-initialize the HC on Restore Error, or Host Controller Error */ if (temp & (STS_SRE | STS_HCE)) { reinit_xhc = true; - xhci_warn(xhci, "xHC error in resume, USBSTS 0x%x, Reinit\n", temp); + if (!xhci->broken_suspend) + xhci_warn(xhci, "xHC error in resume, USBSTS 0x%x, Reinit\n", temp); } if (reinit_xhc) {