Re: [BUG] CMD52 sent as first command not CMD0

2011-02-06 Thread Nicolas Pitre
On Sun, 6 Feb 2011, Philip Rakity wrote: > > On Feb 6, 2011, at 3:13 AM, Albert Herranz wrote: > > > Hi, > > > > On 02/06/2011 02:35 AM, Philip Rakity wrote: > >> > >> proposed solution: I cannot verify this fix until Monday. > >> = > >> > >> CMD52 is a reset for SDIO cards. CMD0 is not

Re: [BUG] CMD52 sent as first command not CMD0

2011-02-06 Thread Philip Rakity
On Feb 6, 2011, at 3:13 AM, Albert Herranz wrote: > Hi, > > On 02/06/2011 02:35 AM, Philip Rakity wrote: >> >> proposed solution: I cannot verify this fix until Monday. >> = >> >> CMD52 is a reset for SDIO cards. CMD0 is not sufficient when >> the card is being re-initialized. Only send

RE: [BUG] CMD52 sent as first command not CMD0

2011-02-06 Thread Tardy, Pierre
> > nothing negative but reset is meant to reinit the card. This is the power up > sequence for the 1st > time a card is detected. > There is no reason to do this if no card has yet enumerated. If a sdio card > was there I completely > agree with the mod since we need to reset > the card. W

Re: [BUG] CMD52 sent as first command not CMD0

2011-02-06 Thread David Vrabel
On 06/02/2011 01:50, Chris Ball wrote: > > > Thanks. We have macros for this, but need to add one for combo cards. > include/linux/mmc/card.h should get: > > #define mmc_card_sd_combo(c)((c)->type == MMC_TYPE_SD_COMBO) How about something like: #define mmc_card_has_sdio(c) \ ({ \

Re: [BUG] CMD52 sent as first command not CMD0

2011-02-06 Thread Albert Herranz
Hi, On 02/06/2011 02:35 AM, Philip Rakity wrote: > > proposed solution: I cannot verify this fix until Monday. > = > > CMD52 is a reset for SDIO cards. CMD0 is not sufficient when > the card is being re-initialized. Only send CMD52 if > a) doing a reinitialize > b) card is SDIO or SDIO_CO

Re: [BUG] CMD52 sent as first command not CMD0

2011-02-05 Thread Chris Ball
Hi, On Sat, Feb 05, 2011 at 05:35:46PM -0800, Philip Rakity wrote: > > proposed solution: I cannot verify this fix until Monday. > = > > CMD52 is a reset for SDIO cards. CMD0 is not sufficient when > the card is being re-initialized. Only send CMD52 if > a) doing a reinitialize > b) card

Re: [BUG] CMD52 sent as first command not CMD0

2011-02-05 Thread Philip Rakity
proposed solution: I cannot verify this fix until Monday. = CMD52 is a reset for SDIO cards. CMD0 is not sufficient when the card is being re-initialized. Only send CMD52 if a) doing a reinitialize b) card is SDIO or SDIO_COMBO Signed-off-by: Philip Rakity --- drivers/mmc/core/core.c |

Re: [BUG] CMD52 sent as first command not CMD0

2011-02-05 Thread Chris Ball
On Sat, Feb 05, 2011 at 04:52:12PM -0800, Philip Rakity wrote: > nothing negative but reset is meant to reinit the card. This is the power up > sequence for the 1st time a card is detected. > There is no reason to do this if no card has yet enumerated. If a sdio card > was there I completely ag

Re: [BUG] CMD52 sent as first command not CMD0

2011-02-05 Thread Philip Rakity
The CMD52 was sent to a eMMC card. Not SDIO. Figure 6.2 in SDIO spec 2.0 -- clearly shows that the card needs to exist before cmd52 (reset) is legal. Probably need to extend the proposed change to check card type to ensure only done for sdio. On Feb 5, 2011, at 4:52 PM, Philip Rakity wrote:

Re: [BUG] CMD52 sent as first command not CMD0

2011-02-05 Thread Philip Rakity
nothing negative but reset is meant to reinit the card. This is the power up sequence for the 1st time a card is detected. There is no reason to do this if no card has yet enumerated. If a sdio card was there I completely agree with the mod since we need to reset the card. CMD0 should be th

Re: [BUG] CMD52 sent as first command not CMD0

2011-02-05 Thread Chris Ball
Hi Philip, On Fri, Feb 04, 2011 at 02:53:59PM -0800, Philip Rakity wrote: > using mmc-next -- NO changes -- last checkin was from linux Jan 26 [..] > [2.034998] mmc0: starting CMD52 arg 0c00 flags 0195 > [2.052704] Waiting 15sec before mounting root device... > [2.068948] sdhci

Re: [BUG] CMD52 sent as first command not CMD0

2011-02-04 Thread Philip Rakity
Debugging shows CMD52 is sent from sdio_reset call in mmc_rescan_try_fteq. card does not exist at this time. I can make this a formal patch once others are happy that this is the answer. Philip diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 6625c05..39e8da0 100644 --- a/