Re: [PATCH v4 1/2] PCI: dwc: Add support for vendor specific capability search

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 16, 2025 at 12:42:23PM +0530, Shradha Todi wrote:

[...]

> > > > This series uses:
> > > >
> > > >   dw_pcie_find_vsec_capability(pci, DW_PCIE_VSEC_EXT_CAP_RAS_DES)
> > > >
> > > > in dwc_pcie_rasdes_debugfs_init(), but I don't see any calls of that
> > > > function yet.
> > >
> > > I guess that the caller got missed unintentionally in patch 2/2.
> > 
> > Actually the missing caller is intentional. Jonathan rightly pointed out in the
> > previous version that the function : dw_pcie_setup() was being called in the
> > resume path as well and so I thought it would be best to leave it up to the
> > platform drivers to decide when and how to call the rasdes init. Do you suggest any
> > other approach?
> > 

Adding the API without any in-kernel consumer is not usually recommended.

> 
> On second thoughts, I will add the dwc_pcie_rasdes_debugfs_init and deinit calls in the
> dwc common PCIe files but in the probe/remove path.
> 

Can you please be more specific? There are no probe/remove functions in DWC
common drivers. We have init/deinit only. For pcie-designware-host, you can call
dwc_pcie_rasdes_debugfs_init() from dw_pcie_host_init() and
dwc_pcie_rasdes_debugfs_deinit() from dw_pcie_host_deinit(). But for
pcie-designware-ep, you should call them from dw_pcie_ep_init_registers() and
dw_pcie_ep_cleanup() since reading/writing to these debugfs files will cause
DBI access and that requires active refclk. These APIs are used as a placeholder
for code that require refclk to work.

- Mani

-- 
மணிவண்ணன் சதாசிவம்




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux