Subject: Re: -current on a 3100
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Michael L. Hitch <mhitch@lightning.oscs.montana.edu>
List: port-pmax
Date: 10/18/1998 19:08:05
On Oct 18,  5:34pm, Jonathan Stone wrote:
> >    Out of curiosity, has anybody else tried running a -current kernel
> >recently on their 3100?  I mentioned a week or two ago that my 3100 was
> >hanging in the SCSI autoconfiguration.  I did a new sup last night, and
> >built both my regular config and a GENERIC kernel with the new sources. 
> >Both lock up the machine at the same point.
> >
> >    If anybody has any thoughts / suggestions on what could be wrong
> >it'd be greatly appreciated.  I miss my DEC...  =)
> 
> Any news on this?  It sounds awfully similar to the problems Simon
> Burge and I had when trying to get the first 5100 to boot.

  I'm quite sure the problem is calling the wrong interrupt routine.
When the ibus stuff was added, the interrupt establishment was using the
"ia_cookie" value as an index into the table of interrupts.  Recently
the 3100 interrupt handler changed from direct calls to the device
interrupt routines to using the interrupt handler address in the table
indexed by the "slot number" of the device.  The problem is that
"ia_cookie" for the ibus devices is the interrupt priority, not the
slot number.

  The following patch seems to work, but I'm not certain if the
ibus_intr_establish() call should be using "ia_slot", or if "ia_cookie"
should be changed to be the slot number for the ibus devices.

Michael

diff -u /c/src/sys/arch/pmax/dev/dc_ds.c sys/arch/pmax/dev/dc_ds.c
--- /c/src/sys/arch/pmax/dev/dc_ds.c	Sun Apr 19 05:11:46 1998
+++ sys/arch/pmax/dev/dc_ds.c	Sat Oct  3 19:42:05 1998
@@ -102,6 +102,6 @@
 			0x0,
 			0, DCCOMM_PORT);
 
-	ibus_intr_establish((void*)iba->ia_cookie, IPL_TTY, dcintr, sc);
+	ibus_intr_establish((void*)iba->ia_slot, IPL_TTY, dcintr, sc);
 	printf("\n");
 }
diff -u /c/src/sys/arch/pmax/dev/sii_ds.c sys/arch/pmax/dev/sii_ds.c
--- /c/src/sys/arch/pmax/dev/sii_ds.c	Sun Apr 19 05:11:46 1998
+++ sys/arch/pmax/dev/sii_ds.c	Sat Oct  3 19:42:05 1998
@@ -114,7 +114,7 @@
 	siiattach(sc);
 
 	/* tie pseudo-slot to device */
-	ibus_intr_establish((void*)ia->ia_cookie, IPL_BIO, siiintr, sc);
+	ibus_intr_establish((void*)ia->ia_slot, IPL_BIO, siiintr, sc);
 	printf("\n");
 }
 
diff -u /c/src/sys/dev/tc/if_le_ibus.c sys/dev/tc/if_le_ibus.c
--- /c/src/sys/dev/tc/if_le_ibus.c	Wed Jul 22 05:17:57 1998
+++ sys/dev/tc/if_le_ibus.c	Sat Oct  3 19:41:40 1998
@@ -120,7 +120,7 @@
 	dec_le_common_attach(&lesc->sc_am7990, cp);
 
 	/* XXX more thought about ia->ia_cookie */
-	ibus_intr_establish((void*)ia->ia_cookie, TC_IPL_NET,
+	ibus_intr_establish((void*)ia->ia_slot, TC_IPL_NET,
 			  am7990_intr, sc);
 }
 

-- 
Michael L. Hitch			mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University	Bozeman, MT	USA