diff options
author | Terry Duncan <terry.s.duncan@intel.com> | 2021-02-25 05:50:27 +0100 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2021-03-11 02:00:02 +0100 |
commit | c6ddd5f1c3f3254034f8e9ba741af4a3b0260998 (patch) | |
tree | dce527e5ba23c2693a89b26adaf0fbf6cf9acabe /drivers/char/ipmi/ipmi_msghandler.c | |
parent | Merge tag 's390-5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390... (diff) | |
download | linux-c6ddd5f1c3f3254034f8e9ba741af4a3b0260998.tar.xz linux-c6ddd5f1c3f3254034f8e9ba741af4a3b0260998.zip |
ipmi: Refine retry conditions for getting device id
Rarely but still failures are observed while getting BMC device ID
so this commit changes the condition to retry to get device id
when cc is not IPMI_CC_NO_ERROR.
Signed-off-by: Terry Duncan <terry.s.duncan@intel.com>
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Message-Id: <20210225045027.9344-1-jae.hyun.yoo@linux.intel.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char/ipmi/ipmi_msghandler.c')
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index c44ad18464f1..f19f0f967e28 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -2447,10 +2447,8 @@ retry: wait_event(intf->waitq, bmc->dyn_id_set != 2); if (!bmc->dyn_id_set) { - if ((bmc->cc == IPMI_DEVICE_IN_FW_UPDATE_ERR - || bmc->cc == IPMI_DEVICE_IN_INIT_ERR - || bmc->cc == IPMI_NOT_IN_MY_STATE_ERR) - && ++retry_count <= GET_DEVICE_ID_MAX_RETRY) { + if (bmc->cc != IPMI_CC_NO_ERROR && + ++retry_count <= GET_DEVICE_ID_MAX_RETRY) { msleep(500); dev_warn(intf->si_dev, "BMC returned 0x%2.2x, retry get bmc device id\n", |