svn commit: r334429 - head/sys/compat/linuxkpi/common/include/linux

Hans Petter Selasky hselasky at FreeBSD.org
Thu May 31 13:17:35 UTC 2018


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 at 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),	\


More information about the svn-src-head mailing list