diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2001-06-26 22:22:42 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2001-06-26 22:22:42 +0000 |
commit | c95fa6327327ab0777aee34e780c41145e0218e3 (patch) | |
tree | c8a3da048a4a2ca4e2bbd7b3b0c91555d2918f7b /sys/dev | |
parent | 376a471338068a62a27a7963b602e5e9bca70868 (diff) |
use pci_bus_maxdevs instead of nasty i386 specific goop (It's nice to
be able to bug art@ and matthieu@ in person =)
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index f8fa174c508..01cbb2556f7 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci.c,v 1.19 2001/06/24 16:15:56 matthieu Exp $ */ +/* $OpenBSD: pci.c,v 1.20 2001/06/26 22:22:41 jason Exp $ */ /* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */ /* @@ -408,7 +408,7 @@ pciioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) /* The i386 pci_make_tag function can panic if called with wrong args, try to avoid that */ if (io->pi_sel.pc_bus >= 256 || - io->pi_sel.pc_dev >= (pci_mode == 2 ? 32 : 16) || + io->pi_sel.pc_dev >= pci_bus_maxdevs(pc, io->pi_sel.pc_bus) || io->pi_sel.pc_func >= 8) { error = EINVAL; goto done; |