Re: [PATCH V3 2/2] PCI: handle CRS returned by device after FLR

From: Sinan Kaya
Date: Wed Mar 01 2017 - 12:50:46 EST


On 2/21/2017 9:37 PM, Sinan Kaya wrote:
>> SR-IOV spec rev 1.1, 3.4.1.1 & 3.4.1.2, Vendor ID and Device ID fields
>> for the VF return 0xFFFF when read. The "Virtualization Intermediary"
>> is supposed to use the vendor ID from the PF and the device ID defined
>> in the PF SR-IOV capability.
>
> Interesting. Since lspci was showing the correct vendor id and device id, I
> assumed that it is coming from offset 0.
>
> Maybe, the right thing is to figure out if this is a virtual function or not.
> If it is a physical function, check the CRS first before reading the command
> register in the existing loop.
>
>

I went back and read the spec for CRS in FLR case one more time. We are required
to wait up to 1 seconds if the device is sending CRS. The current code seems to
be already handling this delay.



--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.