summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2007-01-31 12:54:47 +0000
committerclaudio <claudio@openbsd.org>2007-01-31 12:54:47 +0000
commit69c67381f0d136d2ec806c59120f957df625b5e5 (patch)
treec28f0442e117632a01a44d1114d5aa0c3c18d1dc
parentSwitch from strtoul() to strtonum() making the code easier to read. (diff)
downloadwireguard-openbsd-69c67381f0d136d2ec806c59120f957df625b5e5.tar.xz
wireguard-openbsd-69c67381f0d136d2ec806c59120f957df625b5e5.zip
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@
-rw-r--r--sys/dev/sdmmc/sdhc.c3
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),