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:
Li, Fei1
2019-10-12 17:46:21 +08:00
committed by wenlingz
parent b1e43b4454
commit 0dac373d93
3 changed files with 6 additions and 40 deletions

View File

@@ -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;