Subject: Re: Nell PCMCIA/PRISM-II on Voyager
To: David Passmore <dpassmor@sneakers.org>
From: Martin Husemann <martin@duskware.de>
List: port-sparc
Date: 04/23/2002 09:07:40
--pWyiEgJYm5f9v55/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Can you get a CIS dump from the non-working card? Can you try it in another
NetBSD machine?

For the CIS dump you would add "options PCMCIACISDEBUG", boot into ddb
and "w pcmciacis_debug 1" (IIRC).

And can you try the attached patch? (hope it compiles, but you'll get the idea)

Martin

--pWyiEgJYm5f9v55/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch

Index: stp4020.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/sbus/stp4020.c,v
retrieving revision 1.22
diff -u -r1.22 stp4020.c
--- stp4020.c	2002/03/25 09:02:54	1.22
+++ stp4020.c	2002/04/23 07:05:50
@@ -535,10 +535,12 @@
 	 */
 	for (i = 0 ; i < STP4020_NSOCK; i++) {
 		struct stp4020_socket *h;
-		int v, cd_change = 0;
+		int s, v, cd_change = 0;
 
 		h = &sc->sc_socks[i];
 
+		s = splhigh();
+
 		/* Read socket's ISR0 for the interrupt status bits */
 		v = stp4020_rd_sockctl(h, STP4020_ISR0_IDX);
 
@@ -553,6 +555,8 @@
 
 		/* Ack all interrupts at once */
 		stp4020_wr_sockctl(h, STP4020_ISR0_IDX, STP4020_ISR0_ALL_STATUS_IRQ);
+
+		splx(s);
 
 		if ((v & STP4020_ISR0_CDCHG) != 0) {
 			/*

--pWyiEgJYm5f9v55/--