diff options
| author | Bryan Venteicher <bryanv@FreeBSD.org> | 2014-06-16 04:16:31 +0000 |
|---|---|---|
| committer | Bryan Venteicher <bryanv@FreeBSD.org> | 2014-06-16 04:16:31 +0000 |
| commit | e026de111e220f8a6dbaec79681644fc167be33b (patch) | |
| tree | d9c2f27e54069d75c23a780df864d619a72fc6e9 /sys/dev | |
| parent | add526c6139253d5af21834b22fcef9e6357dc76 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/virtio/pci/virtio_pci.c | 3 | ||||
| -rw-r--r-- | sys/dev/virtio/pci/virtio_pci.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/virtio/pci/virtio_pci.c b/sys/dev/virtio/pci/virtio_pci.c index 497abc88363d..97fbc0b93824 100644 --- a/sys/dev/virtio/pci/virtio_pci.c +++ b/sys/dev/virtio/pci/virtio_pci.c @@ -170,6 +170,9 @@ static void vtpci_config_intr(void *); #define vtpci_setup_msi_interrupt vtpci_setup_legacy_interrupt +#define VIRTIO_PCI_CONFIG(_sc) \ + VIRTIO_PCI_CONFIG_OFF((((_sc)->vtpci_flags & VTPCI_FLAG_MSIX)) != 0) + /* * I/O port read/write wrappers. */ diff --git a/sys/dev/virtio/pci/virtio_pci.h b/sys/dev/virtio/pci/virtio_pci.h index 485cf4ff5b1c..f071ad638d4c 100644 --- a/sys/dev/virtio/pci/virtio_pci.h +++ b/sys/dev/virtio/pci/virtio_pci.h @@ -72,8 +72,7 @@ * The remaining space is defined by each driver as the per-driver * configuration space. */ -#define VIRTIO_PCI_CONFIG(sc) \ - (((sc)->vtpci_flags & VTPCI_FLAG_MSIX) ? 24 : 20) +#define VIRTIO_PCI_CONFIG_OFF(msix_enabled) ((msix_enabled) ? 24 : 20) /* * How many bits to shift physical queue address written to QUEUE_PFN. |
