]> 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)
commit0a74328a5e1c5b767ee398aa4ca086d6d0e6093e
treefc5cf8fbfd3fa4460d8abee2a9c97cf47b09b8e4
parentdb01728119981b28d05356122fae57771fc4ccc3
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