]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: hisi_sas: complete all tasklets prior to host reset
authorXiaofei Tan <tanxiaofei@huawei.com>
Tue, 24 Oct 2017 15:51:47 +0000 (23:51 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 31 Oct 2017 16:28:01 +0000 (12:28 -0400)
commit09153628c00feb50f403ac01425d42e782b5fa8f
tree21832e1afa9fd005bd89b063f4e39a982f5d1c8a
parentf2161f45ddc8d6156303c96ce11b4b34c50dc26a
scsi: hisi_sas: complete all tasklets prior to host reset

The CQ event is handled in tasklet context, and it could be delayed if
the system loading is high.

It is possible to run into some problems when executing a host reset
when cq_tasklet_vx_hw() is being executed.

So, prior to host reset, execute tasklet_kill() to ensure that all CQ
tasklets are complete.

Besides, as the function hisi_sas_wait_tasklets_done() is added to do
tasklet_kill(), this patch refactors some code where tasklet_kill() is
used.

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>
drivers/scsi/hisi_sas/hisi_sas.h
drivers/scsi/hisi_sas/hisi_sas_main.c
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c