[Skiboot] [PATCH 1/5] core/pci: Introduce separate function to initialize PCIe capability

Gavin Shan gwshan at linux.vnet.ibm.com
Tue Feb 7 10:02:42 AEDT 2017


On Mon, Feb 06, 2017 at 05:09:20PM +1100, Russell Currey wrote:
>On Fri, 2016-11-18 at 16:05 +1100, Gavin Shan wrote:
>> The logic initializing device's PCIe capability is resident in the
>> function pci_scan_one() from the day-one. It's because information
>
>This should just be "from day one" I think.
>

Your english is definitely better than mine. I will change it accordingly
in next respin.

>> (e.g. vendor/device IDs) aren't stored into PCI device instance in
>> old days. Now, the PCI device instance contains all information
>> required to initialize its PCIe capability and others.
>> 
>> This moves the logic initializing PCIe capability from pci_scan_one()
>> to separate functions, pci_init_capabilities() and pci_init_pcie_cap().
>> pci_scan_one() is simplified to make code maintaining a bit easier.
>> Also, it will allow us to intorduce separate functions to initialize other
>> capabilities as we're doing for PCIe capability.
>> 
>> This also exports pci_init_capabilities() so that it can be reused by
>> SRIOV VFs in future. No logical changes introduced by this.
>> 
>> Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
>> ---
>> 
>
>Reviewed-by: Russell Currey <ruscur at russell.cc>
>



More information about the Skiboot mailing list