diff options
author | 1998-09-20 23:03:03 +0000 | |
---|---|---|
committer | 1998-09-20 23:03:03 +0000 | |
commit | 2b4ee7e377c20edd8dce798dc07911b026191989 (patch) | |
tree | 5de49e11daf586a3139bc063b3978dc4cdc3efda | |
parent | import of learn-doc (diff) | |
download | wireguard-openbsd-2b4ee7e377c20edd8dce798dc07911b026191989.tar.xz wireguard-openbsd-2b4ee7e377c20edd8dce798dc07911b026191989.zip |
Change openfirmware to not try to configure a device on sd or wd
disks if those drivers are in the kernel. This allows the use
of ofdisk0 for floppy support. (until fd.c is supported).
-rw-r--r-- | sys/arch/powerpc/conf/MIX | 2 | ||||
-rw-r--r-- | sys/dev/ofw/ofbus.c | 19 |
2 files changed, 17 insertions, 4 deletions
diff --git a/sys/arch/powerpc/conf/MIX b/sys/arch/powerpc/conf/MIX index d88f73c39a6..50b73b75109 100644 --- a/sys/arch/powerpc/conf/MIX +++ b/sys/arch/powerpc/conf/MIX @@ -80,7 +80,7 @@ cd* at scsibus? target ? lun ? ofbus* at openfirm? -#ofdisk* at openfirm? +ofdisk* at openfirm? #ofnet* at openfirm? #ipkdbif0 at ofnet? diff --git a/sys/dev/ofw/ofbus.c b/sys/dev/ofw/ofbus.c index 85c93c2e49a..fceaae1b837 100644 --- a/sys/dev/ofw/ofbus.c +++ b/sys/dev/ofw/ofbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofbus.c,v 1.4 1998/09/09 04:25:52 rahnds Exp $ */ +/* $OpenBSD: ofbus.c,v 1.5 1998/09/20 23:03:03 rahnds Exp $ */ /* $NetBSD: ofbus.c,v 1.3 1996/10/13 01:38:11 christos Exp $ */ /* @@ -38,6 +38,10 @@ #include <machine/autoconf.h> #include <dev/ofw/openfirm.h> +/* a bit of a hack to prevent conflicts between ofdisk and sd/wd */ +#include "sd.h" +#include "wd.h" + int ofrprobe __P((struct device *, void *, void *)); void ofrattach __P((struct device *, struct device *, void *)); int ofbprobe __P((struct device *, void *, void *)); @@ -176,10 +180,19 @@ ofbattach(parent, dev, aux) */ units = 1; if (OF_getprop(ofp->phandle, "name", name, sizeof name) > 0) { - if (!strcmp(name, "scsi")) + if (!strcmp(name, "scsi")) { +#if NSD > 0 + units = 0; /* if sd driver in kernel, dont use ofw */ +#else units = 7; /* What about wide or hostid != 7? XXX */ - else if (!strcmp(name, "ide")) +#endif + } else if (!strcmp(name, "ide")) { +#if NWD > 0 + units = 0; /* if wd driver in kernel, dont use ofw */ +else units = 2; +#endif + } } for (child = OF_child(ofp->phandle); child; child = OF_peer(child)) { /* |