diff options
author | Xiang Chen <chenxiang66@hisilicon.com> | 2016-11-07 20:48:38 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-25 09:54:40 -0500 |
commit | 04708ff4c29522927de46424637e5a7c835a2e88 (patch) | |
tree | 543335d4de0916c03a8c90c208658cad76f7fcd3 /drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | |
parent | ee44bfe45769b3c73b995438f63e31363953933c (diff) | |
download | blackbird-op-linux-04708ff4c29522927de46424637e5a7c835a2e88.tar.gz blackbird-op-linux-04708ff4c29522927de46424637e5a7c835a2e88.zip |
scsi: hisi_sas: check SATA FIS when directly attaching SATA device
Check ERR bit of status to decide whether there is something wrong with
initial register-D2H FIS. If error exists, PHY reset the channel to
restart OOB.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas/hisi_sas_v2_hw.c')
-rw-r--r-- | drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index a5faa4d9a48b..cda3baf9423d 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c @@ -2537,6 +2537,16 @@ static irqreturn_t sata_int_v2_hw(int irq_no, void *p) goto end; } + /* check ERR bit of Status Register */ + if (fis->status & ATA_ERR) { + dev_warn(dev, "sata int: phy%d FIS status: 0x%x\n", phy_no, + fis->status); + disable_phy_v2_hw(hisi_hba, phy_no); + enable_phy_v2_hw(hisi_hba, phy_no); + res = IRQ_NONE; + goto end; + } + if (unlikely(phy_no == 8)) { u32 port_state = hisi_sas_read32(hisi_hba, PORT_STATE); |