続々々々々 wd(4)

てな訳で src/sys/arch/arm/xscale/pxa2x0_pcic.c で attach 時のカードの probe/attach 処理をイベントスレッドの先頭に移動させてあげる事で解決。

Index: pxa2x0_pcic.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/xscale/pxa2x0_pcic.c,v
retrieving revision 1.5
diff -u -r1.5 pxa2x0_pcic.c
--- pxa2x0_pcic.c	29 Jan 2009 12:28:15 -0000	1.5
+++ pxa2x0_pcic.c	12 Feb 2009 15:16:19 -0000
@@ -335,7 +335,6 @@
 	struct pcmciabus_attach_args paa;
 	struct pxapcic_socket *so;
 	int s[PXAPCIC_NSLOT];
-	u_int cs;
 	int i;
 
 	printf(": %d slot%s\n", sc->sc_nslots, sc->sc_nslots < 2 ? "" : "s");
@@ -392,11 +391,6 @@
 		/* GPIO pin for interrupt */
 		so->irqpin = sc->sc_irqpin[s[i]];
 
-		/* If there's a card there, attach it. */
-		cs = (*so->pcictag->read)(so, PXAPCIC_CARD_STATUS);
-		if (cs == PXAPCIC_CARD_VALID)
-			pxapcic_attach_card(so);
-
 		if (kthread_create(PRI_NONE, 0, NULL, pxapcic_event_thread,
 		    so, &so->event_thread, "%s,%d", device_xname(sc->sc_dev),
 		    so->socket)) {
@@ -428,6 +422,11 @@
 	u_int cs;
 	int present;
 
+	/* If there's a card there, attach it. */
+	cs = (*sock->pcictag->read)(sock, PXAPCIC_CARD_STATUS);
+	if (cs == PXAPCIC_CARD_VALID)
+		pxapcic_attach_card(sock);
+
 	while (sock->sc->sc_shutdown == 0) {
 		(void) tsleep(sock, PWAIT, "pxapcicev", 0);
 
広告を非表示にする