From 17eb3eef19f2c0541a7f04ad37c4a7fec89f0822 Mon Sep 17 00:00:00 2001 From: Vaibhav Jain Date: Mon, 29 Feb 2016 11:10:53 +0530 Subject: cxl: Ignore probes for virtual afu pci devices Add a check at the beginning of cxl_probe function to ignore virtual pci devices created for each afu registered. This fixes the the errors messages logged about missing CXL vsec, when cxl probe is unable to find necessary vsec entries in device pci config space. The error message logged are of the form : cxl-pci 0004:00:00.0: ABORTING: CXL VSEC not found! cxl-pci 0004:00:00.0: cxl_init_adapter failed: -19 Cc: Ian Munsie Cc: Frederic Barrat Signed-off-by: Vaibhav Jain Reviewed-by: fbarrat@linux.vnet.ibm.com Reviewed-by: Andrew Donnellan Acked-by: Ian Munsie Signed-off-by: Michael Ellerman --- drivers/misc/cxl/pci.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/misc/cxl/pci.c') diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index 6cae0445a7c8..6634b7a3c42b 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c @@ -1243,6 +1243,11 @@ static int cxl_probe(struct pci_dev *dev, const struct pci_device_id *id) int slice; int rc; + if (cxl_pci_is_vphb_device(dev)) { + dev_dbg(&dev->dev, "cxl_init_adapter: Ignoring cxl vphb device\n"); + return -ENODEV; + } + if (cxl_verbose) dump_cxl_config_space(dev); -- cgit v1.2.3