summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-07-15 03:35:24 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-07-15 03:35:24 +0000
commitfb1dde647c229716216c1926c627ab48008c2985 (patch)
treefb992ca5cea74a24287532c93d92114232972560 /sys/dev
parent8fb456f891a591ad793de43307a5dc3df4c87a8a (diff)
add PCI_BUS_NUM()
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/include/linux/pci.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/include/linux/pci.h b/sys/dev/pci/drm/include/linux/pci.h
index cf0ffcc6eea..055ca68ca27 100644
--- a/sys/dev/pci/drm/include/linux/pci.h
+++ b/sys/dev/pci/drm/include/linux/pci.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci.h,v 1.1 2019/04/14 10:14:53 jsg Exp $ */
+/* $OpenBSD: pci.h,v 1.2 2019/07/15 03:35:23 jsg Exp $ */
/*
* Copyright (c) 2015 Mark Kettenis
*
@@ -78,6 +78,7 @@ struct pci_dev {
#define PCI_DEVFN(slot, func) ((slot) << 3 | (func))
#define PCI_SLOT(devfn) ((devfn) >> 3)
#define PCI_FUNC(devfn) ((devfn) & 0x7)
+#define PCI_BUS_NUM(devfn) (((devfn) >> 8) & 0xff)
#define pci_dev_put(x)