On 04/07/16 23:22, Ian Munsie wrote:
+static int setup_cxl_protocol_area(struct pci_dev *dev)
+{
+       u8 val;
+       int rc;
+       int vsec = find_cxl_vsec(dev);
+
+       if (!vsec) {
+               dev_info(&dev->dev, "CXL VSEC not found\n");
+               return -ENODEV;
+       }
+
+       rc = CXL_READ_VSEC_MODE_CONTROL(dev, vsec, &val);
+       if (rc) {
+               dev_err(&dev->dev, "Failed to read current mode control: %i\n", 
rc);
+               return rc;
+       }
+
+       if (!(val & CXL_VSEC_PROTOCOL_ENABLE)) {
+               dev_err(&dev->dev, "Card not in CAPI mode!\n");
+               return -EIO;
+       }
+
+       /* Still configure the protocol area for single mode cards */

This comment is extraneous and will be dropped in V2.

--
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnel...@au1.ibm.com  IBM Australia Limited

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to