scsi: hisi_sas: Terminate STP reject quickly for v2 hw
authorXiaofei Tan <tanxiaofei@huawei.com>
Mon, 21 May 2018 10:09:23 +0000 (18:09 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 29 May 2018 02:40:32 +0000 (22:40 -0400)
commit31709548d2aca9861a72e2890d62fc87c52199de
tree80ec90612effbd594966ae1b279b39537e51e9cb
parentb09fcd09e9767f81187aa4036fb16d14e2f2fc79
scsi: hisi_sas: Terminate STP reject quickly for v2 hw

For v2 hw, STP link from target is rejected after host reset because of a
SoC bug. The STP reject will be terminated after we have sent IO from each
PHY of a port.

This is not an problem before, as we don't need to setup STP link from
target immediately after host reset. But now, it is.  Because we want to
send soft-reset immediately after host reset.

In order to terminate STP reject quickly, this patch send ATA reset command
through each PHY of a port. Notes: ATA reset command don't need target's
response.

Besides, we do abort dev for each device before terminating STP reject.
This is a quirk of v2 hw.

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