aboutsummaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2017-08-23 16:50:10 +0000
committerMark Johnston <markj@FreeBSD.org>2017-08-23 16:50:10 +0000
commitc72fadf8f0a91986bb4e5dec8f725535c8955b2c (patch)
tree097300831455bfd9797fdbd0be38e60cf778a64c /sys/compat
parente8aba2eb21d2d143660956161018dd5eaf384f93 (diff)
downloadsrc-c72fadf8f0a91986bb4e5dec8f725535c8955b2c.tar.gz
src-c72fadf8f0a91986bb4e5dec8f725535c8955b2c.zip
Set the bus number field when attaching a PCI device.
MFC after: 1 week
Notes
Notes: svn path=/head/; revision=322816
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linuxkpi/common/src/linux_pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c
index 9220a2d90409..a1fc2461800b 100644
--- a/sys/compat/linuxkpi/common/src/linux_pci.c
+++ b/sys/compat/linuxkpi/common/src/linux_pci.c
@@ -167,6 +167,7 @@ linux_pci_attach(device_t dev)
if (pdev->bus == NULL) {
pbus = malloc(sizeof(*pbus), M_DEVBUF, M_WAITOK | M_ZERO);
pbus->self = pdev;
+ pbus->number = pci_get_bus(dev);
pdev->bus = pbus;
}