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

Commit db9d8a75 authored by Krishna Gudipati's avatar Krishna Gudipati Committed by James Bottomley
Browse files

[SCSI] bfa: Revised Fabric Assigned Address(FAA) feature implementation.



Made changes to the Fabric Assigned Address(FAA) feature implementation.
Introduced the IOCFC state machine, which now handles the FAA logic,
IOC and BFA sub-modules enablement.
Removed un-wanted FAA enable/disable routines; FAA is enabled by default.

Signed-off-by: default avatarKrishna Gudipati <kgudipat@brocade.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent a6b963db
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
@@ -225,9 +225,9 @@ struct bfa_faa_args_s {
};
};


struct bfa_iocfc_s {
struct bfa_iocfc_s {
	bfa_fsm_t		fsm;
	struct bfa_s		*bfa;
	struct bfa_s		*bfa;
	struct bfa_iocfc_cfg_s	cfg;
	struct bfa_iocfc_cfg_s	cfg;
	int			action;
	u32		req_cq_pi[BFI_IOC_MAX_CQS];
	u32		req_cq_pi[BFI_IOC_MAX_CQS];
	u32		rsp_cq_ci[BFI_IOC_MAX_CQS];
	u32		rsp_cq_ci[BFI_IOC_MAX_CQS];
	u8		hw_qid[BFI_IOC_MAX_CQS];
	u8		hw_qid[BFI_IOC_MAX_CQS];
@@ -236,7 +236,9 @@ struct bfa_iocfc_s {
	struct bfa_cb_qe_s	dis_hcb_qe;
	struct bfa_cb_qe_s	dis_hcb_qe;
	struct bfa_cb_qe_s	en_hcb_qe;
	struct bfa_cb_qe_s	en_hcb_qe;
	struct bfa_cb_qe_s	stats_hcb_qe;
	struct bfa_cb_qe_s	stats_hcb_qe;
	bfa_boolean_t		cfgdone;
	bfa_boolean_t		submod_enabled;
	bfa_boolean_t		cb_reqd;	/* Driver call back reqd */
	bfa_status_t		op_status;	/* Status of bfa iocfc op */


	struct bfa_dma_s	cfg_info;
	struct bfa_dma_s	cfg_info;
	struct bfi_iocfc_cfg_s *cfginfo;
	struct bfi_iocfc_cfg_s *cfginfo;
@@ -341,8 +343,6 @@ void bfa_hwct_msix_getvecs(struct bfa_s *bfa, u32 *vecmap, u32 *nvecs,
void bfa_hwct_msix_get_rme_range(struct bfa_s *bfa, u32 *start,
void bfa_hwct_msix_get_rme_range(struct bfa_s *bfa, u32 *start,
				 u32 *end);
				 u32 *end);
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_nwwn(struct bfa_s *bfa);
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);


@@ -428,7 +428,6 @@ bfa_status_t bfa_iocfc_israttr_set(struct bfa_s *bfa,


void bfa_iocfc_enable(struct bfa_s *bfa);
void bfa_iocfc_enable(struct bfa_s *bfa);
void bfa_iocfc_disable(struct bfa_s *bfa);
void bfa_iocfc_disable(struct bfa_s *bfa);
void bfa_iocfc_cb_dconf_modinit(struct bfa_s *bfa, bfa_status_t status);
#define bfa_timer_start(_bfa, _timer, _timercb, _arg, _timeout)		\
#define bfa_timer_start(_bfa, _timer, _timercb, _arg, _timeout)		\
	bfa_timer_begin(&(_bfa)->timer_mod, _timer, _timercb, _arg, _timeout)
	bfa_timer_begin(&(_bfa)->timer_mod, _timer, _timercb, _arg, _timeout)


+474 −206

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Original line Diff line number Diff line
@@ -52,7 +52,7 @@ struct bfa_iocfc_fwcfg_s {
	u16		num_uf_bufs;	/*  unsolicited recv buffers	*/
	u16		num_uf_bufs;	/*  unsolicited recv buffers	*/
	u8		num_cqs;
	u8		num_cqs;
	u8		fw_tick_res;	/*  FW clock resolution in ms */
	u8		fw_tick_res;	/*  FW clock resolution in ms */
	u8		rsvd[2];
	u8		rsvd[6];
};
};
#pragma pack()
#pragma pack()


+19 −103

File changed.

Preview size limit exceeded, changes collapsed.

+16 −1
Original line number Original line Diff line number Diff line
@@ -372,6 +372,22 @@ struct bfa_cb_qe_s {
	void		*cbarg;
	void		*cbarg;
};
};


/*
 * IOCFC state machine definitions/declarations
 */
enum iocfc_event {
	IOCFC_E_INIT		= 1,	/* IOCFC init request		*/
	IOCFC_E_START		= 2,	/* IOCFC mod start request	*/
	IOCFC_E_STOP		= 3,	/* IOCFC stop request		*/
	IOCFC_E_ENABLE		= 4,	/* IOCFC enable request		*/
	IOCFC_E_DISABLE		= 5,	/* IOCFC disable request	*/
	IOCFC_E_IOC_ENABLED	= 6,	/* IOC enabled message		*/
	IOCFC_E_IOC_DISABLED	= 7,	/* IOC disabled message		*/
	IOCFC_E_IOC_FAILED	= 8,	/* failure notice by IOC sm	*/
	IOCFC_E_DCONF_DONE	= 9,	/* dconf read/write done	*/
	IOCFC_E_CFG_DONE	= 10,	/* IOCFC config complete	*/
};

/*
/*
 * ASIC block configurtion related
 * ASIC block configurtion related
 */
 */
@@ -706,7 +722,6 @@ struct bfa_dconf_s {
struct bfa_dconf_mod_s {
struct bfa_dconf_mod_s {
	bfa_sm_t		sm;
	bfa_sm_t		sm;
	u8			instance;
	u8			instance;
	bfa_boolean_t		flashdone;
	bfa_boolean_t		read_data_valid;
	bfa_boolean_t		read_data_valid;
	bfa_boolean_t		min_cfg;
	bfa_boolean_t		min_cfg;
	struct bfa_timer_s	timer;
	struct bfa_timer_s	timer;
Loading