From mboxrd@z Thu Jan 1 00:00:00 1970 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 9357AC64EC4 for ; Fri, 3 Mar 2023 21:47:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232582AbjCCVrf (ORCPT ); Fri, 3 Mar 2023 16:47:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232586AbjCCVrO (ORCPT ); Fri, 3 Mar 2023 16:47:14 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC95765473; Fri, 3 Mar 2023 13:44:45 -0800 (PST) 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 sin.source.kernel.org (Postfix) with ESMTPS id B0A18CE2297; Fri, 3 Mar 2023 21:43:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26FC5C4339B; Fri, 3 Mar 2023 21:43:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677879784; bh=09CWxnMt7FVzWKGP1ZnECBa1seZq8oM0SWsTeBJBDpA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YUmN5rKNaL0/Uds3pPgmrtRpmOqj+j+ZBRrUi78+mbUu9qUo+mSicdyRxezWkHSLD X8Xdor6b36OZGAy/uqPHebfbqol06+JYsYEDIsx8/ZnDUD/rEI+e8M9M9ML88dzlU3 7gA/wIYB66FGc8viKb+FHFGSarD3lglVfoCmqj72YKQQgqnHr+z4xT8V2BjMJfU5pF Ekl4ELyiyO9ClvEwAcHLAyGz2a0FxIDsBPTpf7IfnyA7dryOJw2liHpmflM56wWPkH n2UpA736Rop0dl+SmhG4MMj51P45OpnC+sq3/swXRxKaO2lEKhKE7qu/XihSuip2Ks WnFdSuu6rMwJA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Manivannan Sadhasivam , Bjorn Helgaas , Sasha Levin , kabel@kernel.org, pali@kernel.org, lukas@wunner.de, mani@kernel.org, linux-pci@vger.kernel.org Subject: [PATCH AUTOSEL 6.2 59/64] PCI: pciehp: Add Qualcomm quirk for Command Completed erratum Date: Fri, 3 Mar 2023 16:41:01 -0500 Message-Id: <20230303214106.1446460-59-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230303214106.1446460-1-sashal@kernel.org> References: <20230303214106.1446460-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Manivannan Sadhasivam [ Upstream commit 82b34b0800af8c9fc9988c290cdc813e0ca0df31 ] The Qualcomm PCI bridge device (Device ID 0x010e) found in chipsets such as SC8280XP used in Lenovo Thinkpad X13s, does not set the Command Completed bit unless writes to the Slot Command register change "Control" bits. This results in timeouts like below during boot and resume from suspend: pcieport 0002:00:00.0: pciehp: Timeout on hotplug command 0x03c0 (issued 2020 msec ago) ... pcieport 0002:00:00.0: pciehp: Timeout on hotplug command 0x13f1 (issued 107724 msec ago) Add the device to the Command Completed quirk to mark commands "completed" immediately unless they change the "Control" bits. Link: https://lore.kernel.org/r/20230213144922.89982-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin --- drivers/pci/hotplug/pciehp_hpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 10e9670eea0b0..f8c70115b6917 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -1088,6 +1088,8 @@ static void quirk_cmd_compl(struct pci_dev *pdev) } DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl); +DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x010e, + PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl); DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0110, PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl); DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0400, -- 2.39.2