Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188324
b: refs/heads/master
c: 5b09808
h: refs/heads/master
v: v3
  • Loading branch information
Krishna Gudipati authored and James Bottomley committed Mar 4, 2010
1 parent fc7e0eb commit d7a9a71
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab5336189a12b6561a1b5708d782a4e27e2e3b79
refs/heads/master: 5b098082e22c168b7df4c5c3cd924047cee7d995
17 changes: 17 additions & 0 deletions trunk/drivers/scsi/bfa/bfa_fcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,23 @@ bfa_fcs_driver_info_init(struct bfa_fcs_s *fcs,
bfa_fcs_fabric_psymb_init(&fcs->fabric);
}

/**
* @brief
* FCS FDMI Driver Parameter Initialization
*
* @param[in] fcs FCS instance
* @param[in] fdmi_enable TRUE/FALSE
*
* @return None
*/
void
bfa_fcs_set_fdmi_param(struct bfa_fcs_s *fcs, bfa_boolean_t fdmi_enable)
{

fcs->fdmi_enabled = fdmi_enable;

}

/**
* FCS instance cleanup and exit.
*
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/scsi/bfa/bfad.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ static int log_level = BFA_LOG_WARNING;
static int ioc_auto_recover = BFA_TRUE;
static int ipfc_enable = BFA_FALSE;
static int ipfc_mtu = -1;
static int fdmi_enable = BFA_TRUE;
int bfa_lun_queue_depth = BFAD_LUN_QUEUE_DEPTH;
int bfa_linkup_delay = -1;

Expand All @@ -74,6 +75,7 @@ module_param(log_level, int, S_IRUGO | S_IWUSR);
module_param(ioc_auto_recover, int, S_IRUGO | S_IWUSR);
module_param(ipfc_enable, int, S_IRUGO | S_IWUSR);
module_param(ipfc_mtu, int, S_IRUGO | S_IWUSR);
module_param(fdmi_enable, int, S_IRUGO | S_IWUSR);
module_param(bfa_linkup_delay, int, S_IRUGO | S_IWUSR);

/*
Expand Down Expand Up @@ -748,6 +750,7 @@ bfad_drv_init(struct bfad_s *bfad)
bfa_fcs_aen_init(&bfad->bfa_fcs, bfad->aen);
bfa_fcs_init(&bfad->bfa_fcs, &bfad->bfa, bfad, BFA_FALSE);
bfa_fcs_driver_info_init(&bfad->bfa_fcs, &driver_info);
bfa_fcs_set_fdmi_param(&bfad->bfa_fcs, fdmi_enable);
spin_unlock_irqrestore(&bfad->bfad_lock, flags);

bfad->bfad_flags |= BFAD_DRV_INIT_DONE;
Expand Down
22 changes: 21 additions & 1 deletion trunk/drivers/scsi/bfa/fdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ static void bfa_fcs_port_fdmi_sm_rpa_retry(struct bfa_fcs_port_fdmi_s *fdmi,
enum port_fdmi_event event);
static void bfa_fcs_port_fdmi_sm_online(struct bfa_fcs_port_fdmi_s *fdmi,
enum port_fdmi_event event);
static void bfa_fcs_port_fdmi_sm_disabled(struct bfa_fcs_port_fdmi_s *fdmi,
enum port_fdmi_event event);

/**
* Start in offline state - awaiting MS to send start.
*/
Expand Down Expand Up @@ -479,6 +482,20 @@ bfa_fcs_port_fdmi_sm_online(struct bfa_fcs_port_fdmi_s *fdmi,
}
}

/**
* FDMI is disabled state.
*/
static void
bfa_fcs_port_fdmi_sm_disabled(struct bfa_fcs_port_fdmi_s *fdmi,
enum port_fdmi_event event)
{
struct bfa_fcs_port_s *port = fdmi->ms->port;

bfa_trc(port->fcs, port->port_cfg.pwwn);
bfa_trc(port->fcs, event);

/* No op State. It can only be enabled at Driver Init. */
}

/**
* RHBA : Register HBA Attributes.
Expand Down Expand Up @@ -1201,7 +1218,10 @@ bfa_fcs_port_fdmi_init(struct bfa_fcs_port_ms_s *ms)
struct bfa_fcs_port_fdmi_s *fdmi = &ms->fdmi;

fdmi->ms = ms;
bfa_sm_set_state(fdmi, bfa_fcs_port_fdmi_sm_offline);
if (ms->port->fcs->fdmi_enabled)
bfa_sm_set_state(fdmi, bfa_fcs_port_fdmi_sm_offline);
else
bfa_sm_set_state(fdmi, bfa_fcs_port_fdmi_sm_disabled);
}

void
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/scsi/bfa/include/fcs/bfa_fcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ struct bfa_fcs_s {
struct bfa_trc_mod_s *trcmod; /* tracing module */
struct bfa_aen_s *aen; /* aen component */
bfa_boolean_t vf_enabled; /* VF mode is enabled */
bfa_boolean_t fdmi_enabled; /*!< FDMI is enabled */
bfa_boolean_t min_cfg; /* min cfg enabled/disabled */
u16 port_vfid; /* port default VF ID */
struct bfa_fcs_driver_info_s driver_info;
Expand All @@ -64,6 +65,7 @@ void bfa_fcs_init(struct bfa_fcs_s *fcs, struct bfa_s *bfa, struct bfad_s *bfad,
bfa_boolean_t min_cfg);
void bfa_fcs_driver_info_init(struct bfa_fcs_s *fcs,
struct bfa_fcs_driver_info_s *driver_info);
void bfa_fcs_set_fdmi_param(struct bfa_fcs_s *fcs, bfa_boolean_t fdmi_enable);
void bfa_fcs_exit(struct bfa_fcs_s *fcs);
void bfa_fcs_trc_init(struct bfa_fcs_s *fcs, struct bfa_trc_mod_s *trcmod);
void bfa_fcs_log_init(struct bfa_fcs_s *fcs, struct bfa_log_mod_s *logmod);
Expand Down

0 comments on commit d7a9a71

Please sign in to comment.