]> git.karo-electronics.de Git - linux-beck.git/commitdiff
vfio-pci: Enable PCIe extended capabilities on v1
authorAlex Williamson <alex.williamson@redhat.com>
Thu, 14 Feb 2013 17:45:31 +0000 (10:45 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 14 Feb 2013 17:45:31 +0000 (10:45 -0700)
Even PCIe 1.x had extended config space.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/vfio_pci_config.c

index 8b8f7d11e102108eb0195283281a928053bdd720..c975d91e1ccce7c54a60833061d3509d371e9a30 100644 (file)
@@ -985,12 +985,12 @@ static int vfio_cap_len(struct vfio_pci_device *vdev, u8 cap, u8 pos)
                if (ret)
                        return pcibios_err_to_errno(ret);
 
+               vdev->extended_caps = true;
+
                if ((word & PCI_EXP_FLAGS_VERS) == 1)
                        return PCI_CAP_EXP_ENDPOINT_SIZEOF_V1;
-               else {
-                       vdev->extended_caps = true;
+               else
                        return PCI_CAP_EXP_ENDPOINT_SIZEOF_V2;
-               }
        case PCI_CAP_ID_HT:
                ret = pci_read_config_byte(pdev, pos + 3, &byte);
                if (ret)