Re: [PATCH v6 2/9] PCI: endpoint: Pass EPF device ID to the probe function

From: Bjorn Helgaas
Date: Fri Jun 23 2023 - 16:15:09 EST


On Fri, Jun 02, 2023 at 05:17:49PM +0530, Manivannan Sadhasivam wrote:
> Currently, the EPF probe function doesn't get the device ID argument needed
> to correctly identify the device table ID of the EPF device.
> ...

> +++ b/drivers/pci/endpoint/functions/pci-epf-ntb.c
> @@ -2075,11 +2075,12 @@ static struct config_group *epf_ntb_add_cfs(struct pci_epf *epf,
> /**
> * epf_ntb_probe() - Probe NTB function driver
> * @epf: NTB endpoint function device
> + * @id: NTB endpoint function device ID
> *
> * Probe NTB function driver when endpoint function bus detects a NTB
> * endpoint function.
> */
> -static int epf_ntb_probe(struct pci_epf *epf)
> +static int epf_ntb_probe(struct pci_epf *epf, const struct pci_epf_device_id *id)
> ...

> +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
> @@ -1401,7 +1401,7 @@ static struct pci_epf_ops epf_ntb_ops = {

> *
> * Returns: Zero for success, or an error code in case of failure
> */
> -static int epf_ntb_probe(struct pci_epf *epf)
> +static int epf_ntb_probe(struct pci_epf *epf, const struct pci_epf_device_id *id)

I updated the pci/endpoint branch to add kernel-doc for the new "id",
same as you did in pci-epf-ntb.c.

Just FYI, Lorenzo & Krzysztof -- hopefully there are no more updates
before the merge window, but if you do add anything to this branch,
update it first.

Bjorn