OSDN Git Service

scsi: hisi_sas: Add device link between SCSI devices and hisi_hba
authorXiang Chen <chenxiang66@hisilicon.com>
Fri, 2 Oct 2020 14:30:36 +0000 (22:30 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 7 Oct 2020 00:47:06 +0000 (20:47 -0400)
commit16fd4a7c5917097e9a3da03b39a92381eee40724
tree8c1466f6c5bc7142c2574c034f75419130a03ee4
parente06596d5000c58f35721f334fe2eee28e3b01a77
scsi: hisi_sas: Add device link between SCSI devices and hisi_hba

Runtime PM of SCSI devices is already supported in SCSI layer, we can
suspend/resume every SCSI device separately. But if there is no link
between hisi_hba and SCSI devices or SCSI targets it will cause issues if
the controller is suspended while SCSI devices are still resuming.  Only
when all the SCSI devices under the controller are suspended, the
controller can be suspended. Add the device link between SCSI devices
and the controller.

Link: https://lore.kernel.org/r/1601649038-25534-6-git-send-email-john.garry@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_v3_hw.c