scsi: hisi_sas: fix timeout check in hisi_sas_internal_task_abort()
authorXiang Chen <chenxiang66@hisilicon.com>
Wed, 14 Jun 2017 15:33:11 +0000 (23:33 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 20 Jun 2017 01:31:25 +0000 (21:31 -0400)
commitf64a6988268aae866bb6ce6edb910d454ccef331
treea6aa6d68c1f07477c50a13dac95311db4d6d0259
parent1080f7ec612569e47b747189b38e4b0aa9f14013
scsi: hisi_sas: fix timeout check in hisi_sas_internal_task_abort()

We need to check for timeout before task status, or the task will be
mistook as completed internal abort command.  Also add protection for
sas_task.task_state_flags in hisi_sas_tmf_timedout().

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.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