diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-01-31 12:54:48 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-01-31 12:54:48 +0000 |
commit | fcfa21fc1c6eea52d2bb27de4fa8cd43b210a224 (patch) | |
tree | 4875cecc5f23d87009ce7eb3e92ea5760d7c521e /sys/dev | |
parent | 296ab6b55f4e0d15db76dfa37147bb16d9e4b226 (diff) |
Workaround for the problem where the SD card reader stops responding after
a card is ejected. Problem identified and patch provided by
Matthew R. Dempsky < mrd at alkemio dot org >:
> According to the Simplified SD Host Controller spec, this change
> shouldn't affect anything. All of the bits in the Software Reset
> register are labeled as ignoring 0-bit writes, and yet somehow it
> changes behavior.
This seems to reliably fix the problems seen on many X40 laptops.
Tested by many, OK beck@, "should be good to go" henning@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/sdmmc/sdhc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/sdmmc/sdhc.c b/sys/dev/sdmmc/sdhc.c index 90fc6eeb716..a45b82e607c 100644 --- a/sys/dev/sdmmc/sdhc.c +++ b/sys/dev/sdmmc/sdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdhc.c,v 1.16 2007/01/28 03:03:12 krw Exp $ */ +/* $OpenBSD: sdhc.c,v 1.17 2007/01/31 12:54:47 claudio Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -788,6 +788,7 @@ sdhc_soft_reset(struct sdhc_host *hp, int mask) if (!ISSET(HREAD1(hp, SDHC_SOFTWARE_RESET), mask)) break; sdmmc_delay(10000); + HWRITE1(hp, SDHC_SOFTWARE_RESET, 0); } if (timo == 0) { DPRINTF(1,("%s: timeout reg=%#x\n", HDEVNAME(hp), |