scsi: hisi_sas: config ATA de-reset as an constrained command for v3 hw
authorXiang Chen <chenxiang66@hisilicon.com>
Wed, 2 May 2018 15:56:31 +0000 (23:56 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 8 May 2018 05:10:44 +0000 (01:10 -0400)
commit9413532788df7470297dd0475995c5dc5b07f362
tree4233fcdf93794bdea1ec7d9c1b009f217ec5ea41
parentc2c1d9ded0a2c06df300e244220708f5c1f1db77
scsi: hisi_sas: config ATA de-reset as an constrained command for v3 hw

As a unconstrained command, a command can be sent to SATA disk even if
SATA disk status is BUSY, ERR or DRQ.

If an ATA reset assert is successful but ATA reset de-assert fails, then
it will retry the reset de-assert. If reset de- assert retry is
successful, we think it is okay to probe the device but actually it
still has Err status.

Apparently we need to retry the ATA reset assertion and de- assertion
instead for this mentioned scenario.

As such, we config ATA reset assert as a constrained command, if ATA
reset de-assert fails, then ATA reset de-assert retry will also
fail. Then we will retry the proper process of ATA reset assert and
de-assert again.

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