* [PATCH] mmc: fixed wrong SD card detection
@ 2011-05-06 9:38 Jaehoon Chung
2011-05-11 3:54 ` Chris Ball
2011-05-11 10:30 ` Huang Changming-R66093
0 siblings, 2 replies; 6+ messages in thread
From: Jaehoon Chung @ 2011-05-06 9:38 UTC (permalink / raw)
To: linux-mmc@vger.kernel.org; +Cc: Chris Ball, Kyungmin Park
This patch added mmc_power_off after mmc_attach_sd()
i found that didn't detect the second card insert.(using SDHCI)
you can see the below log.
i want to know that somebody know this issue...
->first card inserted (correct card detect)
# mmc1: new SDHC card at address e624
mmcblk1: mmc1:e624 SU04G 3.69 GiB
mmcblk1: p1
#
# mmc1: card e624 removed
-> second card inserted
mmc1: error -110 whilst initialising SD card
mmc1: Card removed during transfer!
mmc1: Resetting controller.
-> third card inserted
mmc1: new SDHC card at address e624
mmcblk1: mmc1:e624 SU04G 3.69 GiB
mmcblk1: p1
I added mmc_power_off() after only mmc_attach_sd().
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: kyungmin Park <kyungmin.park@samsung.com>
---
drivers/mmc/core/core.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 1dbc185..d5d8ac0 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1522,8 +1522,10 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
/* Order's important: probe SDIO, then SD, then MMC */
if (!mmc_attach_sdio(host))
return 0;
- if (!mmc_attach_sd(host))
+ if (!mmc_attach_sd(host)) {
+ mmc_power_off(host);
return 0;
+ }
if (!mmc_attach_mmc(host))
return 0;
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] mmc: fixed wrong SD card detection
2011-05-06 9:38 [PATCH] mmc: fixed wrong SD card detection Jaehoon Chung
@ 2011-05-11 3:54 ` Chris Ball
2011-05-12 8:38 ` Jaehoon Chung
2011-05-11 10:30 ` Huang Changming-R66093
1 sibling, 1 reply; 6+ messages in thread
From: Chris Ball @ 2011-05-11 3:54 UTC (permalink / raw)
To: Jaehoon Chung; +Cc: linux-mmc@vger.kernel.org, Kyungmin Park
Hi Jaehoon,
On Fri, May 06 2011, Jaehoon Chung wrote:
> This patch added mmc_power_off after mmc_attach_sd()
>
> i found that didn't detect the second card insert.(using SDHCI)
> you can see the below log.
>
> i want to know that somebody know this issue...
>
> ->first card inserted (correct card detect)
> # mmc1: new SDHC card at address e624
> mmcblk1: mmc1:e624 SU04G 3.69 GiB
> mmcblk1: p1
> #
> # mmc1: card e624 removed
> -> second card inserted
> mmc1: error -110 whilst initialising SD card
> mmc1: Card removed during transfer!
> mmc1: Resetting controller.
> -> third card inserted
> mmc1: new SDHC card at address e624
> mmcblk1: mmc1:e624 SU04G 3.69 GiB
> mmcblk1: p1
>
> I added mmc_power_off() after only mmc_attach_sd().
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: kyungmin Park <kyungmin.park@samsung.com>
> ---
> drivers/mmc/core/core.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 1dbc185..d5d8ac0 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1522,8 +1522,10 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
> /* Order's important: probe SDIO, then SD, then MMC */
> if (!mmc_attach_sdio(host))
> return 0;
> - if (!mmc_attach_sd(host))
> + if (!mmc_attach_sd(host)) {
> + mmc_power_off(host);
> return 0;
> + }
> if (!mmc_attach_mmc(host))
> return 0;
>
It looks to me like this patch says "if we successfully attach/power up
an SD card, then power it back off again immediately". Why would that
make sense?
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] mmc: fixed wrong SD card detection
2011-05-11 3:54 ` Chris Ball
@ 2011-05-12 8:38 ` Jaehoon Chung
0 siblings, 0 replies; 6+ messages in thread
From: Jaehoon Chung @ 2011-05-12 8:38 UTC (permalink / raw)
To: Chris Ball; +Cc: Jaehoon Chung, linux-mmc@vger.kernel.org, Kyungmin Park
Hi Chris..
Chris Ball wrote:
> Hi Jaehoon,
>
> On Fri, May 06 2011, Jaehoon Chung wrote:
>> This patch added mmc_power_off after mmc_attach_sd()
>>
>> i found that didn't detect the second card insert.(using SDHCI)
>> you can see the below log.
>>
>> i want to know that somebody know this issue...
>>
>> ->first card inserted (correct card detect)
>> # mmc1: new SDHC card at address e624
>> mmcblk1: mmc1:e624 SU04G 3.69 GiB
>> mmcblk1: p1
>> #
>> # mmc1: card e624 removed
>> -> second card inserted
>> mmc1: error -110 whilst initialising SD card
>> mmc1: Card removed during transfer!
>> mmc1: Resetting controller.
>> -> third card inserted
>> mmc1: new SDHC card at address e624
>> mmcblk1: mmc1:e624 SU04G 3.69 GiB
>> mmcblk1: p1
>>
>> I added mmc_power_off() after only mmc_attach_sd().
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> Signed-off-by: kyungmin Park <kyungmin.park@samsung.com>
>> ---
>> drivers/mmc/core/core.c | 4 +++-
>> 1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
>> index 1dbc185..d5d8ac0 100644
>> --- a/drivers/mmc/core/core.c
>> +++ b/drivers/mmc/core/core.c
>> @@ -1522,8 +1522,10 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
>> /* Order's important: probe SDIO, then SD, then MMC */
>> if (!mmc_attach_sdio(host))
>> return 0;
>> - if (!mmc_attach_sd(host))
>> + if (!mmc_attach_sd(host)) {
>> + mmc_power_off(host);
>> return 0;
>> + }
>> if (!mmc_attach_mmc(host))
>> return 0;
>>
>
> It looks to me like this patch says "if we successfully attach/power up
> an SD card, then power it back off again immediately". Why would that
> make sense?
It's non-sense...i know...How did you think about that problem..?
I want to get your advise...
>
> - Chris.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] mmc: fixed wrong SD card detection
2011-05-06 9:38 [PATCH] mmc: fixed wrong SD card detection Jaehoon Chung
2011-05-11 3:54 ` Chris Ball
@ 2011-05-11 10:30 ` Huang Changming-R66093
2011-05-12 5:14 ` Jaehoon Chung
1 sibling, 1 reply; 6+ messages in thread
From: Huang Changming-R66093 @ 2011-05-11 10:30 UTC (permalink / raw)
To: Jaehoon Chung, linux-mmc@vger.kernel.org; +Cc: Chris Ball, Kyungmin Park
I don't see this.
Maybe that is your hardware issue.
Thanks and Best Regards
Jerry Huang
> -----Original Message-----
> From: linux-mmc-owner@vger.kernel.org [mailto:linux-mmc-
> owner@vger.kernel.org] On Behalf Of Jaehoon Chung
> Sent: Friday, May 06, 2011 5:39 PM
> To: linux-mmc@vger.kernel.org
> Cc: Chris Ball; Kyungmin Park
> Subject: [PATCH] mmc: fixed wrong SD card detection
>
> This patch added mmc_power_off after mmc_attach_sd()
>
> i found that didn't detect the second card insert.(using SDHCI) you can
> see the below log.
>
> i want to know that somebody know this issue...
>
> ->first card inserted (correct card detect)
> # mmc1: new SDHC card at address e624
> mmcblk1: mmc1:e624 SU04G 3.69 GiB
> mmcblk1: p1
> #
> # mmc1: card e624 removed
> -> second card inserted
> mmc1: error -110 whilst initialising SD card
> mmc1: Card removed during transfer!
> mmc1: Resetting controller.
> -> third card inserted
> mmc1: new SDHC card at address e624
> mmcblk1: mmc1:e624 SU04G 3.69 GiB
> mmcblk1: p1
>
> I added mmc_power_off() after only mmc_attach_sd().
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: kyungmin Park <kyungmin.park@samsung.com>
> ---
> drivers/mmc/core/core.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index
> 1dbc185..d5d8ac0 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1522,8 +1522,10 @@ static int mmc_rescan_try_freq(struct mmc_host
> *host, unsigned freq)
> /* Order's important: probe SDIO, then SD, then MMC */
> if (!mmc_attach_sdio(host))
> return 0;
> - if (!mmc_attach_sd(host))
> + if (!mmc_attach_sd(host)) {
> + mmc_power_off(host);
> return 0;
> + }
> if (!mmc_attach_mmc(host))
> return 0;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] mmc: fixed wrong SD card detection
2011-05-11 10:30 ` Huang Changming-R66093
@ 2011-05-12 5:14 ` Jaehoon Chung
2011-05-12 6:17 ` Huang Changming-R66093
0 siblings, 1 reply; 6+ messages in thread
From: Jaehoon Chung @ 2011-05-12 5:14 UTC (permalink / raw)
To: Huang Changming-R66093
Cc: Jaehoon Chung, linux-mmc@vger.kernel.org, Chris Ball,
Kyungmin Park
Hi Huang.
Thanks for your comments. but this is not my hardware issue. :)
But i found out your patch "[PATCH 3/3] SDHC/MMC: add f_min to mmc_power_on"
I think that related with this problem.
I will test then share the results
Best regards,
Jaehoon Chung
Huang Changming-R66093 wrote:
> I don't see this.
> Maybe that is your hardware issue.
>
> Thanks and Best Regards
> Jerry Huang
>
>
>> -----Original Message-----
>> From: linux-mmc-owner@vger.kernel.org [mailto:linux-mmc-
>> owner@vger.kernel.org] On Behalf Of Jaehoon Chung
>> Sent: Friday, May 06, 2011 5:39 PM
>> To: linux-mmc@vger.kernel.org
>> Cc: Chris Ball; Kyungmin Park
>> Subject: [PATCH] mmc: fixed wrong SD card detection
>>
>> This patch added mmc_power_off after mmc_attach_sd()
>>
>> i found that didn't detect the second card insert.(using SDHCI) you can
>> see the below log.
>>
>> i want to know that somebody know this issue...
>>
>> ->first card inserted (correct card detect)
>> # mmc1: new SDHC card at address e624
>> mmcblk1: mmc1:e624 SU04G 3.69 GiB
>> mmcblk1: p1
>> #
>> # mmc1: card e624 removed
>> -> second card inserted
>> mmc1: error -110 whilst initialising SD card
>> mmc1: Card removed during transfer!
>> mmc1: Resetting controller.
>> -> third card inserted
>> mmc1: new SDHC card at address e624
>> mmcblk1: mmc1:e624 SU04G 3.69 GiB
>> mmcblk1: p1
>>
>> I added mmc_power_off() after only mmc_attach_sd().
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> Signed-off-by: kyungmin Park <kyungmin.park@samsung.com>
>> ---
>> drivers/mmc/core/core.c | 4 +++-
>> 1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index
>> 1dbc185..d5d8ac0 100644
>> --- a/drivers/mmc/core/core.c
>> +++ b/drivers/mmc/core/core.c
>> @@ -1522,8 +1522,10 @@ static int mmc_rescan_try_freq(struct mmc_host
>> *host, unsigned freq)
>> /* Order's important: probe SDIO, then SD, then MMC */
>> if (!mmc_attach_sdio(host))
>> return 0;
>> - if (!mmc_attach_sd(host))
>> + if (!mmc_attach_sd(host)) {
>> + mmc_power_off(host);
>> return 0;
>> + }
>> if (!mmc_attach_mmc(host))
>> return 0;
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
>> the body of a message to majordomo@vger.kernel.org More majordomo info at
>> http://vger.kernel.org/majordomo-info.html
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 6+ messages in thread* RE: [PATCH] mmc: fixed wrong SD card detection
2011-05-12 5:14 ` Jaehoon Chung
@ 2011-05-12 6:17 ` Huang Changming-R66093
0 siblings, 0 replies; 6+ messages in thread
From: Huang Changming-R66093 @ 2011-05-12 6:17 UTC (permalink / raw)
To: Jaehoon Chung; +Cc: linux-mmc@vger.kernel.org, Chris Ball, Kyungmin Park
I didn't see my patch :(
I use the f_min to replace the f_init when f_init is zero and that is used for get_cd callback function.
Thanks and Best Regards
Jerry Huang
> -----Original Message-----
> From: Jaehoon Chung [mailto:jh80.chung@samsung.com]
> Sent: Thursday, May 12, 2011 1:14 PM
> To: Huang Changming-R66093
> Cc: Jaehoon Chung; linux-mmc@vger.kernel.org; Chris Ball; Kyungmin Park
> Subject: Re: [PATCH] mmc: fixed wrong SD card detection
>
> Hi Huang.
>
> Thanks for your comments. but this is not my hardware issue. :) But i
> found out your patch "[PATCH 3/3] SDHC/MMC: add f_min to mmc_power_on"
>
> I think that related with this problem.
> I will test then share the results
>
> Best regards,
> Jaehoon Chung
>
> Huang Changming-R66093 wrote:
> > I don't see this.
> > Maybe that is your hardware issue.
> >
> > Thanks and Best Regards
> > Jerry Huang
> >
> >
> >> -----Original Message-----
> >> From: linux-mmc-owner@vger.kernel.org [mailto:linux-mmc-
> >> owner@vger.kernel.org] On Behalf Of Jaehoon Chung
> >> Sent: Friday, May 06, 2011 5:39 PM
> >> To: linux-mmc@vger.kernel.org
> >> Cc: Chris Ball; Kyungmin Park
> >> Subject: [PATCH] mmc: fixed wrong SD card detection
> >>
> >> This patch added mmc_power_off after mmc_attach_sd()
> >>
> >> i found that didn't detect the second card insert.(using SDHCI) you
> >> can see the below log.
> >>
> >> i want to know that somebody know this issue...
> >>
> >> ->first card inserted (correct card detect)
> >> # mmc1: new SDHC card at address e624
> >> mmcblk1: mmc1:e624 SU04G 3.69 GiB
> >> mmcblk1: p1
> >> #
> >> # mmc1: card e624 removed
> >> -> second card inserted
> >> mmc1: error -110 whilst initialising SD card
> >> mmc1: Card removed during transfer!
> >> mmc1: Resetting controller.
> >> -> third card inserted
> >> mmc1: new SDHC card at address e624
> >> mmcblk1: mmc1:e624 SU04G 3.69 GiB
> >> mmcblk1: p1
> >>
> >> I added mmc_power_off() after only mmc_attach_sd().
> >>
> >> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> >> Signed-off-by: kyungmin Park <kyungmin.park@samsung.com>
> >> ---
> >> drivers/mmc/core/core.c | 4 +++-
> >> 1 files changed, 3 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index
> >> 1dbc185..d5d8ac0 100644
> >> --- a/drivers/mmc/core/core.c
> >> +++ b/drivers/mmc/core/core.c
> >> @@ -1522,8 +1522,10 @@ static int mmc_rescan_try_freq(struct mmc_host
> >> *host, unsigned freq)
> >> /* Order's important: probe SDIO, then SD, then MMC */
> >> if (!mmc_attach_sdio(host))
> >> return 0;
> >> - if (!mmc_attach_sd(host))
> >> + if (!mmc_attach_sd(host)) {
> >> + mmc_power_off(host);
> >> return 0;
> >> + }
> >> if (!mmc_attach_mmc(host))
> >> return 0;
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-mmc"
> >> in the body of a message to majordomo@vger.kernel.org More majordomo
> >> info at http://vger.kernel.org/majordomo-info.html
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-mmc"
> > in the body of a message to majordomo@vger.kernel.org More majordomo
> > info at http://vger.kernel.org/majordomo-info.html
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-05-12 8:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-06 9:38 [PATCH] mmc: fixed wrong SD card detection Jaehoon Chung
2011-05-11 3:54 ` Chris Ball
2011-05-12 8:38 ` Jaehoon Chung
2011-05-11 10:30 ` Huang Changming-R66093
2011-05-12 5:14 ` Jaehoon Chung
2011-05-12 6:17 ` Huang Changming-R66093
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox