public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Subhash Jadavani <subhashj@codeaurora.org>
To: Saugata Das <saugata.das@stericsson.com>
Cc: linux-mmc@vger.kernel.org, patches@linaro.org, saugata.das@linaro.org
Subject: Re: [RFC 1/2] [MMC-4.5] Disable emulation
Date: Mon, 14 May 2012 15:55:12 +0530	[thread overview]
Message-ID: <4FB0DD88.2050005@codeaurora.org> (raw)
In-Reply-To: <1336574901-26579-1-git-send-email-saugata.das@stericsson.com>

On 5/9/2012 8:18 PM, Saugata Das wrote:
> From: Saugata Das<saugata.das@linaro.org>
>
> This patch adds the support for large sector size of 4KB by disabling emulation.
> This patch passes eMMC DATA_SECTOR_SIZE as the logical block size during
> mmc_blk_alloc_req.
>
> In order to use this patch for 4KB sector size, ensure that USE_NATIVE_SECTOR
> is enabled, partition table is 4KB sector size aligned and file system block
> size is 4KB.
>
> Signed-off-by: Saugata Das<saugata.das@linaro.org>
> ---
>   drivers/mmc/card/block.c |    6 +++++-
>   drivers/mmc/core/mmc.c   |    2 ++
>   2 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index a7c75d8..0e54118e 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -1517,7 +1517,11 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
>   	snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
>   		 "mmcblk%d%s", md->name_idx, subname ? subname : "");
>
> -	blk_queue_logical_block_size(md->queue.queue, 512);
> +	if (mmc_card_mmc(card))
> +		blk_queue_logical_block_size(md->queue.queue,
> +			card->ext_csd.data_sector_size);
Shouldn't we also set the physical block size to NATIVE_SECTOR_SIZE value?

Other question,
Did you find any eMMC device which 4K native sector size? If yes, please 
share the test results.

Other than that, this patch looks good to me.

Regards,
Subhash
> +	else
> +		blk_queue_logical_block_size(md->queue.queue, 512);
>   	set_capacity(md->disk, size);
>
>   	if (mmc_host_cmd23(card->host)) {
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 02914d6..8dcbe995 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -533,6 +533,8 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
>   		} else {
>   			card->ext_csd.data_tag_unit_size = 0;
>   		}
> +	} else {
> +		card->ext_csd.data_sector_size = 512;
>   	}
>
>   out:


  parent reply	other threads:[~2012-05-14 10:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 14:48 [RFC 1/2] [MMC-4.5] Disable emulation Saugata Das
2012-05-09 14:48 ` [RFC 2/2] [MMC-4.5] [MMC UTIL] " Saugata Das
2012-05-14 10:39   ` Subhash Jadavani
2012-05-14 15:25     ` Saugata Das
2012-05-14 10:50   ` Subhash Jadavani
2012-05-14 15:09     ` Saugata Das
2012-05-14 10:25 ` Subhash Jadavani [this message]
2012-05-14 14:51   ` [RFC 1/2] [MMC-4.5] " Saugata Das
2012-05-15  6:40     ` Subhash Jadavani
2012-05-15  9:41       ` Luca Porzio (lporzio)
2012-05-15 10:17       ` S, Venkatraman
2012-05-15 14:55         ` Saugata Das
2012-05-15 14:49       ` Saugata Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FB0DD88.2050005@codeaurora.org \
    --to=subhashj@codeaurora.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=saugata.das@linaro.org \
    --cc=saugata.das@stericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox