[PATCH] mmc: core: fix wrong bit operation for SD card's au_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In SD spec, AU_SIZE and the value can be selected from 16KB.
But this code should be selected from 32KB.
I think right that shift (au + 3) instead of (au + 4).

Signed-off-by: Jaehoon Chung <jh80.chung@xxxxxxxxxxx>
Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
CC: Hyeonsu Kim <hyeonsu.kim@xxxxxxxxxxx>
---
 drivers/mmc/core/sd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 5017f93..85c7b39 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -245,7 +245,7 @@ static int mmc_read_ssr(struct mmc_card *card)
 	 */
 	au = UNSTUFF_BITS(ssr, 428 - 384, 4);
 	if (au > 0 || au <= 9) {
-		card->ssr.au = 1 << (au + 4);
+		card->ssr.au = 1 << (au + 3);
 		es = UNSTUFF_BITS(ssr, 408 - 384, 16);
 		et = UNSTUFF_BITS(ssr, 402 - 384, 6);
 		eo = UNSTUFF_BITS(ssr, 400 - 384, 2);
-- 
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux