Hi Uffe, > -----Original Message----- > From: Ulf Hansson <ulf.hansson@xxxxxxxxxx> > Sent: Monday, November 16, 2020 7:27 PM > To: Y.b. Lu <yangbo.lu@xxxxxxx> > Cc: linux-mmc@xxxxxxxxxxxxxxx; Adrian Hunter <adrian.hunter@xxxxxxxxx> > Subject: Re: [PATCH] mmc: export sd3_bus_mode to user space > > On Mon, 2 Nov 2020 at 08:26, Yangbo Lu <yangbo.lu@xxxxxxx> wrote: > > > > There was no way for user to know what UHS-I modes the SD card > > supporting. We might not know, even the highest speed mode > > failed to use and fell back to a lower speed mode. > > > > This patch is to export sd3_bus_mode to user space to check. > > Well, even if the user would know, what can it do about it? For user, they can check the card speed modes capability, if they want to know. For developer, they can know whether card is working on highest speed mode as expect. If not, they know there is issue needed checking. > > Sound like you are looking for some debugging feature instead? Yes. I think we may need a way to know whether SD card is working on the highest speed mode as expect. Otherwise, we are not able to realize issue if card just fall back to a lower speed mode to work. Any suggestion on this? Thanks a lot. > > Kind regards > Uffe > > > > > Signed-off-by: Yangbo Lu <yangbo.lu@xxxxxxx> > > --- > > drivers/mmc/core/sd.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c > > index 6f054c4..13409c2 100644 > > --- a/drivers/mmc/core/sd.c > > +++ b/drivers/mmc/core/sd.c > > @@ -689,6 +689,7 @@ MMC_DEV_ATTR(oemid, "0x%04x\n", > card->cid.oemid); > > MMC_DEV_ATTR(serial, "0x%08x\n", card->cid.serial); > > MMC_DEV_ATTR(ocr, "0x%08x\n", card->ocr); > > MMC_DEV_ATTR(rca, "0x%04x\n", card->rca); > > +MMC_DEV_ATTR(sd3_bus_mode, "0x%08x\n", > card->sw_caps.sd3_bus_mode); > > > > > > static ssize_t mmc_dsr_show(struct device *dev, > > @@ -753,6 +754,7 @@ static struct attribute *sd_std_attrs[] = { > > &dev_attr_ocr.attr, > > &dev_attr_rca.attr, > > &dev_attr_dsr.attr, > > + &dev_attr_sd3_bus_mode.attr, > > NULL, > > }; > > > > -- > > 2.7.4 > >