diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-18 14:42:58 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-24 13:35:56 -0400 |
commit | 508d1aa602ef0679a9cfc181ce918fbc4a2b3a45 (patch) | |
tree | 7910e14d9b7e1758669d831968829cc0c9b4d592 /drivers | |
parent | 2366d06eb15d3cf21d3b243ff586bcb80896c9f2 (diff) |
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')
-rw-r--r-- | drivers/vfio/pci/vfio_pci.c | 4 |
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) | |||
78 | pci_read_config_word(pdev, msix_pos + PCI_MSIX_FLAGS, &flags); | 78 | pci_read_config_word(pdev, msix_pos + PCI_MSIX_FLAGS, &flags); |
79 | pci_read_config_dword(pdev, msix_pos + PCI_MSIX_TABLE, &table); | 79 | pci_read_config_dword(pdev, msix_pos + PCI_MSIX_TABLE, &table); |
80 | 80 | ||
81 | vdev->msix_bar = table & PCI_MSIX_FLAGS_BIRMASK; | 81 | vdev->msix_bar = table & PCI_MSIX_TABLE_BIR; |
82 | vdev->msix_offset = table & ~PCI_MSIX_FLAGS_BIRMASK; | 82 | vdev->msix_offset = table & PCI_MSIX_TABLE_OFFSET; |
83 | vdev->msix_size = ((flags & PCI_MSIX_FLAGS_QSIZE) + 1) * 16; | 83 | vdev->msix_size = ((flags & PCI_MSIX_FLAGS_QSIZE) + 1) * 16; |
84 | } else | 84 | } else |
85 | vdev->msix_bar = 0xFF; | 85 | vdev->msix_bar = 0xFF; |