summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1999-03-16 17:56:13 +0000
committerderaadt <deraadt@openbsd.org>1999-03-16 17:56:13 +0000
commit9b81613122f3c104127b7c348b0791bf28f8bb24 (patch)
tree4987f59fb84d5b1bbeaf2b531f06ed6253257853
parentFix typo in 192.168 anti-spoofing rule; truman@research.suspicious.org (diff)
downloadwireguard-openbsd-9b81613122f3c104127b7c348b0791bf28f8bb24.tar.xz
wireguard-openbsd-9b81613122f3c104127b7c348b0791bf28f8bb24.zip
in match(), check for at least one drq
-rw-r--r--sys/dev/isa/sb_isapnp.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/sys/dev/isa/sb_isapnp.c b/sys/dev/isa/sb_isapnp.c
index 437277c0b1f..819bd71ae90 100644
--- a/sys/dev/isa/sb_isapnp.c
+++ b/sys/dev/isa/sb_isapnp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sb_isapnp.c,v 1.11 1999/03/08 11:17:08 deraadt Exp $ */
+/* $OpenBSD: sb_isapnp.c,v 1.12 1999/03/16 17:56:13 deraadt Exp $ */
/* $NetBSD: sb_isa.c,v 1.3 1997/03/20 11:03:11 mycroft Exp $ */
/*
@@ -75,6 +75,10 @@ sb_isapnp_match(parent, match, aux)
struct device *parent;
void *match, *aux;
{
+ struct isa_attach_args *ia = aux;
+
+ if (ia->ipa_ndrq < 1)
+ return 0;
return 1;
}
@@ -97,15 +101,15 @@ sb_isapnp_attach(parent, self, aux)
sc->sc_ic = ia->ia_ic;
sc->sc_drq8 = ia->ipa_drq[0].num;
- if (ia->ipa_ndrq > 1 && ia->ipa_drq[0].num != ia->ipa_drq[1].num) {
- /* Some cards have the 16 bit drq first */
- if (sc->sc_drq8 >= 4) {
- sc->sc_drq16 = sc->sc_drq8;
- sc->sc_drq8 = ia->ipa_drq[1].num;
- } else
- sc->sc_drq16 = ia->ipa_drq[1].num;
- } else
- sc->sc_drq16 = DRQUNK;
+ if (ia->ipa_ndrq > 1 && ia->ipa_drq[0].num != ia->ipa_drq[1].num) {
+ /* Some cards have the 16 bit drq first */
+ if (sc->sc_drq8 >= 4) {
+ sc->sc_drq16 = sc->sc_drq8;
+ sc->sc_drq8 = ia->ipa_drq[1].num;
+ } else
+ sc->sc_drq16 = ia->ipa_drq[1].num;
+ } else
+ sc->sc_drq16 = DRQUNK;
#if NMIDI > 0
if (ia->ipa_nio > 1) {
@@ -120,6 +124,6 @@ sb_isapnp_attach(parent, self, aux)
return;
}
- sc->sc_isa = parent->dv_parent;
+ sc->sc_isa = parent->dv_parent;
sbattach(sc);
}