Date: Fri, 5 Jun 2020 08:12:09 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361828 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <202006050812.0558C9tD008527@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006050812.0558C9tD008527>