scsi: hisi_sas: Release all remaining resources in clear nexus ha
authorXiaofei Tan <tanxiaofei@huawei.com>
Thu, 31 May 2018 12:50:47 +0000 (20:50 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 20 Jun 2018 02:02:25 +0000 (22:02 -0400)
commitf2ae8d04327f14ff93a263af265bc91c689c208e
tree8446b51cb9ab01599f7fa80087b026931b402cd5
parented99e1d94936bb33fc32d1f0151ae42c051e0d42
scsi: hisi_sas: Release all remaining resources in clear nexus ha

In host reset, we use TMF or soft-reset to re-init device, and if success,
we will release all LLDD resources of this device. If the init fails -
maybe because the device was removed or link has not come up - then do not
release the LLDD resources, but rather rely on SCSI EH to handle the
timeout for these resources later on.

But if clear nexus ha calls host reset, which is the last effort of SCSI
EH, we should release all LLDD remain resources. Because SCSI EH will
release all tasks after clear nexus ha.

Before release, we do I_T nexus reset to try to clear target remain IOs.

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_main.c