mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
hv: vpci: remove pci_msi_cap in pci_pdev
The MSI Message Address and Message Data have no valid data after Power-ON. So there's no need to initialize them by reading the data from physical PCI configuration space. Tracked-On: #3475 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -231,15 +231,7 @@ static void pci_read_cap(struct pci_pdev *pdev)
|
||||
if ((cap == PCIY_MSI) || (cap == PCIY_MSIX)) {
|
||||
offset = ptr;
|
||||
if (cap == PCIY_MSI) {
|
||||
pdev->msi.capoff = offset;
|
||||
msgctrl = pci_pdev_read_cfg(pdev->bdf, offset + PCIR_MSI_CTRL, 2U);
|
||||
len = ((msgctrl & PCIM_MSICTRL_64BIT) != 0U) ? 14U : 10U;
|
||||
pdev->msi.caplen = len;
|
||||
|
||||
/* Copy MSI capability struct into buffer */
|
||||
for (idx = 0U; idx < len; idx++) {
|
||||
pdev->msi.cap[idx] = (uint8_t)pci_pdev_read_cfg(pdev->bdf, offset + idx, 1U);
|
||||
}
|
||||
pdev->msi_capoff = offset;
|
||||
} else {
|
||||
pdev->msix.capoff = offset;
|
||||
pdev->msix.caplen = MSIX_CAPLEN;
|
||||
|
Reference in New Issue
Block a user