From: Christian Loehle <christian.loehle@arm.com>
To: 이승희 <sh043.lee@samsung.com>,
"'Avri Altman'" <Avri.Altman@wdc.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
ulf.hansson@linaro.org, gregkh@linuxfoundation.org
Cc: grant.jung@samsung.com, jt77.jang@samsung.com,
dh0421.hwang@samsung.com, junwoo80.lee@samsung.com,
jangsub.yi@samsung.com, cw9316.lee@samsung.com,
sh8267.baek@samsung.com, wkon.kim@samsung.com
Subject: Re: [PATCH] mmc: sd: Add a variable to check a faulty device
Date: Tue, 13 Feb 2024 13:35:01 +0000 [thread overview]
Message-ID: <94199ff4-1511-4f67-9794-b93195f8bac9@arm.com> (raw)
In-Reply-To: <000101da5e61$f97e8cf0$ec7ba6d0$@samsung.com>
On 13/02/2024 09:49, 이승희 wrote:
>
>
>> -----Original Message-----
>> From: Avri Altman <Avri.Altman@wdc.com>
>> Sent: Tuesday, February 13, 2024 5:42 PM
>> To: Seunghui Lee <sh043.lee@samsung.com>; linux-mmc@vger.kernel.org;
>> linux-kernel@vger.kernel.org; ulf.hansson@linaro.org;
>> gregkh@linuxfoundation.org
>> Cc: grant.jung@samsung.com; jt77.jang@samsung.com;
>> dh0421.hwang@samsung.com; junwoo80.lee@samsung.com; jangsub.yi@samsung.com;
>> cw9316.lee@samsung.com; sh8267.baek@samsung.com; wkon.kim@samsung.com
>> Subject: RE: [PATCH] mmc: sd: Add a variable to check a faulty device
>>
>>> In mobile devices, suspend/resume situations are frequent.
>>> In the case of a defective SD card in which initialization fails,
>>> unnecessary initialization time is consumed for each resume.
>>> A field is needed to check that SD card initialization has failed on
>>> the host. It could be used to remove unnecessary initialization.
>> I don't see where you are using this new init_failed field?
>> Maybe instead, elaborate the logic to free_card: to detect a broken sd.
>> e.g. instead of just if (!oldcard), if (!oldcard || ! mmc_sd_alive(host))
>> or something.
>>
>> Thanks,
>> Avri
>>
> Thank you for your suggestion.
> I'm going to use it in mmc_rescan as below.
>
> e.g.
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index a8c17b4cd737..461cd75dc7ab 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -2210,7 +2210,7 @@ void mmc_rescan(struct work_struct *work)
> container_of(work, struct mmc_host, detect.work);
> int i;
>
> - if (host->rescan_disable)
> + if (host->rescan_disable || host->init_failed)
> return;
I've seen SD cards that fail the first initialization attempt for both
'valid' reasons (e.g. weird insertion timing) and things like out-of-spec
initialization time from the card, outright disabling these on the first
fail is a bit too much IMO.
Kind Regards,
Christian
next prev parent reply other threads:[~2024-02-13 13:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240213051332epcas1p1f45d02dc34d1b95ea5608ab779d6b6cc@epcas1p1.samsung.com>
2024-02-13 5:17 ` Seunghui Lee
2024-02-13 8:42 ` Avri Altman
2024-02-13 9:49 ` 이승희
2024-02-13 13:35 ` Christian Loehle [this message]
2024-02-14 2:01 ` 이승희
2024-02-14 11:26 ` Ulf Hansson
2024-02-15 1:03 ` 이승희
2024-02-15 8:07 ` Greg KH
2024-02-15 11:15 ` 이승희
2024-02-15 11:38 ` 'Greg KH'
2024-02-16 2:26 ` 이승희
2024-02-15 11:00 ` Ulf Hansson
2024-02-16 1:14 ` 이승희
2024-03-01 10:33 ` Ulf Hansson
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=94199ff4-1511-4f67-9794-b93195f8bac9@arm.com \
--to=christian.loehle@arm.com \
--cc=Avri.Altman@wdc.com \
--cc=cw9316.lee@samsung.com \
--cc=dh0421.hwang@samsung.com \
--cc=grant.jung@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=jangsub.yi@samsung.com \
--cc=jt77.jang@samsung.com \
--cc=junwoo80.lee@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=sh043.lee@samsung.com \
--cc=sh8267.baek@samsung.com \
--cc=ulf.hansson@linaro.org \
--cc=wkon.kim@samsung.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
all inboxes | Powered by JetHome®