linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Ulf Hansson <ulf.hansson@stericsson.com>
Cc: Chris Ball <cjb@laptop.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH 1/4] mmc: core: add high-capacity erase size capability flag
Date: Thu, 09 Feb 2012 09:12:22 +0200	[thread overview]
Message-ID: <4F3371D6.4060907@intel.com> (raw)
In-Reply-To: <4F32A399.4050609@stericsson.com>

On 08/02/12 18:32, Ulf Hansson wrote:
> On 02/07/2012 01:48 PM, Adrian Hunter wrote:
>> Let drivers specify the use of high-capacity erase size.
>>
>> Signed-off-by: Adrian Hunter<adrian.hunter@intel.com>
>> ---
>>   drivers/mmc/core/mmc.c   |    3 ++-
>>   include/linux/mmc/host.h |    1 +
>>   2 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
>> index 6b13776..bd2f71f 100644
>> --- a/drivers/mmc/core/mmc.c
>> +++ b/drivers/mmc/core/mmc.c
>> @@ -949,7 +949,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
>>        * If enhanced_area_en is TRUE, host needs to enable ERASE_GRP_DEF
>>        * bit.  This bit will be lost every time after a reset or power off.
>>        */
>> -    if (card->ext_csd.enhanced_area_en) {
>> +    if (card->ext_csd.enhanced_area_en ||
>> +        (card->ext_csd.rev>= 3&&  (host->caps2&  MMC_CAP2_HC_ERASE_SZ))) {
> 
> This will default disable this feature. Is that what we want?
> Why the need to disable this at all?

It will change the erase group size and the write protect group size.
That will cause breakage for anyone using write protect groups of
a smaller size.

> 
>>           err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
>>                    EXT_CSD_ERASE_GROUP_DEF, 1,
>>                    card->ext_csd.generic_cmd6_time);
>> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
>> index 20d7c82..c7ce9d2 100644
>> --- a/include/linux/mmc/host.h
>> +++ b/include/linux/mmc/host.h
>> @@ -258,6 +258,7 @@ struct mmc_host {
>>   #define MMC_CAP2_HS200        (MMC_CAP2_HS200_1_8V_SDR | \
>>                    MMC_CAP2_HS200_1_2V_SDR)
>>   #define MMC_CAP2_BROKEN_VOLTAGE    (1<<  7)    /* Use the broken voltage */
>> +#define MMC_CAP2_HC_ERASE_SZ    (1<<  8)    /* High-capacity erase size */
>>
>>       mmc_pm_flag_t        pm_caps;    /* supported pm features */
>>       unsigned int        power_notify_type;
> 
> Br
> Ulf Hansson
> 


  reply	other threads:[~2012-02-09  7:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-07 12:48 [PATCH 0/4] mmc: add a cap and a quirk Adrian Hunter
2012-02-07 12:48 ` [PATCH 1/4] mmc: core: add high-capacity erase size capability flag Adrian Hunter
2012-02-08 16:32   ` Ulf Hansson
2012-02-09  7:12     ` Adrian Hunter [this message]
2012-02-08 22:38   ` Linus Walleij
2012-02-09  7:02     ` Adrian Hunter
2012-02-07 12:48 ` [PATCH 2/4] mmc: sdhci-pci: select HC erase size for Medfield eMMC Adrian Hunter
2012-02-07 12:48 ` [PATCH 3/4] mmc: sdhci: add quirk for keeping card power during suspend Adrian Hunter
2012-02-07 12:48 ` [PATCH 4/4] mmc: sdhci-pci: add SDHCI_QUIRK2_HOST_OFF_CARD_ON for Medfield SDIO Adrian Hunter
2012-03-13  6:41 ` [PATCH 0/4] mmc: add a cap and a quirk Adrian Hunter
2012-03-13  9:35   ` Chris Ball

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=4F3371D6.4060907@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@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;
as well as URLs for NNTP newsgroup(s).