Re: [PATCHv2 1/1] ANDROID: mmc: core: export emmc revision
- Date: Thu, 12 Oct 2017 09:32:06 +0200
- From: Linus Walleij <linus.walleij@xxxxxxxxxx>
- Subject: Re: [PATCHv2 1/1] ANDROID: mmc: core: export emmc revision
On Wed, Oct 11, 2017 at 10:51 PM, Jin Qian <jinqian@xxxxxxxxxxx> wrote:
> From: Jin Qian <jinqian@xxxxxxxxxx>
> Expose emmc revision as part of device attributes.
> Signed-off-by: Jin Qian <jinqian@xxxxxxxxxxx>
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.
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
"mmc: debugfs: Move block debugfs into block module"