Skip to contentSkip to conversation

mmc: core: fix the critical bug for multiple block read

PATCH In review Jaehoon Chung 2 participants 3 messages Oct 31, 2011 – Nov 1, 2011 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: core: fix the critical bug for multiple block read

This patch is fixed the critical bug for multiple block read.

In Paul's patch(commit:6d621423128909f09072835445ce36dd357a758a), used MMC_CAP2_NO_MULTI_READ. But that value was assigned host->mmc->caps.

MMC_CAPS2_NO_MULTI_READ must assign host->mmc->caps2 instead of host->mmc->caps.

---
 drivers/mmc/card/block.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/card/block.c +1 -1
index 4fd5723..1882149 100644
@@ -1037,7 +1037,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
 			brq->data.blocks = 1;
 
 		/* Some controllers can't do multiblock reads due to hw bugs */
-		if (card->host->caps & MMC_CAP2_NO_MULTI_READ &&
+		if (card->host->caps2 & MMC_CAP2_NO_MULTI_READ &&
 		    rq_data_dir(req) == READ)
 			brq->data.blocks = 1;
 	}
#1 lore raw

Sorry card->host->caps instead of host->mmc->caps.(typo)

Quoted 31 lines · Jaehoon Chung

This patch is fixed the critical bug for multiple block read.

In Paul's patch(commit:6d621423128909f09072835445ce36dd357a758a), used MMC_CAP2_NO_MULTI_READ. But that value was assigned card->host->caps.

MMC_CAPS2_NO_MULTI_READ must assign card->host->caps2 instead of card->host->caps.

---
 drivers/mmc/card/block.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/card/block.c +1 -2
index 4fd5723..1882149 100644
@@ -1037,7 +1037,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
 			brq->data.blocks = 1;
 
 		/* Some controllers can't do multiblock reads due to hw bugs */
-		if (card->host->caps & MMC_CAP2_NO_MULTI_READ &&
+		if (card->host->caps2 & MMC_CAP2_NO_MULTI_READ &&
 		    rq_data_dir(req) == READ)
 			brq->data.blocks = 1;
 	}
--

To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to Jaehoon Chung

Hi,

Quoted 6 lines · Jaehoon Chung
drivers/mmc/card/block.c +0 -0
index 4fd5723..1882149 100644

drivers/mmc/card/block.c static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, · line 1043

Quoted 8 lines
drivers/mmc/card/block.c +1 -1
@@ -1037,7 +1037,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
 			brq->data.blocks = 1;
 
 		/* Some controllers can't do multiblock reads due to hw bugs */
-		if (card->host->caps & MMC_CAP2_NO_MULTI_READ &&
+		if (card->host->caps2 & MMC_CAP2_NO_MULTI_READ &&
 		    rq_data_dir(req) == READ)
 			brq->data.blocks = 1;
 	}

Already fixed in mmc-next, with a rebase. Thanks,

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child