Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] bfa: New portlog entries for events (FIP/FLOGI/FDISC/LOGO).

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>

authored by

Krishna Gudipati and committed by
James Bottomley
f58e9ebb 1c8a4c37

+66 -8
+17 -4
drivers/scsi/bfa/bfa_fcport.c
··· 326 326 bfa_fcport_sm_linkdown(struct bfa_fcport_s *fcport, 327 327 enum bfa_fcport_sm_event event) 328 328 { 329 + struct bfi_pport_event_s *pevent = fcport->event_arg.i2hmsg.event; 329 330 bfa_trc(fcport->bfa, event); 330 331 331 332 switch (event) { ··· 336 335 bfa_assert(fcport->event_cbfn); 337 336 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, 338 337 BFA_PL_EID_PORT_ST_CHANGE, 0, "Port Linkup"); 338 + 339 + if (!bfa_ioc_get_fcmode(&fcport->bfa->ioc)) { 340 + 341 + bfa_trc(fcport->bfa, pevent->link_state.fcf.fipenabled); 342 + bfa_trc(fcport->bfa, pevent->link_state.fcf.fipfailed); 343 + 344 + if (pevent->link_state.fcf.fipfailed) 345 + bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, 346 + BFA_PL_EID_FIP_FCF_DISC, 0, 347 + "FIP FCF Discovery Failed"); 348 + else 349 + bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, 350 + BFA_PL_EID_FIP_FCF_DISC, 0, 351 + "FIP FCF Discovered"); 352 + } 353 + 339 354 bfa_fcport_callback(fcport, BFA_PPORT_LINKUP); 340 355 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_ONLINE); 341 356 /** ··· 1517 1500 bfi_h2i_set(msg->mh, BFI_MC_FC_PORT, BFI_PPORT_H2I_GET_STATS_REQ, 1518 1501 bfa_lpuid(fcport->bfa)); 1519 1502 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT); 1520 - 1521 - return; 1522 1503 } 1523 1504 1524 1505 static void ··· 1541 1526 bfi_h2i_set(msg->mh, BFI_MC_FC_PORT, BFI_PPORT_H2I_CLEAR_STATS_REQ, 1542 1527 bfa_lpuid(fcport->bfa)); 1543 1528 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT); 1544 - return; 1545 1529 } 1546 1530 1547 1531 static void ··· 1613 1599 bfi_h2i_set(msg->mh, BFI_MC_FC_PORT, BFI_PPORT_H2I_CLEAR_QOS_STATS_REQ, 1614 1600 bfa_lpuid(fcport->bfa)); 1615 1601 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT); 1616 - return; 1617 1602 } 1618 1603 1619 1604 static void
+25 -2
drivers/scsi/bfa/bfa_lps.c
··· 99 99 bfa_sm_set_state(lps, bfa_lps_sm_login); 100 100 bfa_lps_send_login(lps); 101 101 } 102 + if (lps->fdisc) 103 + bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, 104 + BFA_PL_EID_LOGIN, 0, "FDISC Request"); 105 + else 106 + bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, 107 + BFA_PL_EID_LOGIN, 0, "FLOGI Request"); 102 108 break; 103 109 104 110 case BFA_LPS_SM_LOGOUT: ··· 142 136 143 137 switch (event) { 144 138 case BFA_LPS_SM_FWRSP: 145 - if (lps->status == BFA_STATUS_OK) 139 + if (lps->status == BFA_STATUS_OK) { 146 140 bfa_sm_set_state(lps, bfa_lps_sm_online); 147 - else 141 + if (lps->fdisc) 142 + bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, 143 + BFA_PL_EID_LOGIN, 0, "FDISC Accept"); 144 + else 145 + bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, 146 + BFA_PL_EID_LOGIN, 0, "FLOGI Accept"); 147 + } else { 148 148 bfa_sm_set_state(lps, bfa_lps_sm_init); 149 + if (lps->fdisc) 150 + bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, 151 + BFA_PL_EID_LOGIN, 0, 152 + "FDISC Fail (RJT or timeout)"); 153 + else 154 + bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, 155 + BFA_PL_EID_LOGIN, 0, 156 + "FLOGI Fail (RJT or timeout)"); 157 + } 149 158 bfa_lps_login_comp(lps); 150 159 break; 151 160 ··· 223 202 bfa_sm_set_state(lps, bfa_lps_sm_logout); 224 203 bfa_lps_send_logout(lps); 225 204 } 205 + bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, 206 + BFA_PL_EID_LOGO, 0, "Logout"); 226 207 break; 227 208 228 209 case BFA_LPS_SM_RX_CVL:
+19 -2
drivers/scsi/bfa/include/defs/bfa_defs_pport.h
··· 333 333 }; 334 334 335 335 /** 336 - * Port RNID info. 337 - */ 336 + * Port RNI */ 338 337 struct bfa_pport_rnid_s { 339 338 wwn_t wwn; 340 339 u32 unittype; ··· 344 345 u8 ipaddr[16]; 345 346 u16 rsvd; 346 347 u16 topologydiscoveryflags; 348 + }; 349 + 350 + struct bfa_fcport_fcf_s { 351 + wwn_t name; /* FCF name */ 352 + wwn_t fabric_name; /* Fabric Name */ 353 + u8 fipenabled; /* FIP enabled or not */ 354 + u8 fipfailed; /* FIP failed or not */ 355 + u8 resv[2]; 356 + u8 pri; /* FCF priority */ 357 + u8 version; /* FIP version used */ 358 + u8 available; /* Available for login */ 359 + u8 fka_disabled; /* FKA is disabled */ 360 + u8 maxsz_verified; /* FCoE max size verified */ 361 + u8 fc_map[3]; /* FC map */ 362 + u16 vlan; /* FCoE vlan tag/priority */ 363 + u32 fka_adv_per; /* FIP ka advert. period */ 364 + struct mac_s mac; /* FCF mac */ 347 365 }; 348 366 349 367 /** ··· 394 378 struct fc_alpabm_s alpabm; /* alpa bitmap */ 395 379 } loop_info; 396 380 } tl; 381 + struct bfa_fcport_fcf_s fcf; /*!< FCF information (for FCoE) */ 397 382 }; 398 383 399 384 #endif /* __BFA_DEFS_PPORT_H__ */
+5
drivers/scsi/bfa/include/protocol/fc.h
··· 50 50 51 51 u32 ro; /* relative offset */ 52 52 }; 53 + 54 + #define FC_SOF_LEN 4 55 + #define FC_EOF_LEN 4 56 + #define FC_CRC_LEN 4 57 + 53 58 /* 54 59 * Fibre Channel BB_E Header Structure 55 60 */