summaryrefslogtreecommitdiff
path: root/drivers/scsi/bfa/fdmi.c
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2010-03-04 04:43:19 +0300
committerJames Bottomley <James.Bottomley@suse.de>2010-03-04 13:43:40 +0300
commit5b098082e22c168b7df4c5c3cd924047cee7d995 (patch)
treef4d40a769b8793382f7e11c1439f1bccb29729d8 /drivers/scsi/bfa/fdmi.c
parentab5336189a12b6561a1b5708d782a4e27e2e3b79 (diff)
downloadlinux-5b098082e22c168b7df4c5c3cd924047cee7d995.tar.xz
[SCSI] bfa: Changes to support FDMI Driver Parameter
Added a FCS function to be called during driver init, to set the FDMI Driver parameter. fdmi.c: Created a disabled state when fdmi is disabled. bfad.c: * Added fdmi_enable driver parameter. * Added support to call bfa_fcs_set_fdmi_param() to initialize fcs fdmi setting. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/fdmi.c')
-rw-r--r--drivers/scsi/bfa/fdmi.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/fdmi.c b/drivers/scsi/bfa/fdmi.c
index df2a1e54e16b..d76d9220b6e6 100644
--- a/drivers/scsi/bfa/fdmi.c
+++ b/drivers/scsi/bfa/fdmi.c
@@ -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.
*/
@@ -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.
@@ -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