Subject: Re: port-hpcarm/37227
To: None <port-hpcarm-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Peter Postma <peter@pointless.nl>
List: netbsd-bugs
Date: 11/06/2007 13:45:02
The following reply was made to PR port-hpcarm/37227; it has been noted by GNATS.
From: Peter Postma <peter@pointless.nl>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-hpcarm/37227
Date: Tue, 6 Nov 2007 14:41:36 +0100
--WIyZ46R2i8wDzkSu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
This patch seems to fix it.
--
Peter Postma
--WIyZ46R2i8wDzkSu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="sa11x1_pcic.diff"
Index: sa11x1_pcic.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/sa11x0/sa11x1_pcic.c,v
retrieving revision 1.16
diff -u -r1.16 sa11x1_pcic.c
--- sa11x1_pcic.c 17 Oct 2007 19:53:43 -0000 1.16
+++ sa11x1_pcic.c 6 Nov 2007 13:35:39 -0000
@@ -65,9 +65,25 @@
static int sacpcic_print(void *, const char *);
+static void
+sapcic_deferred(struct device *dev)
+{
+ struct sacpcic_softc *sc = (struct sacpcic_softc *)dev;
+ struct sacc_softc *psc = sc->sc_socket[0].pcictag_cookie;
+ int i;
+
+ for (i = 0; i < 2; i++) {
+ sapcic_kthread_create(&sc->sc_socket[i]);
+
+ sacc_intr_establish((sacc_chipset_tag_t)psc,
+ i ? IRQ_S1_CDVALID : IRQ_S0_CDVALID, IST_EDGE_RAISE,
+ IPL_BIO, sapcic_intr, &sc->sc_socket[i]);
+ }
+}
+
void
sacpcic_attach_common(struct sacc_softc *psc, struct sacpcic_softc *sc,
- void *aux, void (* socket_setup_hook)(struct sapcic_socket *))
+ void *aux, void (*socket_setup_hook)(struct sapcic_socket *))
{
int i;
struct pcmciabus_attach_args paa;
@@ -98,19 +114,9 @@
sc->sc_socket[i].pcmcia =
config_found_ia(&sc->sc_pc.sc_dev, "pcmciabus", &paa,
sacpcic_print);
-
- sacc_intr_establish((sacc_chipset_tag_t)psc,
- i ? IRQ_S1_CDVALID : IRQ_S0_CDVALID,
- IST_EDGE_RAISE, IPL_BIO, sapcic_intr,
- &sc->sc_socket[i]);
-
- /* create kthread */
- sapcic_kthread_create(&sc->sc_socket[i]);
-#if 0 /* XXX */
- /* establish_intr should be after creating the kthread */
- config_interrupt(&sc->sc_socket[i], sapcic_config_intr);
-#endif
}
+
+ config_interrupts((struct device *)sc, sapcic_deferred);
}
int
--WIyZ46R2i8wDzkSu--