Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/atari/isa Nuke a cf_unit abuse.
details: https://anonhg.NetBSD.org/src/rev/ce573e64f12c
branches: trunk
changeset: 501809:ce573e64f12c
user: leo <leo%NetBSD.org@localhost>
date: Sun Jan 07 21:17:32 2001 +0000
description:
Nuke a cf_unit abuse.
diffstat:
sys/arch/atari/isa/isa_machdep.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 5cc528ea3462 -r ce573e64f12c sys/arch/atari/isa/isa_machdep.c
--- a/sys/arch/atari/isa/isa_machdep.c Sun Jan 07 21:12:31 2001 +0000
+++ b/sys/arch/atari/isa/isa_machdep.c Sun Jan 07 21:17:32 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.c,v 1.19 2000/06/29 08:28:25 mrg Exp $ */
+/* $NetBSD: isa_machdep.c,v 1.20 2001/01/07 21:17:32 leo Exp $ */
/*
* Copyright (c) 1997 Leo Weppelman. All rights reserved.
@@ -70,11 +70,24 @@
struct cfdata *cfp;
void *auxp;
{
+ static int nmatched = 0;
+
+ if (strcmp((char *)auxp, "isabus"))
+ return (0); /* Wrong number... */
+
if(atari_realconfig == 0)
return (0);
- if (strcmp((char *)auxp, "isabus") || cfp->cf_unit != 0)
- return(0);
- return(machineid & ATARI_HADES ? 1 : 0);
+
+ if (machineid & (ATARI_HADES|ATARI_MILAN)) {
+ /*
+ * The Hades and Milan have only one pci bus
+ */
+ if (nmatched)
+ return (0);
+ nmatched++;
+ return (1);
+ }
+ return(0);
}
void
Home |
Main Index |
Thread Index |
Old Index