Re: [PATCH] PCI: Relax function 0 VPD test and relocate

From: Rustad, Mark D
Date: Wed Sep 23 2015 - 15:16:32 EST



> On Sep 15, 2015, at 9:24 PM, Alex Williamson <alex.williamson@xxxxxxxxxx> wrote:
>
> When we quirk a device with PCI_DEV_FLAGS_VPD_REF_F0 we're expecting
> to find a device where all the functions are identical. If we don't
> find that, we don't make VPD accessible through pci_vpd_ops. That
> means that if we quirk devices we shouldn't, we filter them out by
> hiding VPD entirely rather than allowing default access. Instead, we
> can flip this around to only quirk devices that match a slightly more
> rigorous test in the quirk, allowing regular access for anything else.
>
> Tests for the multifunction flag are removed since a) function 0 and
> the function under test are clearly a multifunction device if we're
> scanning a non-zero function in the same slot and b) at this point the
> flag is only set in the device under test if the multifunction bit is
> set in the PCI HEADER, which is a point of interpretation for the PCI
> spec.
>
> Signed-off-by: Alex Williamson <alex.williamson@xxxxxxxxxx>
> ---
>
> This is potentially another stable candiate since we're continuing to
> iterate on 932c435caba8, but since we don't actually know of a device
> where VPD is blocked (we don't think my Skylake example actually
> supports VPD), I'm not including it. I would support it if requested
> though.

This looks good to me. I can't really test the cases it addresses, but it seems reasonable.
Acked-by: Mark Rustad <mark.d.rustad@xxxxxxxxx>

--
Mark Rustad, Networking Division, Intel Corporation

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail