diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2010-12-13 16:16:50 -0800 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 12:37:12 -0600 |
commit | f3a060ca57903daaf2f1a88c6c25832619b2a74f (patch) | |
tree | ae23aad4020a301ba23301f4c21655af7887ed85 /drivers/scsi/bfa/bfa_svc.c | |
parent | 4e78efefa3c083240bd47153ffa99642bfdc7811 (diff) | |
download | blackbird-obmc-linux-f3a060ca57903daaf2f1a88c6c25832619b2a74f.tar.gz blackbird-obmc-linux-f3a060ca57903daaf2f1a88c6c25832619b2a74f.zip |
[SCSI] bfa: Store port configuration in flash for persistency.
When the bfa driver is loaded a flogi is sent without the knowledge of
trunking configuration. This normal flogi causes the switch ports
which had trunking enabled to go to persistent offline. Solution is
to store the port configuration (which has trunking info) in the flash
for persistency. The firmware will read this configuration when the
very first fcport enable is received.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_svc.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_svc.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c index 8dc2e7752e4c..2666472d1429 100644 --- a/drivers/scsi/bfa/bfa_svc.c +++ b/drivers/scsi/bfa/bfa_svc.c @@ -1890,6 +1890,8 @@ bfa_fcport_sm_uninit(struct bfa_fcport_s *fcport, /* * Start event after IOC is configured and BFA is started. */ + fcport->use_flash_cfg = BFA_TRUE; + if (bfa_fcport_send_enable(fcport)) { bfa_trc(fcport->bfa, BFA_TRUE); bfa_sm_set_state(fcport, bfa_fcport_sm_enabling); @@ -2855,6 +2857,7 @@ bfa_fcport_send_enable(struct bfa_fcport_s *fcport) m->port_cfg = fcport->cfg; m->msgtag = fcport->msgtag; m->port_cfg.maxfrsize = cpu_to_be16(fcport->cfg.maxfrsize); + m->use_flash_cfg = fcport->use_flash_cfg; bfa_dma_be_addr_set(m->stats_dma_addr, fcport->stats_pa); bfa_trc(fcport->bfa, m->stats_dma_addr.a32.addr_lo); bfa_trc(fcport->bfa, m->stats_dma_addr.a32.addr_hi); @@ -3251,8 +3254,28 @@ bfa_fcport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg) switch (msg->mhdr.msg_id) { case BFI_FCPORT_I2H_ENABLE_RSP: - if (fcport->msgtag == i2hmsg.penable_rsp->msgtag) + if (fcport->msgtag == i2hmsg.penable_rsp->msgtag) { + + if (fcport->use_flash_cfg) { + fcport->cfg = i2hmsg.penable_rsp->port_cfg; + fcport->cfg.maxfrsize = + cpu_to_be16(fcport->cfg.maxfrsize); + fcport->cfg.path_tov = + cpu_to_be16(fcport->cfg.path_tov); + fcport->cfg.q_depth = + cpu_to_be16(fcport->cfg.q_depth); + + if (fcport->cfg.trunked) + fcport->trunk.attr.state = + BFA_TRUNK_OFFLINE; + else + fcport->trunk.attr.state = + BFA_TRUNK_DISABLED; + fcport->use_flash_cfg = BFA_FALSE; + } + bfa_sm_send_event(fcport, BFA_FCPORT_SM_FWRSP); + } break; case BFI_FCPORT_I2H_DISABLE_RSP: |