pci: Support DWORD/4-byte writes to the MSI-X control register

The PCI spec does not specify that the access has to be of a specific
size.

Fixes: #3714

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2022-02-17 10:07:49 +00:00
parent 0ee8ead53d
commit 9c6e7c4a4b

View File

@ -742,6 +742,11 @@ impl PciConfiguration {
.lock()
.unwrap()
.set_msg_ctl(LittleEndian::read_u16(data));
} else if msix_cap_reg_idx == reg_idx && offset == 0 && data.len() == 4 {
msix_config
.lock()
.unwrap()
.set_msg_ctl((LittleEndian::read_u32(data) >> 16) as u16);
}
}
}