Message ID | 20211114204331.39555-3-huobean@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Two change for mmc-utils | expand |
> From: Bean Huo <beanhuo@micron.com> > > Since the Linux kernel commit 70b52f090805 ("mmc: block: Disable CMDQ on > the ioctl path"), CMDQ in CMDQ_MODE_EN[15] is disabled before reading > EXT_CSD. > Therefore, it is more accurate to use sysfs node to check CMDQ_MODE_EN > value. > Add a note print to highlight. > > Signed-off-by: Bean Huo <beanhuo@micron.com> Acked-by: Avri Altman <avri.altman@wdc.com> > --- > mmc_cmds.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/mmc_cmds.c b/mmc_cmds.c > index ecbde3937c81..46c5f5faae02 100644 > --- a/mmc_cmds.c > +++ b/mmc_cmds.c > @@ -1885,6 +1885,8 @@ int do_read_extcsd(int nargs, char **argv) > (ext_csd[EXT_CSD_CMDQ_DEPTH] & 0x1f) + 1); > printf("Command Enabled [CMDQ_MODE_EN]: 0x%02x\n", > ext_csd[EXT_CSD_CMDQ_MODE_EN]); > + printf("Note: CMDQ_MODE_EN may not indicate the runtime > CMDQ ON or OFF.\n" > + "Please check sysfs node > + '/sys/devices/.../mmc_host/mmcX/mmcX:XXXX/cmdq_en'\n"); > } > out_free: > return ret; > -- > 2.25.1
On Sun, 14 Nov 2021 at 21:43, Bean Huo <huobean@gmail.com> wrote: > > From: Bean Huo <beanhuo@micron.com> > > Since the Linux kernel commit 70b52f090805 ("mmc: block: Disable CMDQ on > the ioctl path"), CMDQ in CMDQ_MODE_EN[15] is disabled before reading EXT_CSD. > Therefore, it is more accurate to use sysfs node to check CMDQ_MODE_EN value. > Add a note print to highlight. > > Signed-off-by: Bean Huo <beanhuo@micron.com> Applied for master at git.kernel.org/pub/scm/utils/mmc/mmc-utils.git, thanks! Kind regards Uffe > --- > mmc_cmds.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/mmc_cmds.c b/mmc_cmds.c > index ecbde3937c81..46c5f5faae02 100644 > --- a/mmc_cmds.c > +++ b/mmc_cmds.c > @@ -1885,6 +1885,8 @@ int do_read_extcsd(int nargs, char **argv) > (ext_csd[EXT_CSD_CMDQ_DEPTH] & 0x1f) + 1); > printf("Command Enabled [CMDQ_MODE_EN]: 0x%02x\n", > ext_csd[EXT_CSD_CMDQ_MODE_EN]); > + printf("Note: CMDQ_MODE_EN may not indicate the runtime CMDQ ON or OFF.\n" > + "Please check sysfs node '/sys/devices/.../mmc_host/mmcX/mmcX:XXXX/cmdq_en'\n"); > } > out_free: > return ret; > -- > 2.25.1 >
diff --git a/mmc_cmds.c b/mmc_cmds.c index ecbde3937c81..46c5f5faae02 100644 --- a/mmc_cmds.c +++ b/mmc_cmds.c @@ -1885,6 +1885,8 @@ int do_read_extcsd(int nargs, char **argv) (ext_csd[EXT_CSD_CMDQ_DEPTH] & 0x1f) + 1); printf("Command Enabled [CMDQ_MODE_EN]: 0x%02x\n", ext_csd[EXT_CSD_CMDQ_MODE_EN]); + printf("Note: CMDQ_MODE_EN may not indicate the runtime CMDQ ON or OFF.\n" + "Please check sysfs node '/sys/devices/.../mmc_host/mmcX/mmcX:XXXX/cmdq_en'\n"); } out_free: return ret;