OSDN Git Service

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)
commit4d0951ee70d348b694ce2bbdcc65b684239da4b4
treefc5cf8fbfd3fa4460d8abee2a9c97cf47b09b8e4
parent336bd78bdabf39dbcee6b41f9628c6e51d1c25b0
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