Skip to content

Commit 734ad6c

Browse files
yliu80wenlingz
authored andcommitted
hv: refine pci_read_cap and pci_read_ext_cap
The pci_read_cap and pci_read_ext_cap are used to enumerate PCI legacy capability and extended capability. Change the name pci_read_cap to pci_enumerate_cap Change the name pci_read_ext_cap to pci_enumerate_ext_cap Tracked-On: #4433 Signed-off-by: Yuan Liu <yuan1.liu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 76f2e28 commit 734ad6c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hypervisor/hw/pci.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ static inline uint32_t pci_pdev_get_nr_bars(uint8_t hdr_type)
521521
/**
522522
* @pre pdev != NULL
523523
*/
524-
static void pci_read_ext_cap(struct pci_pdev *pdev) {
524+
static void pci_enumerate_ext_cap(struct pci_pdev *pdev) {
525525

526526
uint32_t hdr, pos;
527527

@@ -546,7 +546,7 @@ static void pci_read_ext_cap(struct pci_pdev *pdev) {
546546
/*
547547
* @pre pdev != NULL
548548
*/
549-
static void pci_read_cap(struct pci_pdev *pdev)
549+
static void pci_enumerate_cap(struct pci_pdev *pdev)
550550
{
551551
uint8_t pos, cap;
552552
uint32_t msgctrl;
@@ -601,7 +601,7 @@ static void pci_read_cap(struct pci_pdev *pdev)
601601
}
602602

603603
if (is_pcie) {
604-
pci_read_ext_cap(pdev);
604+
pci_enumerate_ext_cap(pdev);
605605
}
606606
}
607607

@@ -637,7 +637,7 @@ struct pci_pdev *init_pdev(uint16_t pbdf, uint32_t drhd_index)
637637
}
638638

639639
if ((pci_pdev_read_cfg(bdf, PCIR_STATUS, 2U) & PCIM_STATUS_CAPPRESENT) != 0U) {
640-
pci_read_cap(pdev);
640+
pci_enumerate_cap(pdev);
641641
}
642642

643643
pdev->drhd_index = drhd_index;

0 commit comments

Comments
 (0)