Re: PCI PF memory decode disable when sizing VF BARs

From: Eric Badger <eric.badger_at_compellent.com>
Date: Wed, 6 May 2015 13:58:31 -0500
On 05/06/15 13:33, John Baldwin wrote:
> On Wednesday, May 06, 2015 02:24:24 PM Ryan Stone wrote:
>> On Wed, May 6, 2015 at 11:45 AM, John Baldwin <jhb_at_freebsd.org> wrote:
>>
>>> There are some devices with BARs in non-standard locations. :( If there is
>>> a flag to just disable the VF bar decoding, then ideally we should just be
>>> doing that and leaving the global decoding flag alone while sizing the VF
>>> BAR.
>>>
>> Disabling SR-IOV BAR decoding in this function is currently redundant, as
>> it's already done in pci_iov.c, but I guess to keep the interface sane it
>> makes sense to do it here too.  Something like this then?
> Ah, sorry, I didn't know you did it in the caller already.  Perhaps
> then something more like your previous patch, but using the test you
> added here (PCIR_IS_IOV) instead of your previous check against BAR
> values to decide when to frob the command register?
>

Does the disabling of VF MSE in pci_iov_config actually protect anything 
else beyond what happens in pci_read_bar? I gave a read through which 
suggests "no", but I might have missed something. Just thinking that the 
code would be a bit more hardy if it were done the same way for both VFs 
and other devices.

Eric
Received on Wed May 06 2015 - 16:58:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:57 UTC