Re: [PATCH 01/10 v2 resend] mmc: block: add block number limitation flag for multiple block read

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

 



Hi Ulf again

What do you think this idea ?
We can move MMC_CAP2_NO_MULTI_READ from host.h to driver side

> /*
>  * this can replace MMC_CAP2_NO_MULTI_READ ?
>  */
> void no_multi_read_fixup(struct mmc_blk_request *brq,
>                          struct request *req)
> {
>         if (rq_data_dir(req) == READ)
>              brq->data.blocks = 1;
> }
> 
> /*
>  * we can use this instead of MMC_CAP2_2BLKS_LIMIT ?
>  */
> void two_block_limit_read_fixup(struct mmc_blk_request *brq,
>                                 struct request *req)
> {
>         if ((rq_data_dir(req) == READ) && 
>             (brq->data.blocks == 2))
>                 brq->data.blocks = 1;
> }
> 
> static void mmc_blk_rw_rq_prep(xxxx)
> {
>         ...
>         if (brq->data.blocks > 1) {
>               ...
> 
>               if (card->host->host_data_fixup)
>                      card->host->host_data_fixup(brq, req)
>         }
>         ...
> }

Best regards
---
Kuninori Morimoto
--
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