Hi Saugata,

Could you check the comment below?

Friday, June 29, 2012, Saugata Das <[email protected]> wrote:
> From: Saugata Das <[email protected]>
> 
> In 512B disable emulation patch, a check is done to ensure that size
> of the data is multiple of 4KB. However, the check is done with
> brq->data.blocks, which is not initialized at the point of check.
> This is now changed to blk_rq_sectors.
> 
> Signed-off-by: Saugata Das <[email protected]>
> ---
>  drivers/mmc/card/block.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index d628c5d..ee8b3d6 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -1296,7 +1296,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, 
> struct request *rqc)
>                        * When 4KB native sector is enabled, only 8 blocks
>                        * multiple read or write is allowed
>                        */
> -                     if ((brq->data.blocks & 0x07) &&
> +                     if ((blk_rq_sectors(req) & 0x07) &&
>                               (card->ext_csd.data_sector_size == 4096)) {
>                               pr_err("%s: Transfer size is not 4KB sector 
> size aligned\n",
>                                       req->rq_disk->disk_name);

In current error handling, multiple block read can be retried using single 
block read
with disable_multi. Then 4KB alignment will be broken.
Also,  there is some conditions to modify the number of blocks in 
mmc_blk_rw_rq_prep.
That means the alignment of blocks can be changed after mmc_blk_rw_rq_prep.
It needs to be considered.

And I have a question.
Spec mentioned that arguments for read commands (CMD17/18) shall always be 
aligned to 8(4KB)
in Native 4KB sector. In current implementation CMD17/18 is only used when 
data.blocks is 1.
If data.blocks is 8 in Native 4KB sector, then CMD17/18 should be taken instead 
of CMD24/25?

Thanks,
Seungwon Jeon
> --
> 1.7.4.3
> 
> --
> 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

--
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

Reply via email to