diff options
author | Jing Huang <huangj@brocade.com> | 2010-10-18 20:10:50 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-10-25 17:17:14 -0400 |
commit | ba816ea8e2eacbf3d198ad1859f413c2d6213434 (patch) | |
tree | 92399b02434b350fe4c767c0cb4f1790b7fee763 /drivers/scsi/bfa/bfa_fcs_rport.c | |
parent | 6a18b1675fdf08a6dc861e39c3f94309a03e7f16 (diff) |
[SCSI] bfa: replace endian swap macros with the ones provided by linux
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_fcs_rport.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_fcs_rport.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/scsi/bfa/bfa_fcs_rport.c b/drivers/scsi/bfa/bfa_fcs_rport.c index a6872d328975..12b50bda589d 100644 --- a/drivers/scsi/bfa/bfa_fcs_rport.c +++ b/drivers/scsi/bfa/bfa_fcs_rport.c | |||
@@ -1621,7 +1621,7 @@ bfa_fcs_rport_gidpn_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, | |||
1621 | bfa_trc(rport->fcs, rport->pwwn); | 1621 | bfa_trc(rport->fcs, rport->pwwn); |
1622 | 1622 | ||
1623 | cthdr = (struct ct_hdr_s *) BFA_FCXP_RSP_PLD(fcxp); | 1623 | cthdr = (struct ct_hdr_s *) BFA_FCXP_RSP_PLD(fcxp); |
1624 | cthdr->cmd_rsp_code = bfa_os_ntohs(cthdr->cmd_rsp_code); | 1624 | cthdr->cmd_rsp_code = be16_to_cpu(cthdr->cmd_rsp_code); |
1625 | 1625 | ||
1626 | if (cthdr->cmd_rsp_code == CT_RSP_ACCEPT) { | 1626 | if (cthdr->cmd_rsp_code == CT_RSP_ACCEPT) { |
1627 | /* Check if the pid is the same as before. */ | 1627 | /* Check if the pid is the same as before. */ |
@@ -1691,7 +1691,7 @@ bfa_fcs_rport_gpnid_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, | |||
1691 | bfa_trc(rport->fcs, rport->pwwn); | 1691 | bfa_trc(rport->fcs, rport->pwwn); |
1692 | 1692 | ||
1693 | cthdr = (struct ct_hdr_s *) BFA_FCXP_RSP_PLD(fcxp); | 1693 | cthdr = (struct ct_hdr_s *) BFA_FCXP_RSP_PLD(fcxp); |
1694 | cthdr->cmd_rsp_code = bfa_os_ntohs(cthdr->cmd_rsp_code); | 1694 | cthdr->cmd_rsp_code = be16_to_cpu(cthdr->cmd_rsp_code); |
1695 | 1695 | ||
1696 | if (cthdr->cmd_rsp_code == CT_RSP_ACCEPT) { | 1696 | if (cthdr->cmd_rsp_code == CT_RSP_ACCEPT) { |
1697 | bfa_sm_send_event(rport, RPSM_EVENT_ACCEPTED); | 1697 | bfa_sm_send_event(rport, RPSM_EVENT_ACCEPTED); |
@@ -2123,9 +2123,9 @@ bfa_fcs_rport_update(struct bfa_fcs_rport_s *rport, struct fc_logi_s *plogi) | |||
2123 | * - MAX receive frame size | 2123 | * - MAX receive frame size |
2124 | */ | 2124 | */ |
2125 | rport->cisc = plogi->csp.cisc; | 2125 | rport->cisc = plogi->csp.cisc; |
2126 | rport->maxfrsize = bfa_os_ntohs(plogi->class3.rxsz); | 2126 | rport->maxfrsize = be16_to_cpu(plogi->class3.rxsz); |
2127 | 2127 | ||
2128 | bfa_trc(port->fcs, bfa_os_ntohs(plogi->csp.bbcred)); | 2128 | bfa_trc(port->fcs, be16_to_cpu(plogi->csp.bbcred)); |
2129 | bfa_trc(port->fcs, port->fabric->bb_credit); | 2129 | bfa_trc(port->fcs, port->fabric->bb_credit); |
2130 | /** | 2130 | /** |
2131 | * Direct Attach P2P mode : | 2131 | * Direct Attach P2P mode : |
@@ -2136,12 +2136,12 @@ bfa_fcs_rport_update(struct bfa_fcs_rport_s *rport, struct fc_logi_s *plogi) | |||
2136 | * in PLOGI. | 2136 | * in PLOGI. |
2137 | */ | 2137 | */ |
2138 | if ((!bfa_fcs_fabric_is_switched(port->fabric)) && | 2138 | if ((!bfa_fcs_fabric_is_switched(port->fabric)) && |
2139 | (bfa_os_ntohs(plogi->csp.bbcred) < port->fabric->bb_credit)) { | 2139 | (be16_to_cpu(plogi->csp.bbcred) < port->fabric->bb_credit)) { |
2140 | 2140 | ||
2141 | bfa_trc(port->fcs, bfa_os_ntohs(plogi->csp.bbcred)); | 2141 | bfa_trc(port->fcs, be16_to_cpu(plogi->csp.bbcred)); |
2142 | bfa_trc(port->fcs, port->fabric->bb_credit); | 2142 | bfa_trc(port->fcs, port->fabric->bb_credit); |
2143 | 2143 | ||
2144 | port->fabric->bb_credit = bfa_os_ntohs(plogi->csp.bbcred); | 2144 | port->fabric->bb_credit = be16_to_cpu(plogi->csp.bbcred); |
2145 | bfa_fcport_set_tx_bbcredit(port->fcs->bfa, | 2145 | bfa_fcport_set_tx_bbcredit(port->fcs->bfa, |
2146 | port->fabric->bb_credit); | 2146 | port->fabric->bb_credit); |
2147 | } | 2147 | } |
@@ -3090,16 +3090,16 @@ bfa_fcs_rpf_rpsc2_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, | |||
3090 | rpsc2_acc = (struct fc_rpsc2_acc_s *) BFA_FCXP_RSP_PLD(fcxp); | 3090 | rpsc2_acc = (struct fc_rpsc2_acc_s *) BFA_FCXP_RSP_PLD(fcxp); |
3091 | if (rpsc2_acc->els_cmd == FC_ELS_ACC) { | 3091 | if (rpsc2_acc->els_cmd == FC_ELS_ACC) { |
3092 | rport->stats.rpsc_accs++; | 3092 | rport->stats.rpsc_accs++; |
3093 | num_ents = bfa_os_ntohs(rpsc2_acc->num_pids); | 3093 | num_ents = be16_to_cpu(rpsc2_acc->num_pids); |
3094 | bfa_trc(rport->fcs, num_ents); | 3094 | bfa_trc(rport->fcs, num_ents); |
3095 | if (num_ents > 0) { | 3095 | if (num_ents > 0) { |
3096 | bfa_assert(rpsc2_acc->port_info[0].pid != rport->pid); | 3096 | bfa_assert(rpsc2_acc->port_info[0].pid != rport->pid); |
3097 | bfa_trc(rport->fcs, | 3097 | bfa_trc(rport->fcs, |
3098 | bfa_os_ntohs(rpsc2_acc->port_info[0].pid)); | 3098 | be16_to_cpu(rpsc2_acc->port_info[0].pid)); |
3099 | bfa_trc(rport->fcs, | 3099 | bfa_trc(rport->fcs, |
3100 | bfa_os_ntohs(rpsc2_acc->port_info[0].speed)); | 3100 | be16_to_cpu(rpsc2_acc->port_info[0].speed)); |
3101 | bfa_trc(rport->fcs, | 3101 | bfa_trc(rport->fcs, |
3102 | bfa_os_ntohs(rpsc2_acc->port_info[0].index)); | 3102 | be16_to_cpu(rpsc2_acc->port_info[0].index)); |
3103 | bfa_trc(rport->fcs, | 3103 | bfa_trc(rport->fcs, |
3104 | rpsc2_acc->port_info[0].type); | 3104 | rpsc2_acc->port_info[0].type); |
3105 | 3105 | ||
@@ -3109,7 +3109,7 @@ bfa_fcs_rpf_rpsc2_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg, | |||
3109 | } | 3109 | } |
3110 | 3110 | ||
3111 | rpf->rpsc_speed = fc_rpsc_operspeed_to_bfa_speed( | 3111 | rpf->rpsc_speed = fc_rpsc_operspeed_to_bfa_speed( |
3112 | bfa_os_ntohs(rpsc2_acc->port_info[0].speed)); | 3112 | be16_to_cpu(rpsc2_acc->port_info[0].speed)); |
3113 | 3113 | ||
3114 | bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_COMP); | 3114 | bfa_sm_send_event(rpf, RPFSM_EVENT_RPSC_COMP); |
3115 | } | 3115 | } |