[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024021531-speech-lifting-89f6@gregkh>
Date: Thu, 15 Feb 2024 12:38:12 +0100
From: 'Greg KH' <gregkh@...uxfoundation.org>
To: 이승희 <sh043.lee@...sung.com>
Cc: 'Ulf Hansson' <ulf.hansson@...aro.org>, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org, avri.altman@....com,
grant.jung@...sung.com, jt77.jang@...sung.com,
dh0421.hwang@...sung.com, junwoo80.lee@...sung.com,
jangsub.yi@...sung.com, cw9316.lee@...sung.com,
sh8267.baek@...sung.com, wkon.kim@...sung.com
Subject: Re: [PATCH] mmc: sd: Add a variable to check a faulty device
On Thu, Feb 15, 2024 at 08:15:45PM +0900, 이승희 wrote:
> > -----Original Message-----
> > From: Greg KH <gregkh@...uxfoundation.org>
> > Sent: Thursday, February 15, 2024 5:07 PM
> > To: 이승희 <sh043.lee@...sung.com>
> > Cc: 'Ulf Hansson' <ulf.hansson@...aro.org>; linux-mmc@...r.kernel.org;
> > linux-kernel@...r.kernel.org; avri.altman@....com; grant.jung@...sung.com;
> > jt77.jang@...sung.com; dh0421.hwang@...sung.com; junwoo80.lee@...sung.com;
> > jangsub.yi@...sung.com; cw9316.lee@...sung.com; sh8267.baek@...sung.com;
> > wkon.kim@...sung.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
Powered by blists - more mailing lists