summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccard
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2006-08-09 00:05:54 +0000
committerimp <imp@FreeBSD.org>2006-08-09 00:05:54 +0000
commitf29929e962e9d900221a2007f70388b425cd6b9c (patch)
tree5f0ecb15532055f30c224212e9f802478ea36dd6 /sys/dev/pccard
parente4aeb824edb92dc2f2c3508d8f32e6fd375644ad (diff)
downloadFreeBSD-src-f29929e962e9d900221a2007f70388b425cd6b9c.zip
FreeBSD-src-f29929e962e9d900221a2007f70388b425cd6b9c.tar.gz
Thomas Wintergerst reports that when this tsleep went away, certain
cards stopped working. Specifically the AVM B1 PCMCIA Card no longer detected. Its CIS chain read back as all FF's. Putting the delay back solves those problems. I've opted to put in a much shorter delay because as far as I can tell, no delay is really needed here. We'll see how well this works in practice.
Diffstat (limited to 'sys/dev/pccard')
-rw-r--r--sys/dev/pccard/pccard_cis.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c
index ce2c23d..b912a20 100644
--- a/sys/dev/pccard/pccard_cis.c
+++ b/sys/dev/pccard/pccard_cis.c
@@ -94,6 +94,16 @@ pccard_read_cis(struct pccard_softc *sc)
STAILQ_INIT(&state.card->pf_head);
state.pf = NULL;
+ /*
+ * XXX The following shouldn't be needed, but some slow cards
+ * XXX seem to need it still. Need to investigate if there's
+ * XXX a way to tell if the card is 'ready' or not rather than
+ * XXX sleeping like this. We're called just after the power
+ * XXX up of the socket. The standard timing diagrams don't
+ * XXX seem to indicate that a delay is required. The old
+ * XXX delay was 1s. This delay is .1s.
+ */
+ tsleep(&state, 0, "pccard", hz / 10);
if (pccard_scan_cis(device_get_parent(sc->dev), sc->dev,
pccard_parse_cis_tuple, &state) == -1)
state.card->error++;
OpenPOWER on IntegriCloud