scsi: hisi_sas: Modify v3 hw STP_LINK_TIMER setting
authorXiang Chen <chenxiang66@hisilicon.com>
Thu, 10 Aug 2017 16:09:36 +0000 (00:09 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 11 Aug 2017 00:15:02 +0000 (20:15 -0400)
Modify STP link timer from 10ms to 500ms. Also add the register address.

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

index dc5c5515d5c3b778564837e9522d51616dbf9d54..bb79b7763cba1405aae6b05f8307e455c90c5b0a 100644 (file)
 #define TX_HARDRST_MSK          (0x1 << TX_HARDRST_OFF)
 #define RX_IDAF_DWORD0                 (PORT_BASE + 0xc4)
 #define RXOP_CHECK_CFG_H               (PORT_BASE + 0xfc)
+#define STP_LINK_TIMER                 (PORT_BASE + 0x120)
 #define SAS_SSP_CON_TIMER_CFG          (PORT_BASE + 0x134)
 #define SAS_SMP_CON_TIMER_CFG          (PORT_BASE + 0x138)
 #define SAS_STP_CON_TIMER_CFG          (PORT_BASE + 0x13c)
@@ -401,6 +402,8 @@ static void init_reg_v3_hw(struct hisi_hba *hisi_hba)
                                     0xa0064);
                hisi_sas_phy_write32(hisi_hba, i, SAS_STP_CON_TIMER_CFG,
                                     0xa0064);
+               hisi_sas_phy_write32(hisi_hba, i, STP_LINK_TIMER,
+                                    0x7f7a120);
        }
        for (i = 0; i < hisi_hba->queue_count; i++) {
                /* Delivery queue */