]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Use function 0 VPD for identical functions, regular VPD for others
authorAlex Williamson <alex.williamson@redhat.com>
Wed, 16 Sep 2015 04:24:46 +0000 (22:24 -0600)
committerBjorn Helgaas <helgaas@kernel.org>
Thu, 24 Sep 2015 22:06:32 +0000 (17:06 -0500)
commit2764ebb8914ace0733a79a66bc9e212840d594d5
tree5ed4545d7fd11df195a195055ff0cdf43dcee378
parent9d3dc194e2a5a573781eba46dbcb7d96e0014125
PCI: Use function 0 VPD for identical functions, regular VPD for others

b84fe6712a22 ("PCI: Add dev_flags bit to access VPD through function 0")
added PCI_DEV_FLAGS_VPD_REF_F0.  Previously, we set the flag on every
non-zero function of quirked devices.  If a function turned out to be
different from function 0, i.e., it had a different class, vendor ID, or
device ID, the flag remained set but we didn't make VPD accessible at all.

Flip this around so we only set PCI_DEV_FLAGS_VPD_REF_F0 for functions that
are identical to function 0, and allow regular VPD access for any other
functions.

[bhelgaas: changelog, stable tag]
Fixes: b84fe6712a22 ("PCI: Add dev_flags bit to access VPD through function 0")
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <helgaas@kernel.org>
Acked-by: Myron Stowe <myron.stowe@redhat.com>
Acked-by: Mark Rustad <mark.d.rustad@intel.com>
CC: stable@vger.kernel.org
drivers/pci/access.c
drivers/pci/quirks.c