From patchwork Wed Nov 30 09:19:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Nyman X-Patchwork-Id: 13059607 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 44D48C47088 for ; Wed, 30 Nov 2022 09:18:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232645AbiK3JSZ (ORCPT ); Wed, 30 Nov 2022 04:18:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230400AbiK3JST (ORCPT ); Wed, 30 Nov 2022 04:18:19 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9630B391F8; Wed, 30 Nov 2022 01:18:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669799897; x=1701335897; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wrWe/TQN+gS3dXYRn1q2aDPwtbTJKrb7lybWzRAK9PY=; b=aH2qLVDwlp1RNOlVLd/YYC7WBCO/FmFIyVM7PDbx90gk0apNvjaQ9sUG pZEtznNfZWIJTkHLLeqJ+pYBmaLxPlSoIx1LAuwCf/g1W7AAbr3O3r5Qq 8jrZxWGNTF/xiPkIE09IR5UTJPUpRu8YG0QTj8jALsxEu4wAH3aAb8/lY 7r0dzwE8AYpdFnnuPfzmbRE8/KQpt+1oBSFP4JBpzmOq5lmGKp//0KwQ8 xBnHhBWCH7h4t6vLlx+CuQ7SpdQlYeEvOKLO4iuloTJAyBi2LzES/O2Js T7ya74HACwyTWjXCKEf82qg9io0hXP6UKAcLHu2rFVOlP5Mx4lWFWQIdM Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10546"; a="295711270" X-IronPort-AV: E=Sophos;i="5.96,205,1665471600"; d="scan'208";a="295711270" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2022 01:18:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10546"; a="674962701" X-IronPort-AV: E=Sophos;i="5.96,205,1665471600"; d="scan'208";a="674962701" Received: from mattu-haswell.fi.intel.com ([10.237.72.199]) by orsmga008.jf.intel.com with ESMTP; 30 Nov 2022 01:18:15 -0800 From: Mathias Nyman To: Cc: , Reka Norman , stable@vger.kernel.org, Mathias Nyman Subject: [PATCH 2/6] xhci: Apply XHCI_RESET_TO_DEFAULT quirk to ADL-N Date: Wed, 30 Nov 2022 11:19:40 +0200 Message-Id: <20221130091944.2171610-3-mathias.nyman@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221130091944.2171610-1-mathias.nyman@linux.intel.com> References: <20221130091944.2171610-1-mathias.nyman@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Reka Norman ADL-N systems have the same issue as ADL-P, where a large boot firmware delay is seen if USB ports are left in U3 at shutdown. So apply the XHCI_RESET_TO_DEFAULT quirk to ADL-N as well. This patch depends on commit 34cd2db408d5 ("xhci: Add quirk to reset host back to default state at shutdown"). The issue it fixes is a ~20s boot time delay when booting from S5. It affects ADL-N devices, and ADL-N support was added starting from v5.16. Cc: stable@vger.kernel.org Signed-off-by: Reka Norman Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 7bccbe50bab1..f98cf30a3c1a 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -59,6 +59,7 @@ #define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI 0x9a13 #define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI 0x1138 #define PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI 0x51ed +#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_PCH_XHCI 0x54ed #define PCI_DEVICE_ID_AMD_RENOIR_XHCI 0x1639 #define PCI_DEVICE_ID_AMD_PROMONTORYA_4 0x43b9 @@ -246,7 +247,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |= XHCI_MISSING_CAS; if (pdev->vendor == PCI_VENDOR_ID_INTEL && - pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI) + (pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI || + pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_PCH_XHCI)) xhci->quirks |= XHCI_RESET_TO_DEFAULT; if (pdev->vendor == PCI_VENDOR_ID_INTEL &&