Subject: too hasty...
To: None <port-pmax@NetBSD.ORG>
From: None <root@engg.ucalgary.ca>
List: port-pmax
Date: 11/10/1995 15:38:46
Oops.

I didn't wait for netbsd to link - here's another spot where DS5000
and DS3100 need to be played with... (I don't know if my patch fixes
the XXX that was written there or not).

Also, here's a patch that has full pathnames for the machdeps bug I
mentioned.

--Gord

-- 
   Gord Matzigkeit    |    This is my NetBSD development account
gord@engg.ucalgary.ca |  Please send mail to gord@enci.ucalgary.ca

--- /sys/arch/pmax/tc/tc.c.orig	Fri Oct 13 20:18:58 1995
+++ /sys/arch/pmax/tc/tc.c	Fri Nov 10 15:27:19 1995
@@ -153,26 +153,38 @@
 {
  /*XXX*/
 #ifdef	pmax
-	if (cpu == DS_3MAXPLUS) {
-		tc_enable_interrupt = kn03_enable_intr;
-		return &kn03_tc_desc;
-	} else if (cpu == DS_3MAX) {
-		tc_enable_interrupt = kn02_enable_intr;
-		return &kn02_tc_desc;
-	} else if (cpu == DS_3MIN) {
-		DPRINTF(("tcattach: 3MIN Turbochannel\n"));
-		tc_enable_interrupt = kmin_enable_intr;
-		return &kmin_tc_desc;
-	} else if (cpu == DS_MAXINE) {
-		DPRINTF(("MAXINE turbochannel\n"));
-		tc_enable_interrupt = xine_enable_intr;
-		return &xine_tc_desc;
-	} else if (cpu == DS_PMAX) {
-		DPRINTF(("tcattach: PMAX, no turbochannel\n"));
-		return NULL;
-	} else {
-		panic("tcattach: Unrecognized bus type 0x%x\n", cpu);
-	}
+  switch (cpu) {
+
+#ifdef DS5000_240
+  case DS_3MAXPLUS:
+    tc_enable_interrupt = kn03_enable_intr;
+    return &kn03_tc_desc;
+#endif /* DS5000_240 */
+
+#ifdef DS5000
+  case DS_3MAX:
+    tc_enable_interrupt = kn02_enable_intr;
+    return &kn02_tc_desc;
+
+  case DS_3MIN:
+    DPRINTF(("tcattach: 3MIN Turbochannel\n"));
+    tc_enable_interrupt = kmin_enable_intr;
+    return &kmin_tc_desc;
+
+  case DS_MAXINE:
+    DPRINTF(("MAXINE turbochannel\n"));
+    tc_enable_interrupt = xine_enable_intr;
+    return &xine_tc_desc;
+
+#endif /* DS5000 */
+
+  case DS_PMAX:
+    DPRINTF(("tcattach: PMAX, no turbochannel\n"));
+    return NULL;
+
+  default:
+    panic("tcattach: Unrecognized bus type 0x%x\n", cpu);
+  }
 
 #else  /* alpha?*/
 	return tc_cpu_devs[cputype];
--- /sys/arch/pmax/pmax/machdep.c.orig	Fri Nov 10 14:42:11 1995
+++ /sys/arch/pmax/pmax/machdep.c	Fri Nov 10 14:51:44 1995
@@ -168,12 +168,12 @@
 
 int	kn02_intr(), kmin_intr(), xine_intr();
 
-#ifdef DS3100
+#if defined(DS3100) || defined(DS5000)
 extern int	kn01_intr();
 void	kn01_enable_intr  __P ((u_int slotno,
 				int (*handler) __P ((intr_arg_t sc)),
 				intr_arg_t sc, int onoff));
-#endif /* DS3100 */
+#endif /* DS3100 || DS5000 */
 
 #ifdef DS5000_240
 int	kn03_intr();
@@ -1450,7 +1450,7 @@
 		return;
 	}
 
-#if defined(DEBUG) || defined(DIAGNOSTIC)
+#if defined(DS5000_240) && (defined(DEBUG) || defined(DIAGNOSTIC))
 	printf("3MIN: imask %x, %sabling slot %d, sc %x addr 0x%x\n",
 	       kn03_tc3_imask, (on? "en" : "dis"), slotno, sc, handler);
 #endif