@@ -132,27 +132,35 @@ enum bfa_status {
132132 BFA_STATUS_EPROTOCOL = 6 , /* Protocol error */
133133 BFA_STATUS_SFP_UNSUPP = 10 , /* Unsupported SFP - Replace SFP */
134134 BFA_STATUS_UNKNOWN_VFID = 11 , /* VF_ID not found */
135+ BFA_STATUS_DATACORRUPTED = 12 , /* Diag returned data corrupted */
135136 BFA_STATUS_DEVBUSY = 13 , /* Device busy - Retry operation */
137+ BFA_STATUS_HDMA_FAILED = 16 , /* Host dma failed contact support */
136138 BFA_STATUS_FLASH_BAD_LEN = 17 , /* Flash bad length */
137139 BFA_STATUS_UNKNOWN_LWWN = 18 , /* LPORT PWWN not found */
138140 BFA_STATUS_UNKNOWN_RWWN = 19 , /* RPORT PWWN not found */
139141 BFA_STATUS_VPORT_EXISTS = 21 , /* VPORT already exists */
140142 BFA_STATUS_VPORT_MAX = 22 , /* Reached max VPORT supported limit */
141143 BFA_STATUS_UNSUPP_SPEED = 23 , /* Invalid Speed Check speed setting */
142144 BFA_STATUS_INVLD_DFSZ = 24 , /* Invalid Max data field size */
145+ BFA_STATUS_CMD_NOTSUPP = 26 , /* Command/API not supported */
143146 BFA_STATUS_FABRIC_RJT = 29 , /* Reject from attached fabric */
144147 BFA_STATUS_PORT_OFFLINE = 34 , /* Port is not online */
145148 BFA_STATUS_VPORT_WWN_BP = 46 , /* WWN is same as base port's WWN */
149+ BFA_STATUS_PORT_NOT_DISABLED = 47 , /* Port not disabled disable port */
146150 BFA_STATUS_NO_FCPIM_NEXUS = 52 , /* No FCP Nexus exists with the rport */
147151 BFA_STATUS_IOC_FAILURE = 56 , /* IOC failure - Retry, if persists
148152 * contact support */
149153 BFA_STATUS_INVALID_WWN = 57 , /* Invalid WWN */
154+ BFA_STATUS_ADAPTER_ENABLED = 60 , /* Adapter is not disabled */
150155 BFA_STATUS_IOC_NON_OP = 61 , /* IOC is not operational */
151156 BFA_STATUS_VERSION_FAIL = 70 , /* Application/Driver version mismatch */
152157 BFA_STATUS_DIAG_BUSY = 71 , /* diag busy */
158+ BFA_STATUS_BEACON_ON = 72 , /* Port Beacon already on */
153159 BFA_STATUS_ENOFSAVE = 78 , /* No saved firmware trace */
154160 BFA_STATUS_IOC_DISABLED = 82 , /* IOC is already disabled */
155161 BFA_STATUS_NO_SFP_DEV = 89 , /* No SFP device check or replace SFP */
162+ BFA_STATUS_MEMTEST_FAILED = 90 , /* Memory test failed contact support */
163+ BFA_STATUS_LEDTEST_OP = 109 , /* LED test is operating */
156164 BFA_STATUS_INVALID_MAC = 134 , /* Invalid MAC address */
157165 BFA_STATUS_PBC = 154 , /* Operation not allowed for pre-boot
158166 * configuration */
@@ -881,6 +889,56 @@ struct bfa_flash_attr_s {
881889 struct bfa_flash_part_attr_s part [BFA_FLASH_PART_MAX ];
882890};
883891
892+ /*
893+ * DIAG module specific
894+ */
895+ #define LB_PATTERN_DEFAULT 0xB5B5B5B5
896+ #define QTEST_CNT_DEFAULT 10
897+ #define QTEST_PAT_DEFAULT LB_PATTERN_DEFAULT
898+
899+ struct bfa_diag_memtest_s {
900+ u8 algo ;
901+ u8 rsvd [7 ];
902+ };
903+
904+ struct bfa_diag_memtest_result {
905+ u32 status ;
906+ u32 addr ;
907+ u32 exp ; /* expect value read from reg */
908+ u32 act ; /* actually value read */
909+ u32 err_status ; /* error status reg */
910+ u32 err_status1 ; /* extra error info reg */
911+ u32 err_addr ; /* error address reg */
912+ u8 algo ;
913+ u8 rsv [3 ];
914+ };
915+
916+ struct bfa_diag_loopback_result_s {
917+ u32 numtxmfrm ; /* no. of transmit frame */
918+ u32 numosffrm ; /* no. of outstanding frame */
919+ u32 numrcvfrm ; /* no. of received good frame */
920+ u32 badfrminf ; /* mis-match info */
921+ u32 badfrmnum ; /* mis-match fram number */
922+ u8 status ; /* loopback test result */
923+ u8 rsvd [3 ];
924+ };
925+
926+ struct bfa_diag_ledtest_s {
927+ u32 cmd ; /* bfa_led_op_t */
928+ u32 color ; /* bfa_led_color_t */
929+ u16 freq ; /* no. of blinks every 10 secs */
930+ u8 led ; /* bitmap of LEDs to be tested */
931+ u8 rsvd [5 ];
932+ };
933+
934+ struct bfa_diag_loopback_s {
935+ u32 loopcnt ;
936+ u32 pattern ;
937+ u8 lb_mode ; /* bfa_port_opmode_t */
938+ u8 speed ; /* bfa_port_speed_t */
939+ u8 rsvd [2 ];
940+ };
941+
884942#pragma pack()
885943
886944#endif /* __BFA_DEFS_H__ */
0 commit comments