提交 62600381 编写于 作者: I Igor Pylypiv 提交者: Zheng Zengkai

scsi: pm80xx: Increase timeout for pm80xx mpi_uninit_check()

stable inclusion
from stable-5.10.37
commit a613887c4126bdde28280e2de340e44f2604c728
bugzilla: 51868
CVE: NA

--------------------------------

[ Upstream commit 3f744a14 ]

The mpi_uninit_check() takes longer for inbound doorbell register to be
cleared. Increase the timeout substantially so that the driver does not
fail to load.

Previously, the inbound doorbell wait time was mistakenly increased in the
mpi_init_check() instead of mpi_uninit_check(). It is okay to leave the
mpi_init_check() wait time as-is as these are timeout values and if there
is a failure, waiting longer is not an issue.

Link: https://lore.kernel.org/r/20210406180534.1924345-2-ipylypiv@google.com
Fixes: e90e2362 ("scsi: pm80xx: Increase timeout for pm80xx mpi_uninit_check")
Reviewed-by: NVishakha Channapattan <vishakhavc@google.com>
Acked-by: NJack Wang <jinpu.wang@ionos.com>
Signed-off-by: NIgor Pylypiv <ipylypiv@google.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 02d1afa7
......@@ -1488,9 +1488,9 @@ static int mpi_uninit_check(struct pm8001_hba_info *pm8001_ha)
/* wait until Inbound DoorBell Clear Register toggled */
if (IS_SPCV_12G(pm8001_ha->pdev)) {
max_wait_count = 4 * 1000 * 1000;/* 4 sec */
max_wait_count = 30 * 1000 * 1000; /* 30 sec */
} else {
max_wait_count = 2 * 1000 * 1000;/* 2 sec */
max_wait_count = 15 * 1000 * 1000; /* 15 sec */
}
do {
udelay(1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册