]> git.proxmox.com Git - mirror_ubuntu-artful-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 16 Feb 2018 17:42:18 +0000 (12:42 -0500)
commitd3b286e634f8c7b22d705a9550cd9c46942d654d
tree2f80a4f0e0d0a7ebec840040c841aa8a8761ac18
parent22882821ac3dc26f2bacae617bd168676e884f95
scsi: hisi_sas: complete all tasklets prior to host reset

BugLink: https://bugs.launchpad.net/bugs/1739807
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>
(backported from commit 571295f8055c0b69c9911021ae6cf1a6973cf517)
[ dannf: dropped change in hisi_sas_v3_hw.c reset handler, which didn't
  yet exit; resolved trivial merge conflict in hisi_sas.h ]
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Paolo Pisati <paolo.pisati@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.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