Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f4bfadd authored by Jing Huang's avatar Jing Huang Committed by James Bottomley
Browse files

[SCSI] bfa: remove unused defintions and misc cleanups



This patch removes unused functions, data strucutres, and definitions.  It
also includes misc comment and formatting cleanups.

Signed-off-by: default avatarJing Huang <huangj@brocade.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 2f2f40a4
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -334,8 +334,6 @@ void bfa_hwct_msix_get_rme_range(struct bfa_s *bfa, u32 *start,
void bfa_iocfc_get_bootwwns(struct bfa_s *bfa, u8 *nwwns, wwn_t *wwns);
void bfa_iocfc_get_bootwwns(struct bfa_s *bfa, u8 *nwwns, wwn_t *wwns);
wwn_t bfa_iocfc_get_pwwn(struct bfa_s *bfa);
wwn_t bfa_iocfc_get_pwwn(struct bfa_s *bfa);
wwn_t bfa_iocfc_get_nwwn(struct bfa_s *bfa);
wwn_t bfa_iocfc_get_nwwn(struct bfa_s *bfa);
void bfa_iocfc_get_pbc_boot_cfg(struct bfa_s *bfa,
				struct bfa_boot_pbc_s *pbcfg);
int bfa_iocfc_get_pbc_vports(struct bfa_s *bfa,
int bfa_iocfc_get_pbc_vports(struct bfa_s *bfa,
				struct bfi_pbc_vport_s *pbc_vport);
				struct bfi_pbc_vport_s *pbc_vport);


+0 −12
Original line number Original line Diff line number Diff line
@@ -998,18 +998,6 @@ bfa_iocfc_get_bootwwns(struct bfa_s *bfa, u8 *nwwns, wwn_t *wwns)
	memcpy(wwns, cfgrsp->bootwwns.wwn, sizeof(cfgrsp->bootwwns.wwn));
	memcpy(wwns, cfgrsp->bootwwns.wwn, sizeof(cfgrsp->bootwwns.wwn));
}
}


void
bfa_iocfc_get_pbc_boot_cfg(struct bfa_s *bfa, struct bfa_boot_pbc_s *pbcfg)
{
	struct bfa_iocfc_s *iocfc = &bfa->iocfc;
	struct bfi_iocfc_cfgrsp_s *cfgrsp = iocfc->cfgrsp;

	pbcfg->enable = cfgrsp->pbc_cfg.boot_enabled;
	pbcfg->nbluns = cfgrsp->pbc_cfg.nbluns;
	pbcfg->speed = cfgrsp->pbc_cfg.port_speed;
	memcpy(pbcfg->pblun, cfgrsp->pbc_cfg.blun, sizeof(pbcfg->pblun));
}

int
int
bfa_iocfc_get_pbc_vports(struct bfa_s *bfa, struct bfi_pbc_vport_s *pbc_vport)
bfa_iocfc_get_pbc_vports(struct bfa_s *bfa, struct bfi_pbc_vport_s *pbc_vport)
{
{
+140 −448
Original line number Original line Diff line number Diff line
@@ -24,7 +24,6 @@ typedef u64 wwn_t;


#define WWN_NULL	(0)
#define WWN_NULL	(0)
#define FC_SYMNAME_MAX	256	/*  max name server symbolic name size */
#define FC_SYMNAME_MAX	256	/*  max name server symbolic name size */
#define FC_ALPA_MAX	128


#pragma pack(1)
#pragma pack(1)


@@ -39,7 +38,6 @@ struct mac_s { u8 mac[MAC_ADDRLEN]; };
struct scsi_cdb_s {
struct scsi_cdb_s {
	u8         scsi_cdb[SCSI_MAX_CDBLEN];
	u8         scsi_cdb[SCSI_MAX_CDBLEN];
};
};
#define scsi_cdb_t struct scsi_cdb_s


/* ------------------------------------------------------------
/* ------------------------------------------------------------
 * SCSI status byte values
 * SCSI status byte values
@@ -87,21 +85,6 @@ struct fchs_s {
	u32        ro;		/* relative offset */
	u32        ro;		/* relative offset */
};
};


#define FC_SOF_LEN		4
#define FC_EOF_LEN		4
#define FC_CRC_LEN		4

/*
 * Fibre Channel BB_E Header Structure
 */
struct fcbbehs_s {
	u16	ver_rsvd;
	u32	rsvd[2];
	u32	rsvd__sof;
};

#define FC_SEQ_ID_MAX		256

/*
/*
 * routing bit definitions
 * routing bit definitions
 */
 */
@@ -147,22 +130,6 @@ enum {
	FC_CAT_CMD_STATUS	= 0x7,	/* Command Status */
	FC_CAT_CMD_STATUS	= 0x7,	/* Command Status */
};
};


/*
 * information category for Link Control
 */
enum {
	FC_CAT_ACK_1		= 0x00,
	FC_CAT_ACK_0_N		= 0x01,
	FC_CAT_P_RJT		= 0x02,
	FC_CAT_F_RJT		= 0x03,
	FC_CAT_P_BSY		= 0x04,
	FC_CAT_F_BSY_DATA	= 0x05,
	FC_CAT_F_BSY_LINK_CTL	= 0x06,
	FC_CAT_F_LCR		= 0x07,
	FC_CAT_NTY		= 0x08,
	FC_CAT_END		= 0x09,
};

/*
/*
 * Type Field Definitions. FC-PH Section 18.5 pg. 165
 * Type Field Definitions. FC-PH Section 18.5 pg. 165
 */
 */
@@ -181,10 +148,6 @@ enum {
	FC_TYPE_MAX		= 256,	/* 256 FC-4 types */
	FC_TYPE_MAX		= 256,	/* 256 FC-4 types */
};
};


struct fc_fc4types_s {
	u8         bits[FC_TYPE_MAX / 8];
};

/*
/*
 * Frame Control Definitions. FC-PH Table-45. pg. 168
 * Frame Control Definitions. FC-PH Table-45. pg. 168
 */
 */
@@ -287,7 +250,6 @@ enum {
	FC_ELS_AUTH = 0x90,	/* Authentication. Ref FC-SP */
	FC_ELS_AUTH = 0x90,	/* Authentication. Ref FC-SP */
	FC_ELS_RFCN = 0x97,	/* Request Fabric Change Notification. Ref
	FC_ELS_RFCN = 0x97,	/* Request Fabric Change Notification. Ref
				 *FC-SP */
				 *FC-SP */

};
};


/*
/*
@@ -353,12 +315,9 @@ struct fc_plogi_csp_s {
			query_dbc:1,
			query_dbc:1,
			hg_supp:1;
			hg_supp:1;
#endif
#endif

	__be16		rxsz;		/* recieve data_field size */
	__be16		rxsz;		/* recieve data_field size */

	__be16		conseq;
	__be16		conseq;
	__be16		ro_bitmap;
	__be16		ro_bitmap;

	__be32		e_d_tov;
	__be32		e_d_tov;
};
};


@@ -371,8 +330,7 @@ struct fc_plogi_clp_s {
	u32        class_valid:1;
	u32        class_valid:1;
	u32        intermix:1;	/* class intermix supported if set =1.
	u32        intermix:1;	/* class intermix supported if set =1.
				 * valid only for class1. Reserved for
				 * valid only for class1. Reserved for
					 * class2 & class3
				 * class2 & class3 */
					 */
	u32        reserved1:2;
	u32        reserved1:2;
	u32        sequential:1;
	u32        sequential:1;
	u32        reserved2:3;
	u32        reserved2:3;
@@ -382,11 +340,9 @@ struct fc_plogi_clp_s {
	u32        reserved1:2;
	u32        reserved1:2;
	u32        intermix:1;	/* class intermix supported if set =1.
	u32        intermix:1;	/* class intermix supported if set =1.
				 * valid only for class1. Reserved for
				 * valid only for class1. Reserved for
					 * class2 & class3
				 * class2 & class3 */
					 */
	u32        class_valid:1;
	u32        class_valid:1;
#endif
#endif

	u32        reserved3:24;
	u32        reserved3:24;


	u32        reserved4:16;
	u32        reserved4:16;
@@ -611,17 +567,13 @@ struct fc_prlo_params_page_s {
	u32        type:8;
	u32        type:8;
	u32        type_ext:8;
	u32        type_ext:8;
#ifdef __BIG_ENDIAN
#ifdef __BIG_ENDIAN
	u32        opa_valid:1;	/* originator process associator
	u32        opa_valid:1;	/* originator process associator valid */
					 * valid
					 */
	u32        rpa_valid:1;	/* responder process associator valid */
	u32        rpa_valid:1;	/* responder process associator valid */
	u32        res1:14;
	u32        res1:14;
#else
#else
	u32        res1:14;
	u32        res1:14;
	u32        rpa_valid:1;	/* responder process associator valid */
	u32        rpa_valid:1;	/* responder process associator valid */
	u32        opa_valid:1;	/* originator process associator
	u32        opa_valid:1;	/* originator process associator valid */
					 * valid
					 */
#endif
#endif
	u32        orig_process_assc;
	u32        orig_process_assc;
	u32        resp_process_assc;
	u32        resp_process_assc;
@@ -647,17 +599,13 @@ struct fc_prlo_acc_params_page_s {
	u32        type_ext:8;
	u32        type_ext:8;


#ifdef __BIG_ENDIAN
#ifdef __BIG_ENDIAN
	u32        opa_valid:1;	/* originator process associator
	u32        opa_valid:1;	/* originator process associator valid */
					 * valid
					 */
	u32        rpa_valid:1;	/* responder process associator valid */
	u32        rpa_valid:1;	/* responder process associator valid */
	u32        res1:14;
	u32        res1:14;
#else
#else
	u32        res1:14;
	u32        res1:14;
	u32        rpa_valid:1;	/* responder process associator valid */
	u32        rpa_valid:1;	/* responder process associator valid */
	u32        opa_valid:1;	/* originator process associator
	u32        opa_valid:1;	/* originator process associator valid */
					 * valid
					 */
#endif
#endif
	u32        orig_process_assc;
	u32        orig_process_assc;
	u32        resp_process_assc;
	u32        resp_process_assc;
@@ -886,7 +834,6 @@ struct fc_echo_s {
/*
/*
 * RNID els command
 * RNID els command
 */
 */

#define RNID_NODEID_DATA_FORMAT_COMMON			0x00
#define RNID_NODEID_DATA_FORMAT_COMMON			0x00
#define RNID_NODEID_DATA_FORMAT_FCP3			0x08
#define RNID_NODEID_DATA_FORMAT_FCP3			0x08
#define RNID_NODEID_DATA_FORMAT_DISCOVERY		0xDF
#define RNID_NODEID_DATA_FORMAT_DISCOVERY		0xDF
@@ -979,59 +926,17 @@ enum fc_rpsc_op_speed {
	RPSC_OP_SPEED_8G = 0x0800,
	RPSC_OP_SPEED_8G = 0x0800,
	RPSC_OP_SPEED_16G = 0x0400,
	RPSC_OP_SPEED_16G = 0x0400,


	RPSC_OP_SPEED_NOT_EST = 0x0001,	/*! speed not established */
	RPSC_OP_SPEED_NOT_EST = 0x0001,	/* speed not established */
};
};


struct fc_rpsc_speed_info_s {
struct fc_rpsc_speed_info_s {
	__be16        port_speed_cap;	/*! see enum fc_rpsc_speed_cap */
	__be16        port_speed_cap;	/* see enum fc_rpsc_speed_cap */
	__be16        port_op_speed;	/*! see enum fc_rpsc_op_speed */
	__be16        port_op_speed;	/* see enum fc_rpsc_op_speed */
};

enum link_e2e_beacon_subcmd {
	LINK_E2E_BEACON_ON = 1,
	LINK_E2E_BEACON_OFF = 2
};

enum beacon_type {
	BEACON_TYPE_NORMAL	= 1,	/*! Normal Beaconing. Green */
	BEACON_TYPE_WARN	= 2,	/*! Warning Beaconing. Yellow/Amber */
	BEACON_TYPE_CRITICAL	= 3	/*! Critical Beaconing. Red */
};

struct link_e2e_beacon_param_s {
	u8         beacon_type;	/* Beacon Type. See enum beacon_type */
	u8         beacon_frequency;
					/* Beacon frequency. Number of blinks
					 * per 10 seconds
					 */
	u16        beacon_duration;/* Beacon duration (in Seconds). The
					 * command operation should be
					 * terminated at the end of this
					 * timeout value.
					 *
					 * Ignored if diag_sub_cmd is
					 * LINK_E2E_BEACON_OFF.
					 *
					 * If 0, beaconing will continue till a
					 * BEACON OFF request is received
					 */
};

/*
 * Link E2E beacon request/good response format.
 * For LS_RJTs use struct fc_ls_rjt_s
 */
struct link_e2e_beacon_req_s {
	u32        ls_code;	/*! FC_ELS_E2E_LBEACON in requests *
					 *or FC_ELS_ACC in good replies */
	u32        ls_sub_cmd;	/*! See enum link_e2e_beacon_subcmd */
	struct link_e2e_beacon_param_s beacon_parm;
};
};


/*
/*
 * If RPSC request is sent to the Domain Controller, the request is for
 * If RPSC request is sent to the Domain Controller, the request is for
 * all the ports within that domain (TODO - I don't think FOS implements
 * all the ports within that domain.
 * this...).
 */
 */
struct fc_rpsc_cmd_s {
struct fc_rpsc_cmd_s {
	struct fc_els_cmd_s els_cmd;
	struct fc_els_cmd_s els_cmd;
@@ -1071,6 +976,7 @@ enum fc_rpsc2_port_type {
	RPSC2_PORT_TYPE_NPIV_PORT  = 0x5f,
	RPSC2_PORT_TYPE_NPIV_PORT  = 0x5f,
	RPSC2_PORT_TYPE_NPORT_TRUNK  = 0x6f,
	RPSC2_PORT_TYPE_NPORT_TRUNK  = 0x6f,
};
};

/*
/*
 * RPSC2 portInfo entry structure
 * RPSC2 portInfo entry structure
 */
 */
@@ -1109,10 +1015,6 @@ struct fc_symname_s {
	u8         symname[FC_SYMNAME_MAX];
	u8         symname[FC_SYMNAME_MAX];
};
};


struct fc_alpabm_s {
	u8         alpa_bm[FC_ALPA_MAX / 8];
};

/*
/*
 * protocol default timeout values
 * protocol default timeout values
 */
 */
@@ -1155,19 +1057,6 @@ enum {
	FCP_SRR		= 0x14000000,	/* Sequence Retransmission Request */
	FCP_SRR		= 0x14000000,	/* Sequence Retransmission Request */
};
};


/*
 * SRR FC-4 LS payload
 */
struct fc_srr_s {
	u32	ls_cmd;
	u32        ox_id:16;	/* ox-id */
	u32        rx_id:16;	/* rx-id */
	u32        ro;		/* relative offset */
	u32        r_ctl:8;		/* R_CTL for I.U. */
	u32        res:24;
};


/*
/*
 * FCP_CMND definitions
 * FCP_CMND definitions
 */
 */
@@ -1194,11 +1083,8 @@ struct fcp_cmnd_s {
	u8		iodir:2,	/* read/write FCP_DATA IUs */
	u8		iodir:2,	/* read/write FCP_DATA IUs */
			addl_cdb_len:6;	/* additional CDB length */
			addl_cdb_len:6;	/* additional CDB length */
#endif
#endif
	scsi_cdb_t      cdb;
	struct scsi_cdb_s      cdb;


	/*
	 * !!! additional cdb bytes follows here!!!
	 */
	__be32        fcp_dl;	/* bytes to be transferred */
	__be32        fcp_dl;	/* bytes to be transferred */
};
};


@@ -1215,17 +1101,6 @@ enum fcp_iodir {
	FCP_IODIR_RW    = 3,
	FCP_IODIR_RW    = 3,
};
};


/*
 * Task attribute field
 */
enum {
	FCP_TASK_ATTR_SIMPLE	= 0,
	FCP_TASK_ATTR_HOQ	= 1,
	FCP_TASK_ATTR_ORDERED	= 2,
	FCP_TASK_ATTR_ACA	= 4,
	FCP_TASK_ATTR_UNTAGGED	= 5,	/* obsolete in FCP-3 */
};

/*
/*
 * Task management flags field - only one bit shall be set
 * Task management flags field - only one bit shall be set
 */
 */
@@ -1237,15 +1112,6 @@ enum fcp_tm_cmnd {
	FCP_TM_CLEAR_ACA	= BIT(6),
	FCP_TM_CLEAR_ACA	= BIT(6),
};
};


/*
 * FCP_XFER_RDY IU defines
 */
struct fcp_xfer_rdy_s {
	u32        data_ro;
	u32        burst_len;
	u32        reserved;
};

/*
/*
 * FCP_RSP residue flags
 * FCP_RSP residue flags
 */
 */
@@ -1255,15 +1121,6 @@ enum fcp_residue {
	FCP_RESID_UNDER = 2,    /* less data than requested */
	FCP_RESID_UNDER = 2,    /* less data than requested */
};
};


enum {
	FCP_RSPINFO_GOOD = 0,
	FCP_RSPINFO_DATALEN_MISMATCH = 1,
	FCP_RSPINFO_CMND_INVALID = 2,
	FCP_RSPINFO_ROLEN_MISMATCH = 3,
	FCP_RSPINFO_TM_NOT_SUPP = 4,
	FCP_RSPINFO_TM_FAILED = 5,
};

struct fcp_rspinfo_s {
struct fcp_rspinfo_s {
	u32        res0:24;
	u32        res0:24;
	u32        rsp_code:8;		/* response code (as above) */
	u32        rsp_code:8;		/* response code (as above) */
@@ -1299,12 +1156,6 @@ struct fcp_resp_s {
#define fcp_rspinfo(__fcprsp)	((struct fcp_rspinfo_s *)((__fcprsp) + 1))
#define fcp_rspinfo(__fcprsp)	((struct fcp_rspinfo_s *)((__fcprsp) + 1))
#define fcp_snsinfo(__fcprsp)	(((u8 *)fcp_rspinfo(__fcprsp)) +	\
#define fcp_snsinfo(__fcprsp)	(((u8 *)fcp_rspinfo(__fcprsp)) +	\
						fcp_rsplen(__fcprsp))
						fcp_rsplen(__fcprsp))

struct fcp_cmnd_fr_s {
	struct fchs_s fchs;
	struct fcp_cmnd_s fcp;
};

/*
/*
 * CT
 * CT
 */
 */
@@ -1474,7 +1325,6 @@ struct fcgs_rftid_req_s {
/*
/*
 * RFF_ID : Register FC4 features.
 * RFF_ID : Register FC4 features.
 */
 */

#define FC_GS_FCP_FC4_FEATURE_INITIATOR  0x02
#define FC_GS_FCP_FC4_FEATURE_INITIATOR  0x02
#define FC_GS_FCP_FC4_FEATURE_TARGET	 0x01
#define FC_GS_FCP_FC4_FEATURE_TARGET	 0x01


@@ -1494,7 +1344,7 @@ struct fcgs_gidft_req_s {
	u8	domain_id;	/* domain, 0 - all fabric */
	u8	domain_id;	/* domain, 0 - all fabric */
	u8	area_id;	/* area, 0 - whole domain */
	u8	area_id;	/* area, 0 - whole domain */
	u8	fc4_type;	/* FC_TYPE_FCP for SCSI devices */
	u8	fc4_type;	/* FC_TYPE_FCP for SCSI devices */
};		/* GID_FT Request */
};


/*
/*
 * GID_FT Response
 * GID_FT Response
@@ -1503,7 +1353,7 @@ struct fcgs_gidft_resp_s {
	u8	last:1;		/* last port identifier flag */
	u8	last:1;		/* last port identifier flag */
	u8	reserved:7;
	u8	reserved:7;
	u32	pid:24;		/* port identifier */
	u32	pid:24;		/* port identifier */
};		/* GID_FT Response */
};


/*
/*
 * RSPN_ID
 * RSPN_ID
@@ -1576,16 +1426,11 @@ struct fcgs_ganxt_rsp_s {
	u8		ip[16];		/* IP Address */
	u8		ip[16];		/* IP Address */
	u32		cos;		/* Class of Service */
	u32		cos;		/* Class of Service */
	u32		fc4types[8];	/* FC-4 TYPEs */
	u32		fc4types[8];	/* FC-4 TYPEs */
	wwn_t		fabric_port_name;
	wwn_t		fabric_port_name; /* Fabric Port Name */
					/* Fabric Port Name */
	u32		rsvd:8;		/* Reserved */
	u32		rsvd:8;		/* Reserved */
	u32		hard_addr:24;	/* Hard Address */
	u32		hard_addr:24;	/* Hard Address */
};
};


/*
 * Fabric Config Server
 */

/*
/*
 * Command codes for Fabric Configuration Server
 * Command codes for Fabric Configuration Server
 */
 */
@@ -1596,160 +1441,10 @@ enum {
	GS_FC_PING_CMD	= 0x0401,	/* GS FC Ping */
	GS_FC_PING_CMD	= 0x0401,	/* GS FC Ping */
};
};


/*
 * Source or Destination Port Tags.
 */
enum {
	GS_FTRACE_TAG_NPORT_ID		= 1,
	GS_FTRACE_TAG_NPORT_NAME	= 2,
};

/*
* Port Value : Could be a Port id or wwn
 */
union fcgs_port_val_u {
	u32	nport_id;
	wwn_t		nport_wwn;
};

#define GS_FTRACE_MAX_HOP_COUNT	20
#define GS_FTRACE_REVISION	1

/*
 * Ftrace Related Structures.
 */

/*
 * STR (Switch Trace) Reject Reason Codes. From FC-SW.
 */
enum {
	GS_FTRACE_STR_CMD_COMPLETED_SUCC	= 0,
	GS_FTRACE_STR_CMD_NOT_SUPP_IN_NEXT_SWITCH,
	GS_FTRACE_STR_NO_RESP_FROM_NEXT_SWITCH,
	GS_FTRACE_STR_MAX_HOP_CNT_REACHED,
	GS_FTRACE_STR_SRC_PORT_NOT_FOUND,
	GS_FTRACE_STR_DST_PORT_NOT_FOUND,
	GS_FTRACE_STR_DEVICES_NOT_IN_COMMON_ZONE,
	GS_FTRACE_STR_NO_ROUTE_BW_PORTS,
	GS_FTRACE_STR_NO_ADDL_EXPLN,
	GS_FTRACE_STR_FABRIC_BUSY,
	GS_FTRACE_STR_FABRIC_BUILD_IN_PROGRESS,
	GS_FTRACE_STR_VENDOR_SPECIFIC_ERR_START = 0xf0,
	GS_FTRACE_STR_VENDOR_SPECIFIC_ERR_END = 0xff,
};

/*
 * Ftrace Request
 */
struct fcgs_ftrace_req_s {
	u32	revision;
	u16	src_port_tag;	/* Source Port tag */
	u16	src_port_len;	/* Source Port len */
	union fcgs_port_val_u src_port_val;	/* Source Port value */
	u16	dst_port_tag;	/* Destination Port tag */
	u16	dst_port_len;	/* Destination Port len */
	union fcgs_port_val_u dst_port_val;	/* Destination Port value */
	u32	token;
	u8		vendor_id[8];	/* T10 Vendor Identifier */
	u8		vendor_info[8];	/* Vendor specific Info */
	u32	max_hop_cnt;	/* Max Hop Count */
};

/*
 * Path info structure
 */
struct fcgs_ftrace_path_info_s {
	wwn_t		switch_name;		/* Switch WWN */
	u32	domain_id;
	wwn_t		ingress_port_name;	/* Ingress ports wwn */
	u32	ingress_phys_port_num;	/* Ingress ports physical port
						 * number
						 */
	wwn_t		egress_port_name;	/* Ingress ports wwn */
	u32	egress_phys_port_num;	/* Ingress ports physical port
						 * number
						 */
};

/*
 * Ftrace Acc Response
 */
struct fcgs_ftrace_resp_s {
	u32	revision;
	u32	token;
	u8		vendor_id[8];		/* T10 Vendor Identifier */
	u8		vendor_info[8];		/* Vendor specific Info */
	u32	str_rej_reason_code;	/* STR Reject Reason Code */
	u32	num_path_info_entries;	/* No. of path info entries */
	/*
	 * path info entry/entries.
	 */
	struct fcgs_ftrace_path_info_s path_info[1];

};

/*
* Fabric Config Server : FCPing
 */

/*
 * FC Ping Request
 */
struct fcgs_fcping_req_s {
	u32	revision;
	u16	port_tag;
	u16	port_len;	/* Port len */
	union fcgs_port_val_u port_val;	/* Port value */
	u32	token;
};

/*
 * FC Ping Response
 */
struct fcgs_fcping_resp_s {
	u32	token;
};

/*
 * Command codes for zone server query.
 */
enum {
	ZS_GZME = 0x0124,	/* Get zone member extended */
};

/*
 * ZS GZME request
 */
#define ZS_GZME_ZNAMELEN	32
struct zs_gzme_req_s {
	u8	znamelen;
	u8	rsvd[3];
	u8	zname[ZS_GZME_ZNAMELEN];
};

enum zs_mbr_type {
	ZS_MBR_TYPE_PWWN	= 1,
	ZS_MBR_TYPE_DOMPORT	= 2,
	ZS_MBR_TYPE_PORTID	= 3,
	ZS_MBR_TYPE_NWWN	= 4,
};

struct zs_mbr_wwn_s {
	u8	mbr_type;
	u8	rsvd[3];
	wwn_t	wwn;
};

struct zs_query_resp_s {
	u32	nmbrs;	/*  number of zone members */
	struct zs_mbr_wwn_s	mbr[1];
};

/*
/*
 * GMAL Command ( Get ( interconnect Element) Management Address List)
 * GMAL Command ( Get ( interconnect Element) Management Address List)
 * To retrieve the IP Address of a Switch.
 * To retrieve the IP Address of a Switch.
 */
 */

#define CT_GMAL_RESP_PREFIX_TELNET	 "telnet://"
#define CT_GMAL_RESP_PREFIX_TELNET	 "telnet://"
#define CT_GMAL_RESP_PREFIX_HTTP	 "http://"
#define CT_GMAL_RESP_PREFIX_HTTP	 "http://"


@@ -1773,9 +1468,6 @@ struct fcgs_gmal_entry_s {
	u8  ip_addr[248];
	u8  ip_addr[248];
};
};


/*
 * FDMI
 */
/*
/*
 * FDMI Command Codes
 * FDMI Command Codes
 */
 */
+1 −1
Original line number Original line Diff line number Diff line
@@ -2180,7 +2180,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim)
	else
	else
		m->cmnd.iodir = FCP_IODIR_NONE;
		m->cmnd.iodir = FCP_IODIR_NONE;


	m->cmnd.cdb = *(scsi_cdb_t *) cmnd->cmnd;
	m->cmnd.cdb = *(struct scsi_cdb_s *) cmnd->cmnd;
	fcp_dl = scsi_bufflen(cmnd);
	fcp_dl = scsi_bufflen(cmnd);
	m->cmnd.fcp_dl = cpu_to_be32(fcp_dl);
	m->cmnd.fcp_dl = cpu_to_be32(fcp_dl);


+7 −31
Original line number Original line Diff line number Diff line
@@ -957,7 +957,7 @@ bfa_iocpf_sm_disabling_sync_entry(struct bfa_iocpf_s *iocpf)
	bfa_ioc_hw_sem_get(iocpf->ioc);
	bfa_ioc_hw_sem_get(iocpf->ioc);
}
}


/**
/*
 * IOC hb ack request is being removed.
 * IOC hb ack request is being removed.
 */
 */
static void
static void
@@ -1020,8 +1020,7 @@ bfa_iocpf_sm_initfail_sync_entry(struct bfa_iocpf_s *iocpf)
	bfa_ioc_hw_sem_get(iocpf->ioc);
	bfa_ioc_hw_sem_get(iocpf->ioc);
}
}


/**
/*
 * @brief
 * Hardware initialization failed.
 * Hardware initialization failed.
 */
 */
static void
static void
@@ -1103,12 +1102,12 @@ bfa_iocpf_sm_initfail(struct bfa_iocpf_s *iocpf, enum iocpf_event event)
static void
static void
bfa_iocpf_sm_fail_sync_entry(struct bfa_iocpf_s *iocpf)
bfa_iocpf_sm_fail_sync_entry(struct bfa_iocpf_s *iocpf)
{
{
	/**
	/*
	 * Mark IOC as failed in hardware and stop firmware.
	 * Mark IOC as failed in hardware and stop firmware.
	 */
	 */
	bfa_ioc_lpu_stop(iocpf->ioc);
	bfa_ioc_lpu_stop(iocpf->ioc);


	/**
	/*
	 * Flush any queued up mailbox requests.
	 * Flush any queued up mailbox requests.
	 */
	 */
	bfa_ioc_mbox_hbfail(iocpf->ioc);
	bfa_ioc_mbox_hbfail(iocpf->ioc);
@@ -1366,12 +1365,6 @@ bfa_ioc_fwver_valid(struct bfa_ioc_s *ioc, u32 boot_env)
{
{
	struct bfi_ioc_image_hdr_s fwhdr, *drv_fwhdr;
	struct bfi_ioc_image_hdr_s fwhdr, *drv_fwhdr;


	/*
	 * If bios/efi boot (flash based) -- return true
	 */
	if (bfa_ioc_is_bios_optrom(ioc))
		return BFA_TRUE;

	bfa_ioc_fwver_get(ioc, &fwhdr);
	bfa_ioc_fwver_get(ioc, &fwhdr);
	drv_fwhdr = (struct bfi_ioc_image_hdr_s *)
	drv_fwhdr = (struct bfi_ioc_image_hdr_s *)
		bfa_cb_image_get_chunk(BFA_IOC_FWIMG_TYPE(ioc), 0);
		bfa_cb_image_get_chunk(BFA_IOC_FWIMG_TYPE(ioc), 0);
@@ -1422,22 +1415,6 @@ bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force)
	boot_type = BFI_BOOT_TYPE_NORMAL;
	boot_type = BFI_BOOT_TYPE_NORMAL;
	boot_env = BFI_BOOT_LOADER_OS;
	boot_env = BFI_BOOT_LOADER_OS;


	/*
	 * Flash based firmware boot BIOS env.
	 */
	if (bfa_ioc_is_bios_optrom(ioc)) {
		boot_type = BFI_BOOT_TYPE_FLASH;
		boot_env = BFI_BOOT_LOADER_BIOS;
	}

	/*
	 * Flash based firmware boot UEFI env.
	 */
	if (bfa_ioc_is_uefi(ioc)) {
		boot_type = BFI_BOOT_TYPE_FLASH;
		boot_env = BFI_BOOT_LOADER_UEFI;
	}

	/*
	/*
	 * check if firmware is valid
	 * check if firmware is valid
	 */
	 */
@@ -1466,8 +1443,7 @@ bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force)
	 * convergence, IOC will be in operational state when 2nd driver
	 * convergence, IOC will be in operational state when 2nd driver
	 * is loaded.
	 * is loaded.
	 */
	 */
	if (ioc_fwstate == BFI_IOC_DISABLED ||
	if (ioc_fwstate == BFI_IOC_DISABLED || ioc_fwstate == BFI_IOC_OP) {
	    (!bfa_ioc_is_bios_optrom(ioc) && ioc_fwstate == BFI_IOC_OP)) {


		/*
		/*
		 * When using MSI-X any pending firmware ready event should
		 * When using MSI-X any pending firmware ready event should
@@ -1842,7 +1818,7 @@ bfa_ioc_fail_notify(struct bfa_ioc_s *ioc)
	struct bfa_ioc_hbfail_notify_s	*notify;
	struct bfa_ioc_hbfail_notify_s	*notify;
	struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad;
	struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad;


	/**
	/*
	 * Notify driver and common modules registered for notification.
	 * Notify driver and common modules registered for notification.
	 */
	 */
	ioc->cbfn->hbfail_cbfn(ioc->bfa);
	ioc->cbfn->hbfail_cbfn(ioc->bfa);
@@ -2279,7 +2255,7 @@ bfa_ioc_adapter_is_disabled(struct bfa_ioc_s *ioc)
	return BFA_TRUE;
	return BFA_TRUE;
}
}


/**
/*
 * Reset IOC fwstate registers.
 * Reset IOC fwstate registers.
 */
 */
void
void
Loading