aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJing Huang <huangj@brocade.com>2010-07-08 22:58:01 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 13:04:18 -0400
commitdb954c04cbebd7d719927118c7f58eddd8dd9913 (patch)
tree5f61eaee6b6bc73d62d264ccf617b2f9cb9e400a
parent36d345a703b7b3f80a56ee37abb7908c52d1cd67 (diff)
[SCSI] bfa: fix link state structure
When the FCoE Linkup event is sent to the host, the link_state (struct bfa_pport_link_s) structure is copied to the RME buf to be sent to the host. But the size of this structure(164 bytes) is larger than the reserved RME buffer size(128 byes). The following changes reduce the size of the structure to be less than RME buffer size(128 bytes): - Remove the trunk and loop info from link_state structure, because both trunk and loop are not supported. - Combine qos_vc_attr and fcf into an union. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r--drivers/scsi/bfa/bfa_fcport.c15
-rw-r--r--drivers/scsi/bfa/include/defs/bfa_defs_pport.h22
2 files changed, 12 insertions, 25 deletions
diff --git a/drivers/scsi/bfa/bfa_fcport.c b/drivers/scsi/bfa/bfa_fcport.c
index e0e7a0dda545..c855e225af16 100644
--- a/drivers/scsi/bfa/bfa_fcport.c
+++ b/drivers/scsi/bfa/bfa_fcport.c
@@ -311,10 +311,12 @@ bfa_fcport_sm_linkdown(struct bfa_fcport_s *fcport,
311 311
312 if (!bfa_ioc_get_fcmode(&fcport->bfa->ioc)) { 312 if (!bfa_ioc_get_fcmode(&fcport->bfa->ioc)) {
313 313
314 bfa_trc(fcport->bfa, pevent->link_state.fcf.fipenabled); 314 bfa_trc(fcport->bfa,
315 bfa_trc(fcport->bfa, pevent->link_state.fcf.fipfailed); 315 pevent->link_state.vc_fcf.fcf.fipenabled);
316 bfa_trc(fcport->bfa,
317 pevent->link_state.vc_fcf.fcf.fipfailed);
316 318
317 if (pevent->link_state.fcf.fipfailed) 319 if (pevent->link_state.vc_fcf.fcf.fipfailed)
318 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, 320 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
319 BFA_PL_EID_FIP_FCF_DISC, 0, 321 BFA_PL_EID_FIP_FCF_DISC, 0,
320 "FIP FCF Discovery Failed"); 322 "FIP FCF Discovery Failed");
@@ -960,14 +962,15 @@ bfa_fcport_update_linkinfo(struct bfa_fcport_s *fcport)
960 fcport->topology = pevent->link_state.topology; 962 fcport->topology = pevent->link_state.topology;
961 963
962 if (fcport->topology == BFA_PPORT_TOPOLOGY_LOOP) 964 if (fcport->topology == BFA_PPORT_TOPOLOGY_LOOP)
963 fcport->myalpa = 965 fcport->myalpa = 0;
964 pevent->link_state.tl.loop_info.myalpa;
965 966
966 /* 967 /*
967 * QoS Details 968 * QoS Details
968 */ 969 */
969 bfa_os_assign(fcport->qos_attr, pevent->link_state.qos_attr); 970 bfa_os_assign(fcport->qos_attr, pevent->link_state.qos_attr);
970 bfa_os_assign(fcport->qos_vc_attr, pevent->link_state.qos_vc_attr); 971 bfa_os_assign(fcport->qos_vc_attr,
972 pevent->link_state.vc_fcf.qos_vc_attr);
973
971 974
972 bfa_trc(fcport->bfa, fcport->speed); 975 bfa_trc(fcport->bfa, fcport->speed);
973 bfa_trc(fcport->bfa, fcport->topology); 976 bfa_trc(fcport->bfa, fcport->topology);
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_pport.h b/drivers/scsi/bfa/include/defs/bfa_defs_pport.h
index 2c2cec5ee278..2de675839c2f 100644
--- a/drivers/scsi/bfa/include/defs/bfa_defs_pport.h
+++ b/drivers/scsi/bfa/include/defs/bfa_defs_pport.h
@@ -384,26 +384,10 @@ struct bfa_pport_link_s {
384 u8 trunked; /* Trunked or not (1 or 0) */ 384 u8 trunked; /* Trunked or not (1 or 0) */
385 u8 resvd[3]; 385 u8 resvd[3];
386 struct bfa_qos_attr_s qos_attr; /* QoS Attributes */ 386 struct bfa_qos_attr_s qos_attr; /* QoS Attributes */
387 struct bfa_qos_vc_attr_s qos_vc_attr; /* VC info from ELP */
388 union { 387 union {
389 struct { 388 struct bfa_qos_vc_attr_s qos_vc_attr; /* VC info from ELP */
390 u8 tmaster;/* Trunk Master or 389 struct bfa_fcport_fcf_s fcf; /* FCF information (for FCoE) */
391 * not (1 or 0) */ 390 } vc_fcf;
392 u8 tlinks; /* Trunk links bitmap
393 * (linkup) */
394 u8 resv1; /* Reserved */
395 } trunk_info;
396
397 struct {
398 u8 myalpa; /* alpa claimed */
399 u8 login_req; /* Login required or
400 * not (1 or 0) */
401 u8 alpabm_val;/* alpa bitmap valid
402 * or not (1 or 0) */
403 struct fc_alpabm_s alpabm; /* alpa bitmap */
404 } loop_info;
405 } tl;
406 struct bfa_fcport_fcf_s fcf; /*!< FCF information (for FCoE) */
407}; 391};
408 392
409#endif /* __BFA_DEFS_PPORT_H__ */ 393#endif /* __BFA_DEFS_PPORT_H__ */