From: Bjorn Helgaas <helgaas@kernel.org>
To: Shuai Xue <xueshuai@linux.alibaba.com>
Cc: Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Ilkka Koskinen <ilkka@os.amperecomputing.com>,
Krishna chaitanya chundru <quic_krichai@quicinc.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH] perf/dwc_pcie: Qualify RAS DES VSEC Capability by Vendor, Revision
Date: Tue, 10 Dec 2024 08:53:35 -0600 [thread overview]
Message-ID: <20241210145335.GA3239578@bhelgaas> (raw)
In-Reply-To: <5a1ef0d2-be24-4865-8e23-159d001ac6d6@linux.alibaba.com>
On Tue, Dec 10, 2024 at 08:04:17PM +0800, Shuai Xue wrote:
> 在 2024/12/10 06:29, Bjorn Helgaas 写道:
> > From: Bjorn Helgaas <bhelgaas@google.com>
> >
> > PCI Vendor-Specific (VSEC) Capabilities are defined by each vendor.
> > Devices from different vendors may advertise a VSEC Capability with the DWC
> > RAS DES functionality, but the vendors may assign different VSEC IDs.
> >
> > Search for the DWC RAS DES Capability using the VSEC ID and VSEC Rev
> > chosen by the vendor.
> > - for (vid = dwc_pcie_vendor_ids; vid->vendor_id; vid++) {
> > + for (vid = dwc_pcie_pmu_vsec_ids; vid->vendor_id; vid++) {
>
> How about checking the pdev->vendor with vid->vendor_id before
> search the vesc cap?
>
> + if (pdev->vendor != vid->vendor_id)
> + continue;
Every user of VSEC needs to specify the (Vendor ID, VSEC ID) and
verify that the Vendor ID matches the device Vendor ID, so
pci_find_vsec_capability() does this check internally, so I don't
think we need to do it here.
> > vsec = pci_find_vsec_capability(pdev, vid->vendor_id,
> > - DWC_PCIE_VSEC_RAS_DES_ID);
> > - if (vsec)
> > - break;
> > + vid->vsec_id);
next prev parent reply other threads:[~2024-12-10 14:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 22:29 [PATCH] perf/dwc_pcie: Qualify RAS DES VSEC Capability by Vendor, Revision Bjorn Helgaas
2024-12-10 12:04 ` Shuai Xue
2024-12-10 14:53 ` Bjorn Helgaas [this message]
2024-12-11 1:24 ` Shuai Xue
2024-12-11 0:55 ` Ilkka Koskinen
2024-12-11 23:44 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241210145335.GA3239578@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=ilkka@os.amperecomputing.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=quic_krichai@quicinc.com \
--cc=will@kernel.org \
--cc=xueshuai@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox