svn commit: r361828 - head/sys/compat/linuxkpi/common/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Jun 5 08:12:09 UTC 2020
Author: hselasky
Date: Fri Jun 5 08:12:08 2020
New Revision: 361828
URL: https://svnweb.freebsd.org/changeset/base/361828
Log:
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.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Modified:
head/sys/compat/linuxkpi/common/include/linux/pci.h
Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/pci.h Fri Jun 5 07:57:16 2020 (r361827)
+++ head/sys/compat/linuxkpi/common/include/linux/pci.h Fri Jun 5 08:12:08 2020 (r361828)
@@ -657,7 +657,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-head
mailing list