Date: Thu, 18 Jun 2020 10:55:46 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362323 - stable/11/sys/compat/linuxkpi/common/include/linux Message-ID: <202006181055.05IAtkr8088598@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu Jun 18 10:55:46 2020 New Revision: 362323 URL: https://svnweb.freebsd.org/changeset/base/362323 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/11/sys/compat/linuxkpi/common/include/linux/pci.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/pci.h Thu Jun 18 10:53:40 2020 (r362322) +++ stable/11/sys/compat/linuxkpi/common/include/linux/pci.h Thu Jun 18 10:55:46 2020 (r362323) @@ -664,7 +664,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?202006181055.05IAtkr8088598>