summaryrefslogtreecommitdiffstats
path: root/drivers/vfio
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-04-18 12:42:58 -0600
committerBjorn Helgaas <bhelgaas@google.com>2013-04-24 11:35:56 -0600
commit508d1aa602ef0679a9cfc181ce918fbc4a2b3a45 (patch)
tree7910e14d9b7e1758669d831968829cc0c9b4d592 /drivers/vfio
parent2366d06eb15d3cf21d3b243ff586bcb80896c9f2 (diff)
downloadlinux-508d1aa602ef0679a9cfc181ce918fbc4a2b3a45.tar.gz
linux-508d1aa602ef0679a9cfc181ce918fbc4a2b3a45.tar.bz2
linux-508d1aa602ef0679a9cfc181ce918fbc4a2b3a45.zip
vfio-pci: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
PCI_MSIX_FLAGS_BIRMASK is mis-named because the BIR mask is in the Table Offset register, not the flags ("Message Control" per spec) register. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio')
-rw-r--r--drivers/vfio/pci/vfio_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index 8189cb6a86af..10626e825f41 100644
--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -78,8 +78,8 @@ static int vfio_pci_enable(struct vfio_pci_device *vdev)
pci_read_config_word(pdev, msix_pos + PCI_MSIX_FLAGS, &flags);
pci_read_config_dword(pdev, msix_pos + PCI_MSIX_TABLE, &table);
- vdev->msix_bar = table & PCI_MSIX_FLAGS_BIRMASK;
- vdev->msix_offset = table & ~PCI_MSIX_FLAGS_BIRMASK;
+ vdev->msix_bar = table & PCI_MSIX_TABLE_BIR;
+ vdev->msix_offset = table & PCI_MSIX_TABLE_OFFSET;
vdev->msix_size = ((flags & PCI_MSIX_FLAGS_QSIZE) + 1) * 16;
} else
vdev->msix_bar = 0xFF;