diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-17 19:44:48 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-23 11:50:30 -0400 |
commit | 527eee292d2ee69708a20b90049ef49bdeefc882 (patch) | |
tree | 6f6c95432644c8e9a63b76f24f7720d9f16b367f /drivers | |
parent | 909094c62e21c71c4fd122642512ad05b75fe019 (diff) |
PCI: Use msix_table_size() directly, drop multi_msix_capable()
The users of multi_msix_capable() are really interested in the table
size, so just say what we mean.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/msi.c | 7 | ||||
-rw-r--r-- | drivers/pci/msi.h | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index fb07e05a947b..06c5f6edb150 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -26,6 +26,9 @@ | |||
26 | 26 | ||
27 | static int pci_msi_enable = 1; | 27 | static int pci_msi_enable = 1; |
28 | 28 | ||
29 | #define msix_table_size(flags) ((flags & PCI_MSIX_FLAGS_QSIZE) + 1) | ||
30 | |||
31 | |||
29 | /* Arch hooks */ | 32 | /* Arch hooks */ |
30 | 33 | ||
31 | #ifndef arch_msi_check_device | 34 | #ifndef arch_msi_check_device |
@@ -681,7 +684,7 @@ static int msix_capability_init(struct pci_dev *dev, | |||
681 | pci_write_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, control); | 684 | pci_write_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, control); |
682 | 685 | ||
683 | /* Request & Map MSI-X table region */ | 686 | /* Request & Map MSI-X table region */ |
684 | base = msix_map_region(dev, multi_msix_capable(control)); | 687 | base = msix_map_region(dev, msix_table_size(control)); |
685 | if (!base) | 688 | if (!base) |
686 | return -ENOMEM; | 689 | return -ENOMEM; |
687 | 690 | ||
@@ -904,7 +907,7 @@ int pci_msix_table_size(struct pci_dev *dev) | |||
904 | return 0; | 907 | return 0; |
905 | 908 | ||
906 | pci_read_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, &control); | 909 | pci_read_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, &control); |
907 | return multi_msix_capable(control); | 910 | return msix_table_size(control); |
908 | } | 911 | } |
909 | 912 | ||
910 | /** | 913 | /** |
diff --git a/drivers/pci/msi.h b/drivers/pci/msi.h index d76c7b2c993c..df128309f837 100644 --- a/drivers/pci/msi.h +++ b/drivers/pci/msi.h | |||
@@ -9,7 +9,4 @@ | |||
9 | #define msi_mask_reg(base, is64bit) \ | 9 | #define msi_mask_reg(base, is64bit) \ |
10 | (base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32)) | 10 | (base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32)) |
11 | 11 | ||
12 | #define msix_table_size(control) ((control & PCI_MSIX_FLAGS_QSIZE)+1) | ||
13 | #define multi_msix_capable(control) msix_table_size((control)) | ||
14 | |||
15 | #endif /* MSI_H */ | 12 | #endif /* MSI_H */ |