]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: hisi_sas: add v3 hw suspend and resume
authorXiang Chen <chenxiang66@hisilicon.com>
Fri, 8 Dec 2017 17:16:50 +0000 (01:16 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 21 Dec 2017 02:11:44 +0000 (21:11 -0500)
commitb4639274adf8a3a726f580e75818bc95a596f7ee
treefc5cf8fbfd3fa4460d8abee2a9c97cf47b09b8e4
parent5b224ae49be458922bdb60e52f08a9a47c333264
scsi: hisi_sas: add v3 hw suspend and resume

For v3 hw SAS, it supports configuring power state from D0 to D3 for entering
Low Power status and power state from D3 to D0 for quit Low Power status.

When power state from D0 to D3, HW will send FLR to clear the registers of
ECAM and BAR space, and when power state from D3 to D0, it will clear the
registers of ECAM space only.

So when suspend, need to do like controller reset (including disable
interrupts/DQ/PHY/BUS), and also release slots after FLR. When resume,
re-config the registers of BAR space.

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