linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prashanth Bhat <prashanth.bhat@manipal.net>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: linux-mmc@vger.kernel.org, Chris Ball <cjb@laptop.org>
Subject: Re: [PATCH] mmc: mmc_add_card(): fix missing break in switch statement
Date: Tue, 03 May 2011 17:00:03 +0530	[thread overview]
Message-ID: <4DBFE73B.8010609@manipal.net> (raw)
In-Reply-To: <4DBFE514.3050801@manipal.net>

To be more specific, I would think that the code change required in 
include/linux/mmc/card.h is:

#define mmc_card_mmc(c)         ((c)->type == MMC_TYPE_MMC)
- #define mmc_card_sd(c)          ((c)->type == MMC_TYPE_SD)
- #define mmc_card_sdio(c)        ((c)->type == MMC_TYPE_SDIO)

+ #define mmc_card_sd(c)          ((c)->type == MMC_TYPE_SD || (c)->type 
== MMC_TYPE_SD_COMBO)
+ #define mmc_card_sdio(c)        ((c)->type == MMC_TYPE_SDIO || 
(c)->type == MMC_TYPE_SD_COMBO)

Thanks,
Prashanth

On Tuesday 03 May 2011 04:50 PM, Prashanth Bhat wrote:
> Michal,
>
> I hope you remember the email exchange we had about a month ago. I 
> think I see an issue with SD-COMBO support.
>
> In include/linux/mmc/card.h, there are macros:
>
>> #define mmc_card_mmc(c)         ((c)->type == MMC_TYPE_MMC)
>> #define mmc_card_sd(c)          ((c)->type == MMC_TYPE_SD)
>> #define mmc_card_sdio(c)        ((c)->type == MMC_TYPE_SDIO)
>
> In particular, the mmc_card_sd(c) is invoked in many places, to 
> determine whether the card is SD, and certain action is taken. 
> Shouldn't the same be done for Combo cards, because these also have SD 
> on them?
>
> For instance, in drivers/mmc/core/core.c, routine 
> mmc_set_data_timeout(), there is a call to mmc_card_sd(c).
> Also, in drivers/mmc/card/block.c, routine mmc_blk_alloc().
>
> I would appreciate your opinion on this.
>
> Thanks,
> Prashanth
>
>
> On Saturday 09 April 2011 11:46 AM, Michał Mirosław wrote:
>> Fixes a cosmetic bug that affects printk() for SD-combo cards.
>>
>> Noticed-by: Prashanth Bhat<prashanth.bhat@manipal.net>
>> Signed-off-by: Michał Mirosław<mirq-linux@rere.qmqm.pl>
>> ---
>>   drivers/mmc/core/bus.c |    1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
>> index 63667a8..d6d62fd 100644
>> --- a/drivers/mmc/core/bus.c
>> +++ b/drivers/mmc/core/bus.c
>> @@ -284,6 +284,7 @@ int mmc_add_card(struct mmc_card *card)
>>           type = "SD-combo";
>>           if (mmc_card_blockaddr(card))
>>               type = "SDHC-combo";
>> +        break;
>>       default:
>>           type = "?";
>>           break;
>


  reply	other threads:[~2011-05-03 11:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-09  6:16 [PATCH] mmc: mmc_add_card(): fix missing break in switch statement Michał Mirosław
2011-04-09 14:08 ` Chris Ball
2011-05-03 11:20 ` Prashanth Bhat
2011-05-03 11:30   ` Prashanth Bhat [this message]
2011-05-04 11:23     ` Michał Mirosław
2011-05-04 16:36       ` Prashanth Bhat
2011-05-04 16:42         ` Michał Mirosław

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=4DBFE73B.8010609@manipal.net \
    --to=prashanth.bhat@manipal.net \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    /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).