PCI: endpoint: Pass EPF device ID to the probe function
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Fri, 2 Jun 2023 11:47:49 +0000 (17:17 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 23 Jun 2023 20:05:03 +0000 (15:05 -0500)
commit081c715dfd50542e89df5ee12a8e32e7ed936cd1
tree66b17525b114e4f816211237878852a39ff70212
parentff2f19d6f1fcb6128950263c3ea46ff1aefec54f
PCI: endpoint: Pass EPF device ID to the probe function

Currently, the EPF probe function doesn't get the device ID argument needed
to correctly identify the device table ID of the EPF device.

When multiple entries are added to the "struct pci_epf_device_id" table,
the probe function needs to identify the correct one. This is achieved by
modifying the pci_epf_match_id() function to return the match ID pointer
and passing it to the driver's probe function.

pci_epf_device_match() function can return bool based on the return value
of pci_epf_match_id().

Link: https://lore.kernel.org/r/20230602114756.36586-3-manivannan.sadhasivam@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Kishon Vijay Abraham I <kishon@kernel.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
drivers/pci/endpoint/functions/pci-epf-ntb.c
drivers/pci/endpoint/functions/pci-epf-test.c
drivers/pci/endpoint/functions/pci-epf-vntb.c
drivers/pci/endpoint/pci-epf-core.c
include/linux/pci-epf.h