aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/vfio/pci/vfio_pci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index 10626e825f41..05afe883f038 100644
--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -70,7 +70,7 @@ static int vfio_pci_enable(struct vfio_pci_device *vdev)
70 pci_write_config_word(pdev, PCI_COMMAND, cmd); 70 pci_write_config_word(pdev, PCI_COMMAND, cmd);
71 } 71 }
72 72
73 msix_pos = pci_find_capability(pdev, PCI_CAP_ID_MSIX); 73 msix_pos = pdev->msix_cap;
74 if (msix_pos) { 74 if (msix_pos) {
75 u16 flags; 75 u16 flags;
76 u32 table; 76 u32 table;
@@ -183,7 +183,7 @@ static int vfio_pci_get_irq_count(struct vfio_pci_device *vdev, int irq_type)
183 u8 pos; 183 u8 pos;
184 u16 flags; 184 u16 flags;
185 185
186 pos = pci_find_capability(vdev->pdev, PCI_CAP_ID_MSI); 186 pos = vdev->pdev->msi_cap;
187 if (pos) { 187 if (pos) {
188 pci_read_config_word(vdev->pdev, 188 pci_read_config_word(vdev->pdev,
189 pos + PCI_MSI_FLAGS, &flags); 189 pos + PCI_MSI_FLAGS, &flags);
@@ -194,7 +194,7 @@ static int vfio_pci_get_irq_count(struct vfio_pci_device *vdev, int irq_type)
194 u8 pos; 194 u8 pos;
195 u16 flags; 195 u16 flags;
196 196
197 pos = pci_find_capability(vdev->pdev, PCI_CAP_ID_MSIX); 197 pos = vdev->pdev->msix_cap;
198 if (pos) { 198 if (pos) {
199 pci_read_config_word(vdev->pdev, 199 pci_read_config_word(vdev->pdev,
200 pos + PCI_MSIX_FLAGS, &flags); 200 pos + PCI_MSIX_FLAGS, &flags);