svn commit: r362322 - stable/12/sys/compat/linuxkpi/common/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Jun 18 10:53:41 UTC 2020
Author: hselasky
Date: Thu Jun 18 10:53:40 2020
New Revision: 362322
URL: https://svnweb.freebsd.org/changeset/base/362322
Log:
MFC r361828:
Ensure pci_channel_offline() actually queries the PCI register space,
and not only the software cache of that register. Else
pci_channel_offline() won't detect that the PCI device is gone when
using the LinuxKPI.
Sponsored by: Mellanox Technologies
Modified:
stable/12/sys/compat/linuxkpi/common/include/linux/pci.h
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/compat/linuxkpi/common/include/linux/pci.h
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/include/linux/pci.h Thu Jun 18 10:52:51 2020 (r362321)
+++ stable/12/sys/compat/linuxkpi/common/include/linux/pci.h Thu Jun 18 10:53:40 2020 (r362322)
@@ -648,7 +648,7 @@ static inline int
pci_channel_offline(struct pci_dev *pdev)
{
- return (pci_get_vendor(pdev->dev.bsddev) == PCIV_INVALID);
+ return (pci_read_config(pdev->dev.bsddev, PCIR_VENDOR, 2) == PCIV_INVALID);
}
static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn)
More information about the svn-src-stable
mailing list