[lkml]   [2017]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCHv2 1/1] ANDROID: mmc: core: export emmc revision
On Wed, Oct 11, 2017 at 10:51 PM, Jin Qian <> wrote:

> From: Jin Qian <>
> Expose emmc revision as part of device attributes.
> Signed-off-by: Jin Qian <>

So have you tried and seen what happens with an MMC that
is not an eMMC, i.e. a good old MMC card from back in the days?

Does it display all zeroes or something?

I think it is by far a better idea that Android start to read out these
things using the ioctl() operation and cut this sysfs business.

Example, see:
there is int read_extcsd() immediately in the top of the file.
The ioctl()s are a much better way to do this.

The ioctl() will read the extcsd
on the fly from the card, and what you see in sysfs is just read
when the card is initialized and then kept static.

Since the extcsd is not static but can change at runtime, I think
what you want to to is ioctl()s.

If we start to support reading extcsd from sysfs, the implementation
cannot just use the static copy of ext_csd like this, it needs to
ask the card for it using MMC_DRV_OP_GET_EXT_CSD
commit 627c3ccfb46ada2583eac434127ad5d75e1ac33c
"mmc: debugfs: Move block debugfs into block module"

Linus Walleij

 \ /
  Last update: 2017-10-12 09:33    [W:0.042 / U:4.976 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site