aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hisi_sas/hisi_sas.h
diff options
context:
space:
mode:
authorXiang Chen <chenxiang66@hisilicon.com>2019-09-06 20:55:36 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-09-10 22:28:57 -0400
commit97b151e75861674a176ff8fb5e243dc2aa066af4 (patch)
tree93e2ff3d49f820c4eb73eccc4d305c38d8518ee2 /drivers/scsi/hisi_sas/hisi_sas.h
parent7ec7082c57ecdd8d37040d31203951f7e2e8e218 (diff)
downloadlinux-97b151e75861674a176ff8fb5e243dc2aa066af4.tar.gz
scsi: hisi_sas: Add BIST support for phy loopback
Add BIST (built in self test) support for phy loopback. Through the new debugfs interface, the user can configure loopback mode/linkrate/phy id/code mode before enabling it. And also user can enable/disable BIST function. Link: https://lore.kernel.org/r/1567774537-20003-13-git-send-email-john.garry@huawei.com 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>
Diffstat (limited to 'drivers/scsi/hisi_sas/hisi_sas.h')
-rw-r--r--drivers/scsi/hisi_sas/hisi_sas.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index ccbe4563402a..720c4d6be939 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -310,6 +310,7 @@ struct hisi_sas_hw {
int delay_ms, int timeout_ms);
void (*snapshot_prepare)(struct hisi_hba *hisi_hba);
void (*snapshot_restore)(struct hisi_hba *hisi_hba);
+ int (*set_bist)(struct hisi_hba *hisi_hba, bool enable);
void (*read_iost_itct_cache)(struct hisi_hba *hisi_hba,
enum hisi_sas_debugfs_cache_type type,
u32 *cache);
@@ -391,6 +392,14 @@ struct hisi_hba {
int cq_nvecs;
unsigned int *reply_map;
+ /* bist */
+ enum sas_linkrate debugfs_bist_linkrate;
+ int debugfs_bist_code_mode;
+ int debugfs_bist_phy_no;
+ int debugfs_bist_mode;
+ u32 debugfs_bist_cnt;
+ int debugfs_bist_enable;
+
/* debugfs memories */
/* Put Global AXI and RAS Register into register array */
u32 *debugfs_regs[DEBUGFS_REGS_NUM];
@@ -404,6 +413,7 @@ struct hisi_hba {
struct dentry *debugfs_dir;
struct dentry *debugfs_dump_dentry;
+ struct dentry *debugfs_bist_dentry;
bool debugfs_snapshot;
};