]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: hisi_sas: add an mechanism to do reset work synchronously
authorXiaofei Tan <tanxiaofei@huawei.com>
Fri, 8 Dec 2017 17:16:38 +0000 (01:16 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 Dec 2017 02:25:02 +0000 (21:25 -0500)
commit79b0690382ba6854ac488fccfd061162ee700507
tree7c21733cbf6c3ce63bd37a08b5bd33bb584870e0
parente9e12aaf6ac77a3ffc97175961f3d0c6605d289d
scsi: hisi_sas: add an mechanism to do reset work synchronously

Sometimes it is required to know when the controller reset has completed and
also if it has completed successfully.  For such places, we call
hisi_sas_controller_reset() directly before. That may lead to multiple calls
to this function.

This patch create a per-reset structure which contains a completion structure
and status flag to know when the reset completes and also the status. It is
also in hisi_hba.wq to do reset work.

As all host reset works are done in hisi_hba.wq, we don't worry multiple calls
to hisi_sas_controller_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>
drivers/scsi/hisi_sas/hisi_sas.h
drivers/scsi/hisi_sas/hisi_sas_main.c