aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfi.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/bfa/bfi.h')
-rw-r--r--drivers/scsi/bfa/bfi.h68
1 files changed, 63 insertions, 5 deletions
diff --git a/drivers/scsi/bfa/bfi.h b/drivers/scsi/bfa/bfi.h
index 57b146bca18c..e70e0832eafd 100644
--- a/drivers/scsi/bfa/bfi.h
+++ b/drivers/scsi/bfa/bfi.h
@@ -973,6 +973,7 @@ enum bfi_diag_i2h {
973 BFI_DIAG_I2H_LEDTEST = BFA_I2HM(BFI_DIAG_H2I_LEDTEST), 973 BFI_DIAG_I2H_LEDTEST = BFA_I2HM(BFI_DIAG_H2I_LEDTEST),
974 BFI_DIAG_I2H_QTEST = BFA_I2HM(BFI_DIAG_H2I_QTEST), 974 BFI_DIAG_I2H_QTEST = BFA_I2HM(BFI_DIAG_H2I_QTEST),
975 BFI_DIAG_I2H_DPORT = BFA_I2HM(BFI_DIAG_H2I_DPORT), 975 BFI_DIAG_I2H_DPORT = BFA_I2HM(BFI_DIAG_H2I_DPORT),
976 BFI_DIAG_I2H_DPORT_SCN = BFA_I2HM(8),
976}; 977};
977 978
978#define BFI_DIAG_MAX_SGES 2 979#define BFI_DIAG_MAX_SGES 2
@@ -1064,16 +1065,73 @@ struct bfi_diag_qtest_req_s {
1064enum bfi_dport_req { 1065enum bfi_dport_req {
1065 BFI_DPORT_DISABLE = 0, /* disable dport request */ 1066 BFI_DPORT_DISABLE = 0, /* disable dport request */
1066 BFI_DPORT_ENABLE = 1, /* enable dport request */ 1067 BFI_DPORT_ENABLE = 1, /* enable dport request */
1068 BFI_DPORT_START = 2, /* start dport request */
1069 BFI_DPORT_SHOW = 3, /* show dport request */
1070 BFI_DPORT_DYN_DISABLE = 4, /* disable dynamic dport request */
1071};
1072
1073enum bfi_dport_scn {
1074 BFI_DPORT_SCN_TESTSTART = 1,
1075 BFI_DPORT_SCN_TESTCOMP = 2,
1076 BFI_DPORT_SCN_SFP_REMOVED = 3,
1077 BFI_DPORT_SCN_DDPORT_ENABLE = 4,
1078 BFI_DPORT_SCN_DDPORT_DISABLE = 5,
1079 BFI_DPORT_SCN_FCPORT_DISABLE = 6,
1080 BFI_DPORT_SCN_SUBTESTSTART = 7,
1081 BFI_DPORT_SCN_TESTSKIP = 8,
1082 BFI_DPORT_SCN_DDPORT_DISABLED = 9,
1067}; 1083};
1068 1084
1069struct bfi_diag_dport_req_s { 1085struct bfi_diag_dport_req_s {
1070 struct bfi_mhdr_s mh; /* 4 bytes */ 1086 struct bfi_mhdr_s mh; /* 4 bytes */
1071 u8 req; /* request 1: enable 0: disable */ 1087 u8 req; /* request 1: enable 0: disable */
1072 u8 status; /* reply status */ 1088 u8 rsvd[3];
1073 u8 rsvd[2]; 1089 u32 lpcnt;
1074 u32 msgtag; /* msgtag for reply */ 1090 u32 payload;
1091};
1092
1093struct bfi_diag_dport_rsp_s {
1094 struct bfi_mhdr_s mh; /* header 4 bytes */
1095 bfa_status_t status; /* reply status */
1096 wwn_t pwwn; /* switch port wwn. 8 bytes */
1097 wwn_t nwwn; /* switch node wwn. 8 bytes */
1098};
1099
1100struct bfi_diag_dport_scn_teststart_s {
1101 wwn_t pwwn; /* switch port wwn. 8 bytes */
1102 wwn_t nwwn; /* switch node wwn. 8 bytes */
1103 u8 type; /* bfa_diag_dport_test_type_e */
1104 u8 rsvd[3];
1105 u32 numfrm; /* from switch uint in 1M */
1106};
1107
1108struct bfi_diag_dport_scn_testcomp_s {
1109 u8 status; /* bfa_diag_dport_test_status_e */
1110 u8 speed; /* bfa_port_speed_t */
1111 u16 numbuffer; /* from switch */
1112 u8 subtest_status[DPORT_TEST_MAX]; /* 4 bytes */
1113 u32 latency; /* from switch */
1114 u32 distance; /* from swtich unit in meters */
1115 /* Buffers required to saturate the link */
1116 u16 frm_sz; /* from switch for buf_reqd */
1117 u8 rsvd[2];
1118};
1119
1120struct bfi_diag_dport_scn_s { /* max size == RDS_RMESZ */
1121 struct bfi_mhdr_s mh; /* header 4 bytes */
1122 u8 state; /* new state */
1123 u8 rsvd[3];
1124 union {
1125 struct bfi_diag_dport_scn_teststart_s teststart;
1126 struct bfi_diag_dport_scn_testcomp_s testcomp;
1127 } info;
1128};
1129
1130union bfi_diag_dport_msg_u {
1131 struct bfi_diag_dport_req_s req;
1132 struct bfi_diag_dport_rsp_s rsp;
1133 struct bfi_diag_dport_scn_s scn;
1075}; 1134};
1076#define bfi_diag_dport_rsp_t struct bfi_diag_dport_req_s
1077 1135
1078/* 1136/*
1079 * PHY module specific 1137 * PHY module specific