mei: debugfs: allow hbm features list dump in earlier stages
authorAlexander Usyskin <alexander.usyskin@intel.com>
Sun, 7 Feb 2016 21:35:18 +0000 (23:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 22:47:20 +0000 (14:47 -0800)
HBM features list is ready while sending enumerate request and
enumerating clients, output it to debugfs in these states too.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/debugfs.c

index 9f5410b98688690bd58123a531d63481ad8896a3..6bdd75424fe8d62705afce4cd083befdc1b7a3e2 100644 (file)
@@ -165,7 +165,8 @@ static ssize_t mei_dbgfs_read_devstate(struct file *fp, char __user *ubuf,
        pos += scnprintf(buf + pos, bufsz - pos, "hbm: %s\n",
                        mei_hbm_state_str(dev->hbm_state));
 
-       if (dev->hbm_state == MEI_HBM_STARTED) {
+       if (dev->hbm_state >= MEI_HBM_ENUM_CLIENTS &&
+           dev->hbm_state <= MEI_HBM_STARTED) {
                pos += scnprintf(buf + pos, bufsz - pos, "hbm features:\n");
                pos += scnprintf(buf + pos, bufsz - pos, "\tPG: %01d\n",
                                 dev->hbm_f_pg_supported);