diff mbox

[1/2] fbsd-device: Fix fbsd-device backend on DragonFly BSD.

Message ID CAE5pWrnsc0a5ED14Q9iOOmVZt0ZsguddG78KuYKzVKo1Mk-ihQ@mail.gmail.com
State Not Applicable
Headers show

Commit Message

Imre Vadász July 14, 2017, 9:12 p.m. UTC
DragonFly also supports PCI domains same as FreeBSD.

Signed-off-by: Imre Vadász <imrevdsz@gmail.com>
---
 lib/fbsd-device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
2.12.1
diff mbox

Patch

diff --git a/lib/fbsd-device.c b/lib/fbsd-device.c
index ab04954..398fe68 100644
--- a/lib/fbsd-device.c
+++ b/lib/fbsd-device.c
@@ -77,7 +77,7 @@  fbsd_read(struct pci_dev *d, int pos, byte *buf, int len)
   if (pos >= 256)
     return 0;

-#if __FreeBSD_version >= 700053
+#if __FreeBSD_version >= 700053 || defined(__DragonFly__)
   pi.pi_sel.pc_domain = d->domain;
 #endif
   pi.pi_sel.pc_bus = d->bus;
@@ -120,7 +120,7 @@  fbsd_write(struct pci_dev *d, int pos, byte *buf, int len)
   if (pos >= 256)
     return 0;

-#if __FreeBSD_version >= 700053
+#if __FreeBSD_version >= 700053 || defined(__DragonFly__)
   pi.pi_sel.pc_domain = d->domain;
 #endif
   pi.pi_sel.pc_bus = d->bus;