Module Name:    src
Committed By:   jakllsch
Date:           Mon Dec 24 06:09:50 UTC 2012

Modified Files:
        src/sys/dev/sdmmc: sdhc.c

Log Message:
SDHC_VOLTAGE_SUPP_1_8V is only valid in the presence of SDHC_EMBEDDED_SLOT.
Fixes probing of full-size 1GB Toshiba card made in 2008 that fails to
respond with a 1.8V supply.  (JMB389 (in TS-RDF1) host claims
SDHC_VOLTAGE_SUPP_1_8V but does not claim SDHC_EMBEDDED_SLOT.)


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/sdmmc/sdhc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.39 src/sys/dev/sdmmc/sdhc.c:1.40
--- src/sys/dev/sdmmc/sdhc.c:1.39	Sun Dec 23 22:33:09 2012
+++ src/sys/dev/sdmmc/sdhc.c	Mon Dec 24 06:09:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc.c,v 1.39 2012/12/23 22:33:09 jakllsch Exp $	*/
+/*	$NetBSD: sdhc.c,v 1.40 2012/12/24 06:09:50 jakllsch Exp $	*/
 /*	$OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.39 2012/12/23 22:33:09 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.40 2012/12/24 06:09:50 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -350,7 +350,8 @@ sdhc_host_found(struct sdhc_softc *sc, b
 	/*
 	 * Determine SD bus voltage levels supported by the controller.
 	 */
-	if (ISSET(caps, SDHC_VOLTAGE_SUPP_1_8V)) {
+	if (ISSET(caps, SDHC_EMBEDDED_SLOT) &&
+	    ISSET(caps, SDHC_VOLTAGE_SUPP_1_8V)) {
 		SET(hp->ocr, MMC_OCR_1_7V_1_8V | MMC_OCR_1_8V_1_9V);
 	}
 	if (ISSET(caps, SDHC_VOLTAGE_SUPP_3_0V)) {

Reply via email to