svn commit: r334770 - stable/11/sys/compat/linuxkpi/common/include/linux

Hans Petter Selasky hselasky at FreeBSD.org
Thu Jun 7 07:49:19 UTC 2018


Author: hselasky
Date: Thu Jun  7 07:49:18 2018
New Revision: 334770
URL: https://svnweb.freebsd.org/changeset/base/334770

Log:
  MFC r334429:
  Implement support for the PCI_BUS_NUM() function macro in the LinuxKPI.
  
  Submitted by:	Johannes Lundberg <johalun0 at gmail.com>
  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  7 07:48:50 2018	(r334769)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/pci.h	Thu Jun  7 07:49:18 2018	(r334770)
@@ -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-stable-11 mailing list