Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp760351ybx; Thu, 7 Nov 2019 02:17:12 -0800 (PST) X-Google-Smtp-Source: APXvYqyu9xHtXQLLQCFFqp7eUr/9y5hCCvmTjR0QHiC5f5veNyJXMD9Ab90kOD0s9xFLHE9B5Rvu X-Received: by 2002:aa7:c444:: with SMTP id n4mr1149109edr.3.1573121831972; Thu, 07 Nov 2019 02:17:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573121831; cv=none; d=google.com; s=arc-20160816; b=xAFq2umxsRihEjJI7iQxjY2xP6gJmSKWmNqHXqnJmOmXwRb4qylIlLp9Mrmlni4DS7 qa7gVjfAGZOasFpcYq6800CLPcxQrLdSf9G31gqT8NBps61JCPnWJKhASl/4AABdTuqe Ij+a3yzmgMfkikCOshJu7bQZPLPOPXIIuw8/2o7cSkdbAdEvrLPIVJVuj4SOeE3eRUaZ 6MCrO2eWyRzi5KwnQQbYUuoz7wbyRqbKKejuchLtp3r/Z17cuD/XFdk4XWirjcBbwvDa USs7E0nD3M5pKDBbw3ZMsqs6IOeBspvqTGwKxEUrBbfZFJ0TVqlkZJMLNLO8xvGzwBM9 cLLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=qttlLNzSCmCIntAC+B4PtXTBdmtnN2CebXZyJju99Wg=; b=Y3tTFGtzOv1EIk9Rob7dArr3uZNWuuPRr2Qw8eSe6BGAuV+d+6WqMS6zoY+MaJpvmy AiSDcsQW0Y0l+vVeuNKGeKCwVrjY9S6rPpvnE2CSPVqGB8dtqFHHhyf2iISvyIpW+/db NlO3lj6bRBt0YmSNnWDXljTAMJCRhSdeKOoZ0+seMo2KxUVHfnHCdd78nQTcnbQq0T+K Jn5OMsl1Auq0cqPRW+fmzznUvzjJKbn7E/kRc6KGW3DxJMctPuEgP+pbsjgHGdfGTxYa npknXzuOLw/v71W69qWWrJ0ZKDyCbV7GW8fWJVt0S7X5C/0fol8J20CCfljj0ORXraUs ImEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z24si1126319edd.127.2019.11.07.02.16.47; Thu, 07 Nov 2019 02:17:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387962AbfKGKPa (ORCPT + 99 others); Thu, 7 Nov 2019 05:15:30 -0500 Received: from ns.iliad.fr ([212.27.33.1]:37428 "EHLO ns.iliad.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733142AbfKGKPa (ORCPT ); Thu, 7 Nov 2019 05:15:30 -0500 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id 3AA3C2022D; Thu, 7 Nov 2019 11:15:27 +0100 (CET) Received: from [192.168.108.51] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id 1ADA120189; Thu, 7 Nov 2019 11:15:27 +0100 (CET) Subject: Re: [PATCH] PCI: qcom: Fix the fixup of PCI_VENDOR_ID_QCOM To: Bjorn Andersson , Stanimir Varbanov , Srinivas Kandagatla Cc: Lorenzo Pieralisi , Andrew Murray , Bjorn Helgaas , MSM , PCI , LKML , stable , Robin Murphy References: <20191102002420.4091061-1-bjorn.andersson@linaro.org> From: Marc Gonzalez Message-ID: <8f15abf9-80bc-9767-e61c-6e0455effbf0@free.fr> Date: Thu, 7 Nov 2019 11:15:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191102002420.4091061-1-bjorn.andersson@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Thu Nov 7 11:15:27 2019 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/11/2019 01:24, Bjorn Andersson wrote: > There exists non-bridge PCIe devices with PCI_VENDOR_ID_QCOM, so limit > the fixup to only affect the PCIe 2.0 (0x106) and PCIe 3.0 (0x107) > bridges. Hey, git blames me! Why didn't you CC me? :-) Commit 322f03436692481993d389f539c016d20bb0fa1d PCI: qcom: Use default config space read function The patch's history is of interest: https://lkml.org/lkml/2019/3/11/614 https://www.spinics.net/lists/linux-arm-msm/msg49090.html > Cc: stable@vger.kernel.org > Signed-off-by: Bjorn Andersson > --- > drivers/pci/controller/dwc/pcie-qcom.c | 3 ++- > include/linux/pci_ids.h | 2 ++ > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c > index 35f4980480bb..b91abf4d4905 100644 > --- a/drivers/pci/controller/dwc/pcie-qcom.c > +++ b/drivers/pci/controller/dwc/pcie-qcom.c > @@ -1441,7 +1441,8 @@ static void qcom_fixup_class(struct pci_dev *dev) > { > dev->class = PCI_CLASS_BRIDGE_PCI << 8; > } > -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_QCOM, PCI_ANY_ID, qcom_fixup_class); > +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_QCOM, PCIE_DEVICE_ID_QCOM_PCIE20, qcom_fixup_class); > +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_QCOM, PCIE_DEVICE_ID_QCOM_PCIE30, qcom_fixup_class); > > static struct platform_driver qcom_pcie_driver = { > .probe = qcom_pcie_probe, > diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h > index 21a572469a4e..3d0724ee4d2f 100644 > --- a/include/linux/pci_ids.h > +++ b/include/linux/pci_ids.h > @@ -2413,6 +2413,8 @@ > #define PCI_VENDOR_ID_LENOVO 0x17aa > > #define PCI_VENDOR_ID_QCOM 0x17cb > +#define PCIE_DEVICE_ID_QCOM_PCIE20 0x0106 > +#define PCIE_DEVICE_ID_QCOM_PCIE30 0x0107 I don't think the fixup is required for 0x106 and 0x107... In v1, I wrote: FWIW, this quirk is no longer required on recent chips: msm8996 (tested by Stanimir), msm8998 (tested by me), sdm845 (untested) are unaffected apq/ipq8064 is affected => what is the device ID for these chips? others? IIRC, 0x0101 requires the fixup because dw_pcie_wr_own_conf(pp, PCI_CLASS_DEVICE, 2, PCI_CLASS_BRIDGE_PCI); is broken on that platform (grrr, HW devs) (See my v3, tested by Srinivas) Stan wrote: Yes it is good but to avoid breaking another SoCs could you add fixups for the following SoCs: SoC device ID ipq4019 0x1001 ipq8064 0x101 ipq8074 0x108 ipq8064 has the same device ID as apq8064, but I'm not sure do we need defines per SoC or just rename DEV_ID_8064 ? I'm fine with both ways. In conclusion, my analysis in v5 was wrong "Changes from v4 to v5: Apply fixup to all qcom chips, the same way it was before (thus the code remains functionally equivalent)" => The fixup was applied *more widely* than before, so not functionally equivalent. Regards.