aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hisi_sas/hisi_sas.h
diff options
context:
space:
mode:
authorXiaofei Tan <tanxiaofei@huawei.com>2017-04-10 21:21:56 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2017-04-11 22:01:03 -0400
commitc7b9d369e4073399f97e6e090570f7df80f050dc (patch)
tree8d869c6b29265dc9dbf3b35fa3394359a5648ded /drivers/scsi/hisi_sas/hisi_sas.h
parentscsi: libfc: directly call ELS request handlers (diff)
downloadlinux-dev-c7b9d369e4073399f97e6e090570f7df80f050dc.tar.xz
linux-dev-c7b9d369e4073399f97e6e090570f7df80f050dc.zip
scsi: hisi_sas: workaround STP link SoC bug
After resetting the controller, the process of scanning SATA disks attached to an expander may fail occasionally. The issue is that the controller can't close the STP link created by target if the max link time is 0. To workaround this issue, we reject STP link after resetting the controller, and change the corresponding PHY to accept STP link only after receiving data. We do this check in cq interrupt handler. In order not to reduce efficiency, we use an variable to control whether we should check and change PHY to accept STP link. The function phys_reject_stp_links_v2_hw() should be called after resetting the controller. The solution of another SoC bug "SATA IO timeout", that also uses the same register to control STP link, is not effective before the PHY accepts STP link. Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas/hisi_sas.h')
-rw-r--r--drivers/scsi/hisi_sas/hisi_sas.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index 6aa0b62fea86..72347b6fc47f 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -203,6 +203,7 @@ struct hisi_hba {
int slot_index_count;
unsigned long *slot_index_tags;
+ unsigned long reject_stp_links_msk;
/* SCSI/SAS glue */
struct sas_ha_struct sha;