mmc: core: fix the critical bug for multiple block read
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
@@ -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 ; }
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 assignedcard->host->caps.
MMC_CAPS2_NO_MULTI_READmust assigncard->host->caps2instead ofcard->host->caps.Signed-off-by Jaehoon Chung <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- drivers/mmc/card/block.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/mmc/card/block.c +1
-2@@ -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
Hi,
Quoted 6 lines · Jaehoon Chung
drivers/mmc/card/block.c +0
-0
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