diff options
author | Xianting Tian <tian.xianting@h3c.com> | 2020-09-15 15:44:41 +0800 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2020-09-15 09:46:20 -0500 |
commit | c2b1e76d8c91166ca5f7aa8df02d67b619e24dc3 (patch) | |
tree | 1b73006ba1ffb13db8d0cd6a6a49f3bb32e0c33b /drivers/char/ipmi/ipmi_bt_sm.c | |
parent | 81e7571ea35e2b8b74b777ac8484818c8a984ea9 (diff) | |
download | linux-c2b1e76d8c91166ca5f7aa8df02d67b619e24dc3.tar.bz2 |
ipmi:sm: Print current state when the state is invalid
Print current state before returning IPMI_NOT_IN_MY_STATE_ERR so we can
know where this issue is coming from and possibly fix the state machine.
Signed-off-by: Xianting Tian <tian.xianting@h3c.com>
Message-Id: <20200915074441.4090-1-tian.xianting@h3c.com>
[Converted printk() to pr_xxx().]
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char/ipmi/ipmi_bt_sm.c')
-rw-r--r-- | drivers/char/ipmi/ipmi_bt_sm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/ipmi/ipmi_bt_sm.c b/drivers/char/ipmi/ipmi_bt_sm.c index f3f216cdf686..2de0c6c304f3 100644 --- a/drivers/char/ipmi/ipmi_bt_sm.c +++ b/drivers/char/ipmi/ipmi_bt_sm.c @@ -213,8 +213,10 @@ static int bt_start_transaction(struct si_sm_data *bt, if (bt->state == BT_STATE_LONG_BUSY) return IPMI_NODE_BUSY_ERR; - if (bt->state != BT_STATE_IDLE) + if (bt->state != BT_STATE_IDLE) { + dev_warn(bt->io->dev, "BT is now in the state %d\n", bt->state); return IPMI_NOT_IN_MY_STATE_ERR; + } if (bt_debug & BT_DEBUG_MSG) { dev_dbg(bt->io->dev, "+++++++++++++++++ New command\n"); |