On Tue, May 11, 2021 at 11:09:00PM +0800, Dongdong Liu wrote: > It will make sense to store the devcap2 value in the pci_dev structure > instead of reading Device Capabilities 2 Register multiple times. > So we add pci_init_devcap2() to get the value of devcap2, then use > cached devcap2 in the needed place. This looks sensible. Should the devcap field maybe grow a pcie_ prefix? What about caching PCI_EXP_DEVCAP as well while you're at it?