diff options
author | Xiaofei Tan <tanxiaofei@huawei.com> | 2018-05-21 18:09:20 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-05-28 22:40:32 -0400 |
commit | a865ae14ff62797f14b760b2063b90c81d27d178 (patch) | |
tree | 1007d145432328d4b4e263b7165e5c9d1161e511 /drivers/crypto/sahara.c | |
parent | 6175abdeaeaf2602f3e92bd4eca5916e98efe996 (diff) |
scsi: hisi_sas: Try wait commands before before controller reset
We may reset the controller in many scenarios, such as SCSI EH and HW
errors. There should be no IO which returns from target when SCSI EH is
active. But for other scenarios, there may be. It is not necessary to make
such IOs fail.
This patch adds an function of trying to wait for any commands, or IO, to
complete before host reset. If no more CQ returned from host controller in
100ms, we assume no more IO can return, and then stop waiting. We wait 5s
at most.
The HW has a register CQE_SEND_CNT to indicate the total number of CQs that
has been reported to driver. We can use this register and it is reliable to
resd this register in such scenarios that require host reset.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/crypto/sahara.c')
0 files changed, 0 insertions, 0 deletions