From patchwork Mon Oct 24 11:31:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8832 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp431416wru; Mon, 24 Oct 2022 05:43:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4DciGBqt7hVOpri0rIdmfX9J16zzRThKJ7jLLUX+IzvxvHNiRaXOaC1KNAshjeElF3lCY3 X-Received: by 2002:a17:902:e94f:b0:17f:6df3:1a99 with SMTP id b15-20020a170902e94f00b0017f6df31a99mr33389304pll.20.1666615422064; Mon, 24 Oct 2022 05:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666615422; cv=none; d=google.com; s=arc-20160816; b=wTZtRZSMyd0oJEGP2DfXNyM+qREwPuUGLeA2+prsbumYzagNJmFHS+VhzedgEqqS2e kkJxCY+ftxRUuIWhnBMs7Lj99XleP4XSBhGvCCfze7m4etdtEz304D2Dr4QNo1Z/+Icf UvdCcg52qdvQWEzxb3tPM8O3nK9DEUGncDAcsTG6s2hLG8b7ueZtJ7l3vzIuyMaf0yLC piv9Jl1s6Z6p2rNoYH++XioD5WCsnifEipZY6ya8Cx/W/aIhFKdl5ttdgRF2oEiLr78i Y7pyAtCm2EFIXPOYRhn8OYJCWZhK+eHrTamxk5D+ei+2eA+wqvf5d3q3gF1pyCaVjr+7 HThQ== 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=sXwx4JCDitQMNL5FzXXu06ummDcAMqODUk6jDvFqhUQ=; b=R8umuOAqWpWNMwvrIDgB4Ee54yD2jQS2c59WgMD9Z1f2ZQUJGZVsoyYgQ49sWPagOA Hyfv3G8Mw1/sW3rxuQ4IFj0KEIJlUFl8RefsunnlvNAMXKysds5KvBsI2OyHdA6XBwYq l9emmffB1rusZWYofsTqC28c5JAYyNfdRPkklWPDWxT9BRXIJT6FEN3S8pdE+vWz+SOQ HLGfV9cY0bYdTGfI3bXGFuLwAkq1kS93U6DT4LNDIG4p3TQkG4ty8W5BnD+nvDW+rtiD m+MDAladRkKplqt9AMMoBlJ3kdyTNOVPPAJQxTanaYhbkpLED+SJCfFIGEMuDe9cUBXa gubw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oNKFBLLp; 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 p30-20020a056a000a1e00b00565adc8a5f7si39585757pfh.1.2022.10.24.05.43.27; Mon, 24 Oct 2022 05:43:42 -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=oNKFBLLp; 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 S234262AbiJXMei (ORCPT + 99 others); Mon, 24 Oct 2022 08:34:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234205AbiJXM3i (ORCPT ); Mon, 24 Oct 2022 08:29:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6225088DCE; Mon, 24 Oct 2022 05:03:36 -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 ams.source.kernel.org (Postfix) with ESMTPS id 8F92AB811D2; Mon, 24 Oct 2022 12:00:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9FF7C433C1; Mon, 24 Oct 2022 12:00:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612846; bh=OP7fMCUKSjv6X/69OGF5nMzei0b9Q801AjD8wWBtoHU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oNKFBLLp/OwXH7+EsaS43/N2eFIogjX4PoJg+FjyP9GUhn9CUcRq3TDExV01TCJ6D u3nURUGJ/013TjgVmJQ+Dcbz3NDFP5A8uMjOlCkumE9FgoFqYHSBm+MPMQ2tGTWtU/ VAoPG1Hq/mbLS6pTdZSRkAdkzXP5fwml86eNP4HQ= 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 4.19 141/229] xhci: Dont show warning for reinit on known broken suspend Date: Mon, 24 Oct 2022 13:31:00 +0200 Message-Id: <20221024113003.579666945@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@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?1747572932992481293?= X-GMAIL-MSGID: =?utf-8?q?1747572932992481293?= 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 7fef6d9ed04f..3a1ed63d7334 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1155,7 +1155,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) {