From patchwork Mon Oct 24 11:30:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9118 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp456220wru; Mon, 24 Oct 2022 06:33:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6aTbydGEPZqwIzkUux69IG1AdHdPIpDK4/pMmJgofJFkW2zOrlZfnt+xWxbRmlyvJvuAGA X-Received: by 2002:a17:903:183:b0:184:5b9a:24e7 with SMTP id z3-20020a170903018300b001845b9a24e7mr34187530plg.79.1666618427683; Mon, 24 Oct 2022 06:33:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666618427; cv=none; d=google.com; s=arc-20160816; b=sMT01ONX2LHvOcrqiMyyhZWGAWInd12mTVaSsKwsqTIqBqp46WdmvBAS76buCMKWjM ZBuDcM+hgai2N1PUSiI9/j8wzR6Q6r67trotXESZ1JoZ4A9iY5eOOdmJ59pi6/MyReZ8 r4aTttojJ74kOqXqKZoO04UybI/6loG3Ua1OzHICdXRSO4I2wglC+XpQVHd0J2bajXaE QrLjYEN3rOLgUm9K9BFEEHU5dfjASoPDIQelxU4l1KsOn4bvsfHyiQApZmrYVB4baiFY 1kAFWyM17UNt/HAWlYLgNTf8Z+ePNASl/CLVeorPPMWGvHhGapJAmGA7qusu1Jn/iiN0 xldQ== 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=e5wqwCBku8w9r1Z1sG40X3eIlMdaKeEqcXijfkZ+BXI=; b=IU69tmyEmjkuPuWVILXGwflyFCDCmZkjZo9yUpyf9AwwxpbVCrB3EQhYvsKT1fYzdh ZgzRxKe5c0BZpGe0Bu17lWMtIhA9uCt/CCFafuxzLNfygu+dSlIsBI3Uff9aaxVvYqkW wsVBwm22KzHIbhxd94KNhJCe5JC9JGNYBTGE8TgO/MR3e/KXqnJW5nE/ZQgr6945cq4a a0j5RLkfTdFai+8raxLGIrdbYAnQtagyQhJ+Pjl3kOU5hNWdSpwDX9xQhuKVGcrTf7af qwqUlggiioxDHdsSWJXLsa4xru/cN010QJwUXKrkiG6hDxAmb+y49VLopRkWgrx0Mcu3 hY/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l24Eg5oI; 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 l11-20020a170902f68b00b0017f75654a51si18143457plg.245.2022.10.24.06.33.31; Mon, 24 Oct 2022 06:33:47 -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=l24Eg5oI; 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 S235957AbiJXNSw (ORCPT + 99 others); Mon, 24 Oct 2022 09:18:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235898AbiJXNRi (ORCPT ); Mon, 24 Oct 2022 09:17:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09A88A4B89; Mon, 24 Oct 2022 05:26:30 -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 03705611B0; Mon, 24 Oct 2022 12:26:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A136C433D6; Mon, 24 Oct 2022 12:26:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614363; bh=TfrcbV3cdle516hYDyZttZDzKbIWhSzetpvS4GzUd0g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l24Eg5oIVBhwOgZgaqi7SPlBxsflkxn2Mu7DAg9JierRWl5gB/sT19crAGI9b0yCS vXPZikKydH9sChGI5H8hellFR3jOF+dqyg4vxHr2uPZib7IH6Bb7rDFm+FVXA5W7cM 28Tsgj3QlU/xcCnpZjuZI+XzFG2rfiu5KaXZgiHI= 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.10 233/390] xhci: Dont show warning for reinit on known broken suspend Date: Mon, 24 Oct 2022 13:30:30 +0200 Message-Id: <20221024113032.712141035@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@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?1747576084502689481?= X-GMAIL-MSGID: =?utf-8?q?1747576084502689481?= 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 7b16b6b45af7..8918e6ae5c4b 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) {