Date: Thu, 31 May 2018 13:17:35 +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: r334429 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <201805311317.w4VDHZYC084861@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu May 31 13:17:34 2018 New Revision: 334429 URL: https://svnweb.freebsd.org/changeset/base/334429 Log: Implement support for the PCI_BUS_NUM() function macro in the LinuxKPI. Submitted by: Johannes Lundberg <johalun0@gmail.com> 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 Thu May 31 13:13:08 2018 (r334428) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Thu May 31 13:17:34 2018 (r334429) @@ -98,6 +98,7 @@ struct pci_device_id { #define PCI_DEVFN(slot, func) ((((slot) & 0x1f) << 3) | ((func) & 0x07)) #define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) #define PCI_FUNC(devfn) ((devfn) & 0x07) +#define PCI_BUS_NUM(devfn) (((devfn) >> 8) & 0xff) #define PCI_VDEVICE(_vendor, _device) \ .vendor = PCI_VENDOR_ID_##_vendor, .device = (_device), \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805311317.w4VDHZYC084861>