From patchwork Wed Sep 21 12:34:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Nyman X-Patchwork-Id: 12983682 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 121B2C32771 for ; Wed, 21 Sep 2022 12:33:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230015AbiIUMdt (ORCPT ); Wed, 21 Sep 2022 08:33:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229985AbiIUMdi (ORCPT ); Wed, 21 Sep 2022 08:33:38 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 811C28B2CF for ; Wed, 21 Sep 2022 05:33:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663763617; x=1695299617; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JmaK7Qgk+E+RDAwhbQUAVkfcXfPxIFxtoxbaYzf60RQ=; b=O+YMbA6HudPv5R6PFuqfKFLtN9Zpoontpfc8UKf/Y5Qk1gxAwq/8o9wM h/VPYvt+x4CL5s0APFOL9JdB66bba0iGMm1YtVpfqs6tRTJ3MFZ2JFiiU DX9lr5NawF57WMdvU++IVlEX5xQUgLjR1UiS03LA7jOIeV4OLAzxB2vlM rqMgkBH96wgaNenFfksDaB0OvB0tuDqjkXyAl7NQqs7AhAjGsK1polj9B qpWsRXN6XoMzlJaeo6hwpDONf4pHxxBYPxh+LnU6Qi4JPnd0TzKpEL/zq 80Uu+fCk3kWINfrx487AP3Ix1MWqWXMHADdHqUB21fNT6aWbGwxajIRCL g==; X-IronPort-AV: E=McAfee;i="6500,9779,10477"; a="363965105" X-IronPort-AV: E=Sophos;i="5.93,333,1654585200"; d="scan'208";a="363965105" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2022 05:33:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,333,1654585200"; d="scan'208";a="708429464" Received: from mattu-haswell.fi.intel.com ([10.237.72.199]) by FMSMGA003.fm.intel.com with ESMTP; 21 Sep 2022 05:33:35 -0700 From: Mathias Nyman To: Cc: , Mario Limonciello , "Artem S . Tashkinov" , Mathias Nyman Subject: [PATCH 3/6] xhci: Don't show warning for reinit on known broken suspend Date: Wed, 21 Sep 2022 15:34:47 +0300 Message-Id: <20220921123450.671459-4-mathias.nyman@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220921123450.671459-1-mathias.nyman@linux.intel.com> References: <20220921123450.671459-1-mathias.nyman@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Mario Limonciello 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. Fixes: 8b328f8002bc ("xhci: re-initialize the HC during resume if HCE was set") Link: https://bugzilla.kernel.org/show_bug.cgi?id=216470 Reported-by: Artem S. Tashkinov Signed-off-by: Mario Limonciello Signed-off-by: Mathias Nyman --- 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 38649284ff88..a7ef675f00fd 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1183,7 +1183,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) {