]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
scsi: hisi_sas: Send HARD RESET to clear the previous affiliation of STP target port
authorXiang Chen <chenxiang66@hisilicon.com>
Thu, 28 Feb 2019 14:51:01 +0000 (22:51 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 7 Mar 2019 00:26:46 +0000 (19:26 -0500)
commit57dbb2b218eb6b4faa39025e3e5974742a4e8986
tree46d6ac77a3db6b5260a4fe4c58ff86eaa933e89f
parentefdcad62e7b8a02fcccc5ccca57806dce1482ac8
scsi: hisi_sas: Send HARD RESET to clear the previous affiliation of STP target port

If we exchange SAS expander from one SAS controller to other SAS controller
without powering it down, the STP target port will maintain previous
affiliation and reject all subsequent connection requests from other STP
initiator ports with OPEN_REJECT (STP RESOURCES BUSY).

To solve this issue, send HARD RESET to clear the previous affiliation of
STP target port according to SPL (chapter 6.19.4).

We (re-)introduce dev status flag to know if to sleep in NEXUS reset code
or not for remote PHYs. The idea is that if the device is being
initialised, we don't require the delay, and caller would wait for link to
be established, cf. sas_ata_hard_reset().

Co-developed-by: Luo Jiaxing <luojiaxing@huawei.com>
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.h
drivers/scsi/hisi_sas/hisi_sas_main.c
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c