cxl: Report the tunneled operations status
[linux-2.6-block.git] / drivers / misc / cxl / pci.c
index 4eb893284af28dea13f39992ef79bd1693bac1e7..4d6736f9d46399b0ea2f1336404acd041af91c86 100644 (file)
@@ -1742,9 +1742,14 @@ static int cxl_configure_adapter(struct cxl *adapter, struct pci_dev *dev)
        /* Required for devices using CAPP DMA mode, harmless for others */
        pci_set_master(dev);
 
-       if (cxl_is_power9())
+       adapter->tunneled_ops_supported = false;
+
+       if (cxl_is_power9()) {
                if (pnv_pci_set_tunnel_bar(dev, 0x00020000E0000000ull, 1))
                        dev_info(&dev->dev, "Tunneled operations unsupported\n");
+               else
+                       adapter->tunneled_ops_supported = true;
+       }
 
        if ((rc = pnv_phb_to_cxl_mode(dev, adapter->native->sl_ops->capi_mode)))
                goto err;