linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shradha Todi" <shradha.t@samsung.com>
To: "'Manivannan Sadhasivam'" <manivannan.sadhasivam@linaro.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>,
	<lpieralisi@kernel.org>, <kw@linux.com>, <robh@kernel.org>,
	<bhelgaas@google.com>, <jingoohan1@gmail.com>,
	<Jonathan.Cameron@Huawei.com>, <fan.ni@samsung.com>,
	<nifan.cxl@gmail.com>, <a.manzanares@samsung.com>,
	<pankaj.dubey@samsung.com>, <cassel@kernel.org>,
	<18255117159@163.com>, <quic_nitegupt@quicinc.com>,
	<quic_krichai@quicinc.com>, <gost.dev@samsung.com>
Subject: RE: [PATCH v6 1/4] PCI: dwc: Add support for vendor specific capability search
Date: Thu, 20 Feb 2025 11:44:36 +0530	[thread overview]
Message-ID: <02de01db835e$b94171c0$2bc45540$@samsung.com> (raw)
In-Reply-To: <20250218144126.5kapvjj4e64bamvi@thinkpad>



> -----Original Message-----
> From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Sent: 18 February 2025 20:11
> To: Shradha Todi <shradha.t@samsung.com>
> Cc: linux-kernel@vger.kernel.org; linux-pci@vger.kernel.org; lpieralisi@kernel.org; kw@linux.com; robh@kernel.org;
> bhelgaas@google.com; jingoohan1@gmail.com; Jonathan.Cameron@Huawei.com; fan.ni@samsung.com; nifan.cxl@gmail.com;
> a.manzanares@samsung.com; pankaj.dubey@samsung.com; cassel@kernel.org; 18255117159@163.com;
> quic_nitegupt@quicinc.com; quic_krichai@quicinc.com; gost.dev@samsung.com
> Subject: Re: [PATCH v6 1/4] PCI: dwc: Add support for vendor specific capability search
> 
> On Fri, Feb 14, 2025 at 04:20:04PM +0530, Shradha Todi wrote:
> > Add vendor specific extended configuration space capability search API
> > using struct dw_pcie pointer for DW controllers.
> >
> > Signed-off-by: Shradha Todi <shradha.t@samsung.com>
> 
> I took this patch and modified to pass the 'struct dwc_pcie_vsec_id' to the API to simplify the callers:
> https://lore.kernel.org/linux-pci/20250218-pcie-qcom-ptm-v1-2-16d7e480d73e@linaro.org
> 
> - Mani
> 

I saw the series. I'm okay to move that to a common header file to avoid duplication but I feel that this movement will
cause my patch to become dependent on your PTM series. Since that series in still in v1 stage and mine is already in v6,
I feel the debugfs patchset will get further delayed. If you are okay, I could take in the changes as part of v7 after waiting
for some more reviews. Or, the debugfs patches could be reviewed as it is, and the changes or movement could go on top
of that?

> > ---
> >  drivers/pci/controller/dwc/pcie-designware.c | 19 +++++++++++++++++++
> > drivers/pci/controller/dwc/pcie-designware.h |  1 +
> >  2 files changed, 20 insertions(+)
> >
> > diff --git a/drivers/pci/controller/dwc/pcie-designware.c
> > b/drivers/pci/controller/dwc/pcie-designware.c
> > index 6d6cbc8b5b2c..3588197ba2d7 100644
> > --- a/drivers/pci/controller/dwc/pcie-designware.c
> > +++ b/drivers/pci/controller/dwc/pcie-designware.c
> > @@ -277,6 +277,25 @@ static u16 dw_pcie_find_next_ext_capability(struct dw_pcie *pci, u16 start,
> >  	return 0;
> >  }
> >
> > +u16 dw_pcie_find_vsec_capability(struct dw_pcie *pci, u16 vendor_id,
> > +u16 vsec_cap) {
> > +	u16 vsec = 0;
> > +	u32 header;
> > +
> > +	if (vendor_id != dw_pcie_readw_dbi(pci, PCI_VENDOR_ID))
> > +		return 0;
> > +
> > +	while ((vsec = dw_pcie_find_next_ext_capability(pci, vsec,
> > +					PCI_EXT_CAP_ID_VNDR))) {
> > +		header = dw_pcie_readl_dbi(pci, vsec + PCI_VNDR_HEADER);
> > +		if (PCI_VNDR_HEADER_ID(header) == vsec_cap)
> > +			return vsec;
> > +	}
> > +
> > +	return 0;
> > +}
> > +EXPORT_SYMBOL_GPL(dw_pcie_find_vsec_capability);
> > +
> >  u16 dw_pcie_find_ext_capability(struct dw_pcie *pci, u8 cap)  {
> >  	return dw_pcie_find_next_ext_capability(pci, 0, cap); diff --git
> > a/drivers/pci/controller/dwc/pcie-designware.h
> > b/drivers/pci/controller/dwc/pcie-designware.h
> > index 347ab74ac35a..02e94bd9b042 100644
> > --- a/drivers/pci/controller/dwc/pcie-designware.h
> > +++ b/drivers/pci/controller/dwc/pcie-designware.h
> > @@ -476,6 +476,7 @@ void dw_pcie_version_detect(struct dw_pcie *pci);
> >
> >  u8 dw_pcie_find_capability(struct dw_pcie *pci, u8 cap);
> >  u16 dw_pcie_find_ext_capability(struct dw_pcie *pci, u8 cap);
> > +u16 dw_pcie_find_vsec_capability(struct dw_pcie *pci, u16 vendor_id,
> > +u16 vsec_cap);
> >
> >  int dw_pcie_read(void __iomem *addr, int size, u32 *val);  int
> > dw_pcie_write(void __iomem *addr, int size, u32 val);
> > --
> > 2.17.1
> >
> 
> --
> மணிவண்ணன் சதாசிவம்



  reply	other threads:[~2025-02-20  7:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250214105330epcas5p13b0d5bef72b012d71e850c9454015880@epcas5p1.samsung.com>
2025-02-14 10:50 ` [PATCH v6 0/4] Add support for debugfs based RAS DES feature in PCIe DW Shradha Todi
2025-02-14 10:50   ` [PATCH v6 1/4] PCI: dwc: Add support for vendor specific capability search Shradha Todi
2025-02-18 14:41     ` Manivannan Sadhasivam
2025-02-20  6:14       ` Shradha Todi [this message]
2025-02-20  7:28         ` 'Manivannan Sadhasivam'
2025-02-14 10:50   ` [PATCH v6 2/4] Add debugfs based silicon debug support in DWC Shradha Todi
2025-02-18 15:02     ` Manivannan Sadhasivam
2025-02-20  9:18       ` Shradha Todi
2025-02-20  9:48         ` 'Manivannan Sadhasivam'
2025-02-14 10:50   ` [PATCH v6 3/4] Add debugfs based error injection " Shradha Todi
2025-02-20  6:06     ` Manivannan Sadhasivam
2025-02-14 10:50   ` [PATCH v6 4/4] Add debugfs based statistical counter " Shradha Todi
2025-02-20  6:17     ` Manivannan Sadhasivam
2025-02-19 17:45   ` [PATCH v6 0/4] Add support for debugfs based RAS DES feature in PCIe DW Niklas Cassel
2025-02-21 13:22     ` Shradha Todi

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='02de01db835e$b94171c0$2bc45540$@samsung.com' \
    --to=shradha.t@samsung.com \
    --cc=18255117159@163.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=a.manzanares@samsung.com \
    --cc=bhelgaas@google.com \
    --cc=cassel@kernel.org \
    --cc=fan.ni@samsung.com \
    --cc=gost.dev@samsung.com \
    --cc=jingoohan1@gmail.com \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=nifan.cxl@gmail.com \
    --cc=pankaj.dubey@samsung.com \
    --cc=quic_krichai@quicinc.com \
    --cc=quic_nitegupt@quicinc.com \
    --cc=robh@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).