diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-10-15 14:33:17 +0200 |
---|---|---|
committer | Jan Kiszka <jan.kiszka@siemens.com> | 2012-01-19 12:14:39 +0100 |
commit | 60ba3cc231d6bc7b802ad4fe6b6fc159ecb112e2 (patch) | |
tree | 7368fee5e23cc57ef5c6be971333e48432983c97 /hw/msi.c | |
parent | eab70139a6772f1735444d4f1daadc7bcfa7dc47 (diff) |
msi: Generalize msix_supported to msi_supported
Rename msix_supported to msi_supported and control MSI and MSI-X
activation this way. That was likely to original intention for this
flag, but MSI support came after MSI-X.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'hw/msi.c')
-rw-r--r-- | hw/msi.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -36,6 +36,9 @@ #define PCI_MSI_VECTORS_MAX 32 +/* Flag for interrupt controller to declare MSI/MSI-X support */ +bool msi_supported; + /* If we get rid of cap allocator, we won't need this. */ static inline uint8_t msi_cap_sizeof(uint16_t flags) { @@ -116,6 +119,11 @@ int msi_init(struct PCIDevice *dev, uint8_t offset, uint16_t flags; uint8_t cap_size; int config_offset; + + if (!msi_supported) { + return -ENOTSUP; + } + MSI_DEV_PRINTF(dev, "init offset: 0x%"PRIx8" vector: %"PRId8 " 64bit %d mask %d\n", |