Avoid testing the masked bit via a magic value.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
struct {
u64 address;
u32 data;
- u32 ctrl;
+ u32 masked:1;
+ u32 reserved:31;
} __attribute__((packed)) field;
u32 raw[4];
/** @publicsection */
if (index >= device->info->num_msix_vectors)
goto invalid_access;
if (dword == MSIX_VECTOR_CTRL_DWORD) {
- mmio_write32(&device->msix_table[index].field.ctrl,
+ mmio_write32(&device->msix_table[index].raw[dword],
*value);
} else {
device->msix_vectors[index].raw[dword] = *value;
return true;
/* local mask */
- if (ive->device->msix_vectors[0].field.ctrl & 0x1)
+ if (ive->device->msix_vectors[0].field.masked)
return true;
/* PCI Bus Master */