diff options
author | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1998-09-20 23:03:05 +0000 |
---|---|---|
committer | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1998-09-20 23:03:05 +0000 |
commit | 7c239579d2aa65a3bcd5a54b4749257ae616dddc (patch) | |
tree | 7d7c706a701ba039ffac10abaefb5b0ffeefdcde /sys/dev | |
parent | 6546b5961d52840b5a9d454ddb5170b111d2afdc (diff) |
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).
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ofw/ofbus.c | 19 |
1 files changed, 16 insertions, 3 deletions
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)) { /* |