MMC: Do not set unsupported bits in OCR response
authorTimo Teras <timo.teras@solidboot.com>
Thu, 2 Nov 2006 18:43:27 +0000 (19:43 +0100)
committerPierre Ossman <drzeus@drzeus.cx>
Thu, 9 Nov 2006 06:23:54 +0000 (07:23 +0100)
The card might go to inactive state (according to specification), if
there are unsupported bits set in the OCR.

Signed-off-by: Timo Teras <timo.teras@solidboot.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/mmc.c

index ec8168ac75b1602a52e81380f3443ceab1d72082..766bc54406e5864111ded440d722eb694bd03d3d 100644 (file)
@@ -475,7 +475,7 @@ static u32 mmc_select_voltage(struct mmc_host *host, u32 ocr)
        if (bit) {
                bit -= 1;
 
        if (bit) {
                bit -= 1;
 
-               ocr = 3 << bit;
+               ocr &= 3 << bit;
 
                host->ios.vdd = bit;
                mmc_set_ios(host);
 
                host->ios.vdd = bit;
                mmc_set_ios(host);