Subject: Re: Ultra 30 almost working
To: None <cg2v+@andrew.cmu.edu, port-sparc64@netbsd.org>
From: None <eeh@netbsd.org>
List: port-sparc64
Date: 12/13/2001 00:33:36
| Excerpts from internet.computing.netbsd.port-sparc64: 9-Dec-101 Re:
| Ultra 30 almost working by eeh@netbsd.org 
| > ff 1fe.0000.1a00 15 spacex!
| Doing this (when ofwboot.net is prparing to load the kernel; since I
| have a serial console, I can't break into the prom once the kernel has
| started.) causes the scsi problems I was having on my Ultra 60 to go
| away. Yay. it's time to try installing a snapshot. 

Since this fix seems to affect quite a few more machines than just
U30s, I'll try to get a fix in now.  Please try out the following 
patch to verify that it works and does not cause any other problems
on machines with psycho and psycho+ PCI controllers:

Index: psycho.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc64/dev/psycho.c,v
retrieving revision 1.39
diff -p -u -r1.39 psycho.c
--- psycho.c    2001/10/07 20:30:41     1.39
+++ psycho.c    2001/12/13 00:29:39
@@ -487,6 +487,18 @@ found:
                if (PROM_getproplen(sc->sc_node, "no-streaming-cache") >= 0)
                        sc->sc_is->is_sb[1] = &pci_ctl->pci_strbuf;
                iommu_reset(sc->sc_is);
+
+               /*
+                * Apparently the kernel is spending too much time in nucleus
+                * mode with interrupts disabled and a number of machines with
+                * psycho and psycho+ controllers are losing interrupts.
+                * We'll try setting the interrupt retry timeout to a larger
+                * value for the monent, which seems to help alleviate this
+                * problem until the trap handlers can be revamped.
+                */
+               bus_space_write_8(sc->sc_bustag,
+                       (bus_space_handle_t)
+                       (u_long)&sc->sc_regs->intr_retry_timer, 0, 0xff);
        }
 
        /*