diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/bfa/bfa_svc.c | 25 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_svc.h | 1 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfi_ms.h | 6 |
3 files changed, 29 insertions, 3 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, | |||
1890 | /* | 1890 | /* |
1891 | * Start event after IOC is configured and BFA is started. | 1891 | * Start event after IOC is configured and BFA is started. |
1892 | */ | 1892 | */ |
1893 | fcport->use_flash_cfg = BFA_TRUE; | ||
1894 | |||
1893 | if (bfa_fcport_send_enable(fcport)) { | 1895 | if (bfa_fcport_send_enable(fcport)) { |
1894 | bfa_trc(fcport->bfa, BFA_TRUE); | 1896 | bfa_trc(fcport->bfa, BFA_TRUE); |
1895 | bfa_sm_set_state(fcport, bfa_fcport_sm_enabling); | 1897 | bfa_sm_set_state(fcport, bfa_fcport_sm_enabling); |
@@ -2855,6 +2857,7 @@ bfa_fcport_send_enable(struct bfa_fcport_s *fcport) | |||
2855 | m->port_cfg = fcport->cfg; | 2857 | m->port_cfg = fcport->cfg; |
2856 | m->msgtag = fcport->msgtag; | 2858 | m->msgtag = fcport->msgtag; |
2857 | m->port_cfg.maxfrsize = cpu_to_be16(fcport->cfg.maxfrsize); | 2859 | m->port_cfg.maxfrsize = cpu_to_be16(fcport->cfg.maxfrsize); |
2860 | m->use_flash_cfg = fcport->use_flash_cfg; | ||
2858 | bfa_dma_be_addr_set(m->stats_dma_addr, fcport->stats_pa); | 2861 | bfa_dma_be_addr_set(m->stats_dma_addr, fcport->stats_pa); |
2859 | bfa_trc(fcport->bfa, m->stats_dma_addr.a32.addr_lo); | 2862 | bfa_trc(fcport->bfa, m->stats_dma_addr.a32.addr_lo); |
2860 | bfa_trc(fcport->bfa, m->stats_dma_addr.a32.addr_hi); | 2863 | 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) | |||
3251 | 3254 | ||
3252 | switch (msg->mhdr.msg_id) { | 3255 | switch (msg->mhdr.msg_id) { |
3253 | case BFI_FCPORT_I2H_ENABLE_RSP: | 3256 | case BFI_FCPORT_I2H_ENABLE_RSP: |
3254 | if (fcport->msgtag == i2hmsg.penable_rsp->msgtag) | 3257 | if (fcport->msgtag == i2hmsg.penable_rsp->msgtag) { |
3258 | |||
3259 | if (fcport->use_flash_cfg) { | ||
3260 | fcport->cfg = i2hmsg.penable_rsp->port_cfg; | ||
3261 | fcport->cfg.maxfrsize = | ||
3262 | cpu_to_be16(fcport->cfg.maxfrsize); | ||
3263 | fcport->cfg.path_tov = | ||
3264 | cpu_to_be16(fcport->cfg.path_tov); | ||
3265 | fcport->cfg.q_depth = | ||
3266 | cpu_to_be16(fcport->cfg.q_depth); | ||
3267 | |||
3268 | if (fcport->cfg.trunked) | ||
3269 | fcport->trunk.attr.state = | ||
3270 | BFA_TRUNK_OFFLINE; | ||
3271 | else | ||
3272 | fcport->trunk.attr.state = | ||
3273 | BFA_TRUNK_DISABLED; | ||
3274 | fcport->use_flash_cfg = BFA_FALSE; | ||
3275 | } | ||
3276 | |||
3255 | bfa_sm_send_event(fcport, BFA_FCPORT_SM_FWRSP); | 3277 | bfa_sm_send_event(fcport, BFA_FCPORT_SM_FWRSP); |
3278 | } | ||
3256 | break; | 3279 | break; |
3257 | 3280 | ||
3258 | case BFI_FCPORT_I2H_DISABLE_RSP: | 3281 | case BFI_FCPORT_I2H_DISABLE_RSP: |
diff --git a/drivers/scsi/bfa/bfa_svc.h b/drivers/scsi/bfa/bfa_svc.h index 29b091826e9b..36c81c74f04a 100644 --- a/drivers/scsi/bfa/bfa_svc.h +++ b/drivers/scsi/bfa/bfa_svc.h | |||
@@ -444,6 +444,7 @@ struct bfa_fcport_s { | |||
444 | u8 myalpa; /* my ALPA in LOOP topology */ | 444 | u8 myalpa; /* my ALPA in LOOP topology */ |
445 | u8 rsvd[3]; | 445 | u8 rsvd[3]; |
446 | struct bfa_port_cfg_s cfg; /* current port configuration */ | 446 | struct bfa_port_cfg_s cfg; /* current port configuration */ |
447 | bfa_boolean_t use_flash_cfg; /* get port cfg from flash */ | ||
447 | struct bfa_qos_attr_s qos_attr; /* QoS Attributes */ | 448 | struct bfa_qos_attr_s qos_attr; /* QoS Attributes */ |
448 | struct bfa_qos_vc_attr_s qos_vc_attr; /* VC info from ELP */ | 449 | struct bfa_qos_vc_attr_s qos_vc_attr; /* VC info from ELP */ |
449 | struct bfa_reqq_wait_s reqq_wait; | 450 | struct bfa_reqq_wait_s reqq_wait; |
diff --git a/drivers/scsi/bfa/bfi_ms.h b/drivers/scsi/bfa/bfi_ms.h index e0e5318ce007..8f22ef1a6ed9 100644 --- a/drivers/scsi/bfa/bfi_ms.h +++ b/drivers/scsi/bfa/bfi_ms.h | |||
@@ -188,7 +188,8 @@ struct bfi_fcport_rsp_s { | |||
188 | struct bfi_mhdr_s mh; /* common msg header */ | 188 | struct bfi_mhdr_s mh; /* common msg header */ |
189 | u8 status; /* port enable status */ | 189 | u8 status; /* port enable status */ |
190 | u8 rsvd[3]; | 190 | u8 rsvd[3]; |
191 | u32 msgtag; /* msgtag for reply */ | 191 | struct bfa_port_cfg_s port_cfg;/* port configuration */ |
192 | u32 msgtag; /* msgtag for reply */ | ||
192 | }; | 193 | }; |
193 | 194 | ||
194 | /* | 195 | /* |
@@ -202,7 +203,8 @@ struct bfi_fcport_enable_req_s { | |||
202 | struct bfa_port_cfg_s port_cfg; /* port configuration */ | 203 | struct bfa_port_cfg_s port_cfg; /* port configuration */ |
203 | union bfi_addr_u stats_dma_addr; /* DMA address for stats */ | 204 | union bfi_addr_u stats_dma_addr; /* DMA address for stats */ |
204 | u32 msgtag; /* msgtag for reply */ | 205 | u32 msgtag; /* msgtag for reply */ |
205 | u32 rsvd2; | 206 | u8 use_flash_cfg; /* get prot cfg from flash */ |
207 | u8 rsvd2[3]; | ||
206 | }; | 208 | }; |
207 | 209 | ||
208 | /* | 210 | /* |