From: 'Greg KH' <gregkh@linuxfoundation.org>
To: 이승희 <sh043.lee@samsung.com>
Cc: 'Ulf Hansson' <ulf.hansson@linaro.org>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
avri.altman@wdc.com, 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: Thu, 15 Feb 2024 12:38:12 +0100 [thread overview]
Message-ID: <2024021531-speech-lifting-89f6@gregkh> (raw)
In-Reply-To: <000001da6000$527c8650$f77592f0$@samsung.com>
On Thu, Feb 15, 2024 at 08:15:45PM +0900, 이승희 wrote:
> > -----Original Message-----
> > From: Greg KH <gregkh@linuxfoundation.org>
> > Sent: Thursday, February 15, 2024 5:07 PM
> > To: 이승희 <sh043.lee@samsung.com>
> > Cc: 'Ulf Hansson' <ulf.hansson@linaro.org>; linux-mmc@vger.kernel.org;
> > linux-kernel@vger.kernel.org; avri.altman@wdc.com; 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
Does this really belong in the body of the email? You might want a
nicer email client :)
> > > The variable's usage is expected to be used through the sysfs node in
> > the vendor module.
> >
> > What "vendor module"? You need to include all of the needed code here
> > please.
> >
> > thanks,
> >
> > greg k-h
>
> This only purpose of this variable is to identify a faulty card on host side.
>
> In the past, we can identify that the card is inserted or not with reading get_cd() function.
> But now, most mobile devices use hybrid type of SD card tray.
> If the tray is inserted, the return value of get_cd is the same whatever the SD card is inserted or not.
> It can help us diagonose the status of a SD card as well.
>
> Here is the example of usage.
>
> static ssize_t status_show(struct device *dev,
> struct device_attribute *attr, char *buf)
> {
> struct mmc_host *host = dev_get_drvdata(dev);
> struct mmc_card *card = host->card;
> char *status = NULL;
>
> if (card)
> status = mmc_card_readonly(card) ? "PERMWP" : "NORMAL";
> else
> status = host->init_failed ? "INITFAIL" : "NOCARD";
>
> return sysfs_emit(buf, "%s\n", status);
> }
What will userspace do with this information?
And why isn't this part of the patch you submitted?
> As for the sysfs node, it should keep the path of node with or without the SD card.
> That's why I mention the vendor module.
What vendor module? What do you mean by vendor module? You know we
can't add code to the kernel that is only used by code that is NOT in
our kernel tree. You don't want us to take stuff like that, so why is
it being proposed here?
confused,
greg k-h
next prev parent reply other threads:[~2024-02-15 11:38 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 ` [PATCH] mmc: sd: Add a variable to check a faulty device Seunghui Lee
2024-02-13 8:42 ` Avri Altman
2024-02-13 9:49 ` 이승희
2024-02-13 13:35 ` Christian Loehle
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' [this message]
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=2024021531-speech-lifting-89f6@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=avri.altman@wdc.com \
--cc=cw9316.lee@samsung.com \
--cc=dh0421.hwang@samsung.com \
--cc=grant.jung@samsung.com \
--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