Subject: Re: kern/31164
To: Hauke Fath <hf@spg.tu-darmstadt.de>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 11/17/2005 08:01:44
On Nov 17, 10:57am, hf@spg.tu-darmstadt.de (Hauke Fath) wrote:
-- Subject: Re: kern/31164

| I could either test changes, or lend mine. OTOH, used cards are 
| probably cheaper than shipping overseas.
| 

Can you try this? Someone (who wants to remain anonymous but is
always very helpful) said that it made his card work. Can you
please try both pieces of the patch and each separately. Also if
you can print before zeroing the iomask what the old iomask was
and the length?

christos

Index: aic_pcmcia.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pcmcia/aic_pcmcia.c,v
retrieving revision 1.32
diff -u -r1.32 aic_pcmcia.c
--- aic_pcmcia.c	4 Feb 2005 02:10:45 -0000	1.32
+++ aic_pcmcia.c	17 Nov 2005 03:42:26 -0000
@@ -106,6 +106,8 @@
 	    cfe->num_memspace != 0 ||
 	    cfe->num_iospace != 1)
 		return (EINVAL);
+
+	cfe->iomask = 0;			/* XXX: wrong */
 	return (0);
 }
 
@@ -201,7 +203,8 @@
 		}
 
 		/* Initialize only chip.  */
-		aic_init(&sc->sc_aic, 0);
+		if (sc->sc_state == AIC_PCMCIA_ATTACHED)
+			aic_init(&sc->sc_aic, 0);
 	} else {
 		pcmcia_function_disable(sc->sc_pf);
 		pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);