Message ID | 20230213144922.89982-1-manivannan.sadhasivam@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2386573wrn; Mon, 13 Feb 2023 06:50:57 -0800 (PST) X-Google-Smtp-Source: AK7set/NwgodJf1E+4aD9tq3fkk2CtL0u5WFzNrwqQPPrAiPYPnNSqYbmPRNYC+CS4povsZQNv/u X-Received: by 2002:a50:8a88:0:b0:4aa:f910:c21c with SMTP id j8-20020a508a88000000b004aaf910c21cmr20075650edj.3.1676299857189; Mon, 13 Feb 2023 06:50:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676299857; cv=none; d=google.com; s=arc-20160816; b=qnTfcgkysr9Om9ixPJV3bWdv/6wjF47UsOV+I3YODKUJnH+QaJnPtWQFtK6UsKFBaj /VjPtM/JkjEJTp3Ez72SDrByDaU4w8hxJn3GztPT+dah8CAwnM4M0mS46LXJnE/YX5jD Lz83e/D+ayF4tGkFi2YXVD0K3Fdg9c7AUkA+tTpxx6iiav5uRKDP7hTg4Qr3euIfZOUU TbNKADyp2cChjSfh7OeG97Y3jxAqGPgliHpfS3WLLLM+4xpgN/ggcQoerfo0ceWnidF4 9ucd1oF9fppXBMsTwd9NL3NTbxwK0dQgjK19RE9Mbr/9AvCWQ+ZF1ztYdNOE8Wo1qnJm pZpg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=wJcmar1XfdQfAuwhv/PsTLQlXNOUd4PyupZMvaHFGP8=; b=oDLHgtb0TXd9NTvOjRvsnNCoXcbafqpNmBHPHf5ws86S8S+U2/Xc2r+gT58qUbC32p VAY0kq6LcrJr7ys4bmf8EdppoK8DtFi4Nhm9mrK+kCBix4UfVprObwMWPmicWEBpbuXu l0j2BaXJRgGoOY8Rt30mudSn+tTdleqno+ps+JMraohzWlqsHivqxVqlue/gJDQoVjY9 oNxAxN3IKLHg4FOJNAmh8nojCcsxf2RNZ9MTqa+fkbOjyzpok8ufehSmopf1Fxa705k+ hqgLvqwSd4o+gMSJnLUiLH48wxqZDRpgM0o0NeqdxfWQo0OeMJ+DpPG1HGPpfT+rxL1L mkuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ApAmzMNC; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l10-20020aa7d94a000000b004acbaac910csi7750406eds.28.2023.02.13.06.50.34; Mon, 13 Feb 2023 06:50:57 -0800 (PST) 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=@linaro.org header.s=google header.b=ApAmzMNC; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230374AbjBMOtg (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Mon, 13 Feb 2023 09:49:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230255AbjBMOtf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 13 Feb 2023 09:49:35 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43C471422E for <linux-kernel@vger.kernel.org>; Mon, 13 Feb 2023 06:49:34 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id w14-20020a17090a5e0e00b00233d3b9650eso4721400pjf.4 for <linux-kernel@vger.kernel.org>; Mon, 13 Feb 2023 06:49:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=wJcmar1XfdQfAuwhv/PsTLQlXNOUd4PyupZMvaHFGP8=; b=ApAmzMNC+RTfpQ9DxngSn2lEm3E3W+H2GAXYRLVXisVc2eojwW6xNivx61x00/ZuAx LQjxUNRkjjrujCkiHexqjcWHiFaDtFJ9hf2eJlzMd2R2P28Rfaau/V41TKJuVenFgrXt GY6iv6uUwos5hPPH6FOeuvxN7D0YdbMt0u33H3YiutoeH28viFCHo2MgnR95BWQZzr9H CiBPqlHjA9mreffQZGSsqOOoLt2ZkVCGMwSCcgRjri+L1gG8FZ45UpoHxO0TznZMDnMw uyMRK94QuvKPPbFe0/SXJ1N4MNbWZQTxJ6DMhg7jFxWyd0Q9eRosfl8GHYYb+TkJABSZ J2cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wJcmar1XfdQfAuwhv/PsTLQlXNOUd4PyupZMvaHFGP8=; b=4vjcuIcWKSA4GOuVgScMymn6gcdMgLTKLJJS/YJhnRwpuamSSeudgfN9GEnIo3k36d Vnr1i8MTfvEscuuAzv1ro0WPR/75eC7EDKNmv25pvI/7A7iRCzgLG//PJ/BWpVuEMRNA dDAtGS1orxU8s2VW4/ZMPp/LkypilCuqKZpS5Uhp17rrDIPE+V4TZ6kiilnFMcDjzGLg THuGpkJP8Sbg5XaBbS/Mmzx3KyIKLnQKGl3a0/NhAAggYUKZVuGPUP7l7bjixCg8O8io bWJe1gZkxx6kQ8Mo5o942M4wTw4Oq+HytufwMWw8oLyYNGbaTFbA4lHUVbcDSzmsgwQt 5Tjg== X-Gm-Message-State: AO0yUKXC4vqyDuiP88+J/NIWZENZuq0KH8qiIqNQwAZCADiemmy6voAc Trm3XQxuOe7FbG3q59l2AE6C X-Received: by 2002:a05:6a21:6210:b0:bf:c1c3:4179 with SMTP id wm16-20020a056a21621000b000bfc1c34179mr20132975pzb.22.1676299773722; Mon, 13 Feb 2023 06:49:33 -0800 (PST) Received: from localhost.localdomain ([117.217.182.252]) by smtp.gmail.com with ESMTPSA id o23-20020a63fb17000000b004fb1310c1c3sm7293567pgh.69.2023.02.13.06.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 06:49:33 -0800 (PST) From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, steev@kali.org, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Subject: [PATCH] PCI: pciehp: Add Qualcomm quirk for Command Completed erratum Date: Mon, 13 Feb 2023 20:19:22 +0530 Message-Id: <20230213144922.89982-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757727799243159228?= X-GMAIL-MSGID: =?utf-8?q?1757727799243159228?= |
Series |
PCI: pciehp: Add Qualcomm quirk for Command Completed erratum
|
|
Commit Message
Manivannan Sadhasivam
Feb. 13, 2023, 2:49 p.m. UTC
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.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
Bjorn, during the review of a similar patch adding the quirk for device id
0x0110, you asked me whether we should mark all Qcom bridge devices as
quirky like Intel bridges. I tried asking this question to Qualcomm but
found no answer yet. So I just went with adding one more entry.
drivers/pci/hotplug/pciehp_hpc.c | 2 ++
1 file changed, 2 insertions(+)
Comments
On Mon, Feb 13, 2023 at 08:19:22PM +0530, Manivannan Sadhasivam wrote: > 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. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Applied to pci/hotplug for v6.3, thanks! > --- > > Bjorn, during the review of a similar patch adding the quirk for device id > 0x0110, you asked me whether we should mark all Qcom bridge devices as > quirky like Intel bridges. I tried asking this question to Qualcomm but > found no answer yet. So I just went with adding one more entry. > > 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 10e9670eea0b..f8c70115b691 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.25.1 >
Hello, > 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. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Applied to pci/hotplug, thank you! [1/1] PCI: pciehp: Add Qualcomm quirk for Command Completed erratum https://git.kernel.org/pci/pci/c/dc4e71ddbe8e Krzysztof
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 10e9670eea0b..f8c70115b691 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,