aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2013-02-14 12:45:31 -0500
committerAlex Williamson <alex.williamson@redhat.com>2013-02-14 12:45:31 -0500
commit5641ade41f7c7d16e614e25ce3315e04f1bacd33 (patch)
tree8d6376bc106dfaceacc1b42ab4c8a43429bcc8a5
parent323a72d83c9b2963bd1e46c8e6963e468d4658d7 (diff)
vfio-pci: Enable PCIe extended capabilities on v1
Even PCIe 1.x had extended config space. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
-rw-r--r--drivers/vfio/pci/vfio_pci_config.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/vfio/pci/vfio_pci_config.c b/drivers/vfio/pci/vfio_pci_config.c
index 8b8f7d11e102..c975d91e1ccc 100644
--- a/drivers/vfio/pci/vfio_pci_config.c
+++ b/drivers/vfio/pci/vfio_pci_config.c
@@ -985,12 +985,12 @@ static int vfio_cap_len(struct vfio_pci_device *vdev, u8 cap, u8 pos)
985 if (ret) 985 if (ret)
986 return pcibios_err_to_errno(ret); 986 return pcibios_err_to_errno(ret);
987 987
988 vdev->extended_caps = true;
989
988 if ((word & PCI_EXP_FLAGS_VERS) == 1) 990 if ((word & PCI_EXP_FLAGS_VERS) == 1)
989 return PCI_CAP_EXP_ENDPOINT_SIZEOF_V1; 991 return PCI_CAP_EXP_ENDPOINT_SIZEOF_V1;
990 else { 992 else
991 vdev->extended_caps = true;
992 return PCI_CAP_EXP_ENDPOINT_SIZEOF_V2; 993 return PCI_CAP_EXP_ENDPOINT_SIZEOF_V2;
993 }
994 case PCI_CAP_ID_HT: 994 case PCI_CAP_ID_HT:
995 ret = pci_read_config_byte(pdev, pos + 3, &byte); 995 ret = pci_read_config_byte(pdev, pos + 3, &byte);
996 if (ret) 996 if (ret)