diff options
author | Jing Huang <huangj@brocade.com> | 2010-10-18 20:08:54 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-10-25 17:15:58 -0400 |
commit | 6a18b1675fdf08a6dc861e39c3f94309a03e7f16 (patch) | |
tree | 0437af49a6e9edc1ce87e2ee85962c4ff24c7a48 /drivers/scsi/bfa/bfa_fcbuild.c | |
parent | 156606768cc234146e21fa6ba6316dbc67a204dd (diff) |
[SCSI] bfa: remove os wrapper and unused functions
This patch removes os wrapper and unused functions.
bfa_os_assign(), bfa_os_memset(), bfa_os_memcpy(), bfa_os_udelay()
bfa_os_vsprintf(), bfa_os_snprintf(), and bfa_os_get_clock() are replaced with
direct assignment or native linux functions. Some unused functions related to VF
(Vitual fabric) are also removed.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_fcbuild.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_fcbuild.c | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/drivers/scsi/bfa/bfa_fcbuild.c b/drivers/scsi/bfa/bfa_fcbuild.c index b7d2657ca82a..7e7c14bd552a 100644 --- a/drivers/scsi/bfa/bfa_fcbuild.c +++ b/drivers/scsi/bfa/bfa_fcbuild.c | |||
@@ -137,7 +137,7 @@ fcbuild_init(void) | |||
137 | static void | 137 | static void |
138 | fc_gs_fchdr_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u32 ox_id) | 138 | fc_gs_fchdr_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u32 ox_id) |
139 | { | 139 | { |
140 | bfa_os_memset(fchs, 0, sizeof(struct fchs_s)); | 140 | memset(fchs, 0, sizeof(struct fchs_s)); |
141 | 141 | ||
142 | fchs->routing = FC_RTG_FC4_DEV_DATA; | 142 | fchs->routing = FC_RTG_FC4_DEV_DATA; |
143 | fchs->cat_info = FC_CAT_UNSOLICIT_CTRL; | 143 | fchs->cat_info = FC_CAT_UNSOLICIT_CTRL; |
@@ -159,7 +159,7 @@ fc_gs_fchdr_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u32 ox_id) | |||
159 | void | 159 | void |
160 | fc_els_req_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) | 160 | fc_els_req_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) |
161 | { | 161 | { |
162 | bfa_os_memcpy(fchs, &fc_els_req_tmpl, sizeof(struct fchs_s)); | 162 | memcpy(fchs, &fc_els_req_tmpl, sizeof(struct fchs_s)); |
163 | fchs->d_id = (d_id); | 163 | fchs->d_id = (d_id); |
164 | fchs->s_id = (s_id); | 164 | fchs->s_id = (s_id); |
165 | fchs->ox_id = bfa_os_htons(ox_id); | 165 | fchs->ox_id = bfa_os_htons(ox_id); |
@@ -168,7 +168,7 @@ fc_els_req_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) | |||
168 | static void | 168 | static void |
169 | fc_els_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) | 169 | fc_els_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) |
170 | { | 170 | { |
171 | bfa_os_memcpy(fchs, &fc_els_rsp_tmpl, sizeof(struct fchs_s)); | 171 | memcpy(fchs, &fc_els_rsp_tmpl, sizeof(struct fchs_s)); |
172 | fchs->d_id = d_id; | 172 | fchs->d_id = d_id; |
173 | fchs->s_id = s_id; | 173 | fchs->s_id = s_id; |
174 | fchs->ox_id = ox_id; | 174 | fchs->ox_id = ox_id; |
@@ -198,7 +198,7 @@ fc_els_rsp_parse(struct fchs_s *fchs, int len) | |||
198 | static void | 198 | static void |
199 | fc_bls_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) | 199 | fc_bls_rsp_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) |
200 | { | 200 | { |
201 | bfa_os_memcpy(fchs, &fc_bls_rsp_tmpl, sizeof(struct fchs_s)); | 201 | memcpy(fchs, &fc_bls_rsp_tmpl, sizeof(struct fchs_s)); |
202 | fchs->d_id = d_id; | 202 | fchs->d_id = d_id; |
203 | fchs->s_id = s_id; | 203 | fchs->s_id = s_id; |
204 | fchs->ox_id = ox_id; | 204 | fchs->ox_id = ox_id; |
@@ -211,7 +211,7 @@ fc_plogi_x_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, | |||
211 | { | 211 | { |
212 | struct fc_logi_s *plogi = (struct fc_logi_s *) (pld); | 212 | struct fc_logi_s *plogi = (struct fc_logi_s *) (pld); |
213 | 213 | ||
214 | bfa_os_memcpy(plogi, &plogi_tmpl, sizeof(struct fc_logi_s)); | 214 | memcpy(plogi, &plogi_tmpl, sizeof(struct fc_logi_s)); |
215 | 215 | ||
216 | plogi->els_cmd.els_code = els_code; | 216 | plogi->els_cmd.els_code = els_code; |
217 | if (els_code == FC_ELS_PLOGI) | 217 | if (els_code == FC_ELS_PLOGI) |
@@ -221,8 +221,8 @@ fc_plogi_x_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, | |||
221 | 221 | ||
222 | plogi->csp.rxsz = plogi->class3.rxsz = bfa_os_htons(pdu_size); | 222 | plogi->csp.rxsz = plogi->class3.rxsz = bfa_os_htons(pdu_size); |
223 | 223 | ||
224 | bfa_os_memcpy(&plogi->port_name, &port_name, sizeof(wwn_t)); | 224 | memcpy(&plogi->port_name, &port_name, sizeof(wwn_t)); |
225 | bfa_os_memcpy(&plogi->node_name, &node_name, sizeof(wwn_t)); | 225 | memcpy(&plogi->node_name, &node_name, sizeof(wwn_t)); |
226 | 226 | ||
227 | return sizeof(struct fc_logi_s); | 227 | return sizeof(struct fc_logi_s); |
228 | } | 228 | } |
@@ -235,7 +235,7 @@ fc_flogi_build(struct fchs_s *fchs, struct fc_logi_s *flogi, u32 s_id, | |||
235 | u32 d_id = bfa_os_hton3b(FC_FABRIC_PORT); | 235 | u32 d_id = bfa_os_hton3b(FC_FABRIC_PORT); |
236 | u32 *vvl_info; | 236 | u32 *vvl_info; |
237 | 237 | ||
238 | bfa_os_memcpy(flogi, &plogi_tmpl, sizeof(struct fc_logi_s)); | 238 | memcpy(flogi, &plogi_tmpl, sizeof(struct fc_logi_s)); |
239 | 239 | ||
240 | flogi->els_cmd.els_code = FC_ELS_FLOGI; | 240 | flogi->els_cmd.els_code = FC_ELS_FLOGI; |
241 | fc_els_req_build(fchs, d_id, s_id, ox_id); | 241 | fc_els_req_build(fchs, d_id, s_id, ox_id); |
@@ -272,7 +272,7 @@ fc_flogi_acc_build(struct fchs_s *fchs, struct fc_logi_s *flogi, u32 s_id, | |||
272 | { | 272 | { |
273 | u32 d_id = 0; | 273 | u32 d_id = 0; |
274 | 274 | ||
275 | bfa_os_memcpy(flogi, &plogi_tmpl, sizeof(struct fc_logi_s)); | 275 | memcpy(flogi, &plogi_tmpl, sizeof(struct fc_logi_s)); |
276 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); | 276 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); |
277 | 277 | ||
278 | flogi->els_cmd.els_code = FC_ELS_ACC; | 278 | flogi->els_cmd.els_code = FC_ELS_ACC; |
@@ -291,7 +291,7 @@ fc_fdisc_build(struct fchs_s *fchs, struct fc_logi_s *flogi, u32 s_id, | |||
291 | { | 291 | { |
292 | u32 d_id = bfa_os_hton3b(FC_FABRIC_PORT); | 292 | u32 d_id = bfa_os_hton3b(FC_FABRIC_PORT); |
293 | 293 | ||
294 | bfa_os_memcpy(flogi, &plogi_tmpl, sizeof(struct fc_logi_s)); | 294 | memcpy(flogi, &plogi_tmpl, sizeof(struct fc_logi_s)); |
295 | 295 | ||
296 | flogi->els_cmd.els_code = FC_ELS_FDISC; | 296 | flogi->els_cmd.els_code = FC_ELS_FDISC; |
297 | fc_els_req_build(fchs, d_id, s_id, ox_id); | 297 | fc_els_req_build(fchs, d_id, s_id, ox_id); |
@@ -378,7 +378,7 @@ fc_prli_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, | |||
378 | struct fc_prli_s *prli = (struct fc_prli_s *) (pld); | 378 | struct fc_prli_s *prli = (struct fc_prli_s *) (pld); |
379 | 379 | ||
380 | fc_els_req_build(fchs, d_id, s_id, ox_id); | 380 | fc_els_req_build(fchs, d_id, s_id, ox_id); |
381 | bfa_os_memcpy(prli, &prli_tmpl, sizeof(struct fc_prli_s)); | 381 | memcpy(prli, &prli_tmpl, sizeof(struct fc_prli_s)); |
382 | 382 | ||
383 | prli->command = FC_ELS_PRLI; | 383 | prli->command = FC_ELS_PRLI; |
384 | prli->parampage.servparams.initiator = 1; | 384 | prli->parampage.servparams.initiator = 1; |
@@ -397,7 +397,7 @@ fc_prli_acc_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, | |||
397 | struct fc_prli_s *prli = (struct fc_prli_s *) (pld); | 397 | struct fc_prli_s *prli = (struct fc_prli_s *) (pld); |
398 | 398 | ||
399 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); | 399 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); |
400 | bfa_os_memcpy(prli, &prli_tmpl, sizeof(struct fc_prli_s)); | 400 | memcpy(prli, &prli_tmpl, sizeof(struct fc_prli_s)); |
401 | 401 | ||
402 | prli->command = FC_ELS_ACC; | 402 | prli->command = FC_ELS_ACC; |
403 | 403 | ||
@@ -448,7 +448,7 @@ fc_logo_build(struct fchs_s *fchs, struct fc_logo_s *logo, u32 d_id, u32 s_id, | |||
448 | { | 448 | { |
449 | fc_els_req_build(fchs, d_id, s_id, ox_id); | 449 | fc_els_req_build(fchs, d_id, s_id, ox_id); |
450 | 450 | ||
451 | bfa_os_memset(logo, '\0', sizeof(struct fc_logo_s)); | 451 | memset(logo, '\0', sizeof(struct fc_logo_s)); |
452 | logo->els_cmd.els_code = FC_ELS_LOGO; | 452 | logo->els_cmd.els_code = FC_ELS_LOGO; |
453 | logo->nport_id = (s_id); | 453 | logo->nport_id = (s_id); |
454 | logo->orig_port_name = port_name; | 454 | logo->orig_port_name = port_name; |
@@ -461,7 +461,7 @@ fc_adisc_x_build(struct fchs_s *fchs, struct fc_adisc_s *adisc, u32 d_id, | |||
461 | u32 s_id, u16 ox_id, wwn_t port_name, | 461 | u32 s_id, u16 ox_id, wwn_t port_name, |
462 | wwn_t node_name, u8 els_code) | 462 | wwn_t node_name, u8 els_code) |
463 | { | 463 | { |
464 | bfa_os_memset(adisc, '\0', sizeof(struct fc_adisc_s)); | 464 | memset(adisc, '\0', sizeof(struct fc_adisc_s)); |
465 | 465 | ||
466 | adisc->els_cmd.els_code = els_code; | 466 | adisc->els_cmd.els_code = els_code; |
467 | 467 | ||
@@ -554,7 +554,7 @@ fc_pdisc_parse(struct fchs_s *fchs, wwn_t node_name, wwn_t port_name) | |||
554 | u16 | 554 | u16 |
555 | fc_abts_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) | 555 | fc_abts_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id) |
556 | { | 556 | { |
557 | bfa_os_memcpy(fchs, &fc_bls_req_tmpl, sizeof(struct fchs_s)); | 557 | memcpy(fchs, &fc_bls_req_tmpl, sizeof(struct fchs_s)); |
558 | fchs->cat_info = FC_CAT_ABTS; | 558 | fchs->cat_info = FC_CAT_ABTS; |
559 | fchs->d_id = (d_id); | 559 | fchs->d_id = (d_id); |
560 | fchs->s_id = (s_id); | 560 | fchs->s_id = (s_id); |
@@ -582,7 +582,7 @@ fc_rrq_build(struct fchs_s *fchs, struct fc_rrq_s *rrq, u32 d_id, u32 s_id, | |||
582 | /* | 582 | /* |
583 | * build rrq payload | 583 | * build rrq payload |
584 | */ | 584 | */ |
585 | bfa_os_memcpy(rrq, &rrq_tmpl, sizeof(struct fc_rrq_s)); | 585 | memcpy(rrq, &rrq_tmpl, sizeof(struct fc_rrq_s)); |
586 | rrq->s_id = (s_id); | 586 | rrq->s_id = (s_id); |
587 | rrq->ox_id = bfa_os_htons(rrq_oxid); | 587 | rrq->ox_id = bfa_os_htons(rrq_oxid); |
588 | rrq->rx_id = FC_RXID_ANY; | 588 | rrq->rx_id = FC_RXID_ANY; |
@@ -598,7 +598,7 @@ fc_logo_acc_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id, | |||
598 | 598 | ||
599 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); | 599 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); |
600 | 600 | ||
601 | bfa_os_memset(acc, 0, sizeof(struct fc_els_cmd_s)); | 601 | memset(acc, 0, sizeof(struct fc_els_cmd_s)); |
602 | acc->els_code = FC_ELS_ACC; | 602 | acc->els_code = FC_ELS_ACC; |
603 | 603 | ||
604 | return sizeof(struct fc_els_cmd_s); | 604 | return sizeof(struct fc_els_cmd_s); |
@@ -610,7 +610,7 @@ fc_ls_rjt_build(struct fchs_s *fchs, struct fc_ls_rjt_s *ls_rjt, u32 d_id, | |||
610 | u8 reason_code_expl) | 610 | u8 reason_code_expl) |
611 | { | 611 | { |
612 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); | 612 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); |
613 | bfa_os_memset(ls_rjt, 0, sizeof(struct fc_ls_rjt_s)); | 613 | memset(ls_rjt, 0, sizeof(struct fc_ls_rjt_s)); |
614 | 614 | ||
615 | ls_rjt->els_cmd.els_code = FC_ELS_LS_RJT; | 615 | ls_rjt->els_cmd.els_code = FC_ELS_LS_RJT; |
616 | ls_rjt->reason_code = reason_code; | 616 | ls_rjt->reason_code = reason_code; |
@@ -626,7 +626,7 @@ fc_ba_acc_build(struct fchs_s *fchs, struct fc_ba_acc_s *ba_acc, u32 d_id, | |||
626 | { | 626 | { |
627 | fc_bls_rsp_build(fchs, d_id, s_id, ox_id); | 627 | fc_bls_rsp_build(fchs, d_id, s_id, ox_id); |
628 | 628 | ||
629 | bfa_os_memcpy(ba_acc, &ba_acc_tmpl, sizeof(struct fc_ba_acc_s)); | 629 | memcpy(ba_acc, &ba_acc_tmpl, sizeof(struct fc_ba_acc_s)); |
630 | 630 | ||
631 | fchs->rx_id = rx_id; | 631 | fchs->rx_id = rx_id; |
632 | 632 | ||
@@ -641,7 +641,7 @@ fc_ls_acc_build(struct fchs_s *fchs, struct fc_els_cmd_s *els_cmd, u32 d_id, | |||
641 | u32 s_id, u16 ox_id) | 641 | u32 s_id, u16 ox_id) |
642 | { | 642 | { |
643 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); | 643 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); |
644 | bfa_os_memset(els_cmd, 0, sizeof(struct fc_els_cmd_s)); | 644 | memset(els_cmd, 0, sizeof(struct fc_els_cmd_s)); |
645 | els_cmd->els_code = FC_ELS_ACC; | 645 | els_cmd->els_code = FC_ELS_ACC; |
646 | 646 | ||
647 | return sizeof(struct fc_els_cmd_s); | 647 | return sizeof(struct fc_els_cmd_s); |
@@ -672,7 +672,7 @@ fc_tprlo_acc_build(struct fchs_s *fchs, struct fc_tprlo_acc_s *tprlo_acc, | |||
672 | 672 | ||
673 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); | 673 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); |
674 | 674 | ||
675 | bfa_os_memset(tprlo_acc, 0, (num_pages * 16) + 4); | 675 | memset(tprlo_acc, 0, (num_pages * 16) + 4); |
676 | tprlo_acc->command = FC_ELS_ACC; | 676 | tprlo_acc->command = FC_ELS_ACC; |
677 | 677 | ||
678 | tprlo_acc->page_len = 0x10; | 678 | tprlo_acc->page_len = 0x10; |
@@ -696,7 +696,7 @@ fc_prlo_acc_build(struct fchs_s *fchs, struct fc_prlo_acc_s *prlo_acc, u32 d_id, | |||
696 | 696 | ||
697 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); | 697 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); |
698 | 698 | ||
699 | bfa_os_memset(prlo_acc, 0, (num_pages * 16) + 4); | 699 | memset(prlo_acc, 0, (num_pages * 16) + 4); |
700 | prlo_acc->command = FC_ELS_ACC; | 700 | prlo_acc->command = FC_ELS_ACC; |
701 | prlo_acc->page_len = 0x10; | 701 | prlo_acc->page_len = 0x10; |
702 | prlo_acc->payload_len = bfa_os_htons((num_pages * 16) + 4); | 702 | prlo_acc->payload_len = bfa_os_htons((num_pages * 16) + 4); |
@@ -718,7 +718,7 @@ fc_rnid_build(struct fchs_s *fchs, struct fc_rnid_cmd_s *rnid, u32 d_id, | |||
718 | { | 718 | { |
719 | fc_els_req_build(fchs, d_id, s_id, ox_id); | 719 | fc_els_req_build(fchs, d_id, s_id, ox_id); |
720 | 720 | ||
721 | bfa_os_memset(rnid, 0, sizeof(struct fc_rnid_cmd_s)); | 721 | memset(rnid, 0, sizeof(struct fc_rnid_cmd_s)); |
722 | 722 | ||
723 | rnid->els_cmd.els_code = FC_ELS_RNID; | 723 | rnid->els_cmd.els_code = FC_ELS_RNID; |
724 | rnid->node_id_data_format = data_format; | 724 | rnid->node_id_data_format = data_format; |
@@ -732,7 +732,7 @@ fc_rnid_acc_build(struct fchs_s *fchs, struct fc_rnid_acc_s *rnid_acc, u32 d_id, | |||
732 | struct fc_rnid_common_id_data_s *common_id_data, | 732 | struct fc_rnid_common_id_data_s *common_id_data, |
733 | struct fc_rnid_general_topology_data_s *gen_topo_data) | 733 | struct fc_rnid_general_topology_data_s *gen_topo_data) |
734 | { | 734 | { |
735 | bfa_os_memset(rnid_acc, 0, sizeof(struct fc_rnid_acc_s)); | 735 | memset(rnid_acc, 0, sizeof(struct fc_rnid_acc_s)); |
736 | 736 | ||
737 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); | 737 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); |
738 | 738 | ||
@@ -745,7 +745,7 @@ fc_rnid_acc_build(struct fchs_s *fchs, struct fc_rnid_acc_s *rnid_acc, u32 d_id, | |||
745 | if (data_format == RNID_NODEID_DATA_FORMAT_DISCOVERY) { | 745 | if (data_format == RNID_NODEID_DATA_FORMAT_DISCOVERY) { |
746 | rnid_acc->specific_id_data_length = | 746 | rnid_acc->specific_id_data_length = |
747 | sizeof(struct fc_rnid_general_topology_data_s); | 747 | sizeof(struct fc_rnid_general_topology_data_s); |
748 | bfa_os_assign(rnid_acc->gen_topology_data, *gen_topo_data); | 748 | rnid_acc->gen_topology_data = *gen_topo_data; |
749 | return sizeof(struct fc_rnid_acc_s); | 749 | return sizeof(struct fc_rnid_acc_s); |
750 | } else { | 750 | } else { |
751 | return sizeof(struct fc_rnid_acc_s) - | 751 | return sizeof(struct fc_rnid_acc_s) - |
@@ -760,7 +760,7 @@ fc_rpsc_build(struct fchs_s *fchs, struct fc_rpsc_cmd_s *rpsc, u32 d_id, | |||
760 | { | 760 | { |
761 | fc_els_req_build(fchs, d_id, s_id, ox_id); | 761 | fc_els_req_build(fchs, d_id, s_id, ox_id); |
762 | 762 | ||
763 | bfa_os_memset(rpsc, 0, sizeof(struct fc_rpsc_cmd_s)); | 763 | memset(rpsc, 0, sizeof(struct fc_rpsc_cmd_s)); |
764 | 764 | ||
765 | rpsc->els_cmd.els_code = FC_ELS_RPSC; | 765 | rpsc->els_cmd.els_code = FC_ELS_RPSC; |
766 | return sizeof(struct fc_rpsc_cmd_s); | 766 | return sizeof(struct fc_rpsc_cmd_s); |
@@ -775,7 +775,7 @@ fc_rpsc2_build(struct fchs_s *fchs, struct fc_rpsc2_cmd_s *rpsc2, u32 d_id, | |||
775 | 775 | ||
776 | fc_els_req_build(fchs, bfa_os_hton3b(dctlr_id), s_id, 0); | 776 | fc_els_req_build(fchs, bfa_os_hton3b(dctlr_id), s_id, 0); |
777 | 777 | ||
778 | bfa_os_memset(rpsc2, 0, sizeof(struct fc_rpsc2_cmd_s)); | 778 | memset(rpsc2, 0, sizeof(struct fc_rpsc2_cmd_s)); |
779 | 779 | ||
780 | rpsc2->els_cmd.els_code = FC_ELS_RPSC; | 780 | rpsc2->els_cmd.els_code = FC_ELS_RPSC; |
781 | rpsc2->token = bfa_os_htonl(FC_BRCD_TOKEN); | 781 | rpsc2->token = bfa_os_htonl(FC_BRCD_TOKEN); |
@@ -791,7 +791,7 @@ fc_rpsc_acc_build(struct fchs_s *fchs, struct fc_rpsc_acc_s *rpsc_acc, | |||
791 | u32 d_id, u32 s_id, u16 ox_id, | 791 | u32 d_id, u32 s_id, u16 ox_id, |
792 | struct fc_rpsc_speed_info_s *oper_speed) | 792 | struct fc_rpsc_speed_info_s *oper_speed) |
793 | { | 793 | { |
794 | bfa_os_memset(rpsc_acc, 0, sizeof(struct fc_rpsc_acc_s)); | 794 | memset(rpsc_acc, 0, sizeof(struct fc_rpsc_acc_s)); |
795 | 795 | ||
796 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); | 796 | fc_els_rsp_build(fchs, d_id, s_id, ox_id); |
797 | 797 | ||
@@ -830,7 +830,7 @@ fc_pdisc_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id, | |||
830 | { | 830 | { |
831 | struct fc_logi_s *pdisc = (struct fc_logi_s *) (fchs + 1); | 831 | struct fc_logi_s *pdisc = (struct fc_logi_s *) (fchs + 1); |
832 | 832 | ||
833 | bfa_os_memcpy(pdisc, &plogi_tmpl, sizeof(struct fc_logi_s)); | 833 | memcpy(pdisc, &plogi_tmpl, sizeof(struct fc_logi_s)); |
834 | 834 | ||
835 | pdisc->els_cmd.els_code = FC_ELS_PDISC; | 835 | pdisc->els_cmd.els_code = FC_ELS_PDISC; |
836 | fc_els_req_build(fchs, d_id, s_id, ox_id); | 836 | fc_els_req_build(fchs, d_id, s_id, ox_id); |
@@ -873,7 +873,7 @@ fc_prlo_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id, | |||
873 | int page; | 873 | int page; |
874 | 874 | ||
875 | fc_els_req_build(fchs, d_id, s_id, ox_id); | 875 | fc_els_req_build(fchs, d_id, s_id, ox_id); |
876 | bfa_os_memset(prlo, 0, (num_pages * 16) + 4); | 876 | memset(prlo, 0, (num_pages * 16) + 4); |
877 | prlo->command = FC_ELS_PRLO; | 877 | prlo->command = FC_ELS_PRLO; |
878 | prlo->page_len = 0x10; | 878 | prlo->page_len = 0x10; |
879 | prlo->payload_len = bfa_os_htons((num_pages * 16) + 4); | 879 | prlo->payload_len = bfa_os_htons((num_pages * 16) + 4); |
@@ -931,7 +931,7 @@ fc_tprlo_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id, | |||
931 | int page; | 931 | int page; |
932 | 932 | ||
933 | fc_els_req_build(fchs, d_id, s_id, ox_id); | 933 | fc_els_req_build(fchs, d_id, s_id, ox_id); |
934 | bfa_os_memset(tprlo, 0, (num_pages * 16) + 4); | 934 | memset(tprlo, 0, (num_pages * 16) + 4); |
935 | tprlo->command = FC_ELS_TPRLO; | 935 | tprlo->command = FC_ELS_TPRLO; |
936 | tprlo->page_len = 0x10; | 936 | tprlo->page_len = 0x10; |
937 | tprlo->payload_len = bfa_os_htons((num_pages * 16) + 4); | 937 | tprlo->payload_len = bfa_os_htons((num_pages * 16) + 4); |
@@ -1011,7 +1011,7 @@ fc_ba_rjt_build(struct fchs_s *fchs, u32 d_id, u32 s_id, u16 ox_id, | |||
1011 | static void | 1011 | static void |
1012 | fc_gs_cthdr_build(struct ct_hdr_s *cthdr, u32 s_id, u16 cmd_code) | 1012 | fc_gs_cthdr_build(struct ct_hdr_s *cthdr, u32 s_id, u16 cmd_code) |
1013 | { | 1013 | { |
1014 | bfa_os_memset(cthdr, 0, sizeof(struct ct_hdr_s)); | 1014 | memset(cthdr, 0, sizeof(struct ct_hdr_s)); |
1015 | cthdr->rev_id = CT_GS3_REVISION; | 1015 | cthdr->rev_id = CT_GS3_REVISION; |
1016 | cthdr->gs_type = CT_GSTYPE_DIRSERVICE; | 1016 | cthdr->gs_type = CT_GSTYPE_DIRSERVICE; |
1017 | cthdr->gs_sub_type = CT_GSSUBTYPE_NAMESERVER; | 1017 | cthdr->gs_sub_type = CT_GSSUBTYPE_NAMESERVER; |
@@ -1021,7 +1021,7 @@ fc_gs_cthdr_build(struct ct_hdr_s *cthdr, u32 s_id, u16 cmd_code) | |||
1021 | static void | 1021 | static void |
1022 | fc_gs_fdmi_cthdr_build(struct ct_hdr_s *cthdr, u32 s_id, u16 cmd_code) | 1022 | fc_gs_fdmi_cthdr_build(struct ct_hdr_s *cthdr, u32 s_id, u16 cmd_code) |
1023 | { | 1023 | { |
1024 | bfa_os_memset(cthdr, 0, sizeof(struct ct_hdr_s)); | 1024 | memset(cthdr, 0, sizeof(struct ct_hdr_s)); |
1025 | cthdr->rev_id = CT_GS3_REVISION; | 1025 | cthdr->rev_id = CT_GS3_REVISION; |
1026 | cthdr->gs_type = CT_GSTYPE_MGMTSERVICE; | 1026 | cthdr->gs_type = CT_GSTYPE_MGMTSERVICE; |
1027 | cthdr->gs_sub_type = CT_GSSUBTYPE_HBA_MGMTSERVER; | 1027 | cthdr->gs_sub_type = CT_GSSUBTYPE_HBA_MGMTSERVER; |
@@ -1032,7 +1032,7 @@ static void | |||
1032 | fc_gs_ms_cthdr_build(struct ct_hdr_s *cthdr, u32 s_id, u16 cmd_code, | 1032 | fc_gs_ms_cthdr_build(struct ct_hdr_s *cthdr, u32 s_id, u16 cmd_code, |
1033 | u8 sub_type) | 1033 | u8 sub_type) |
1034 | { | 1034 | { |
1035 | bfa_os_memset(cthdr, 0, sizeof(struct ct_hdr_s)); | 1035 | memset(cthdr, 0, sizeof(struct ct_hdr_s)); |
1036 | cthdr->rev_id = CT_GS3_REVISION; | 1036 | cthdr->rev_id = CT_GS3_REVISION; |
1037 | cthdr->gs_type = CT_GSTYPE_MGMTSERVICE; | 1037 | cthdr->gs_type = CT_GSTYPE_MGMTSERVICE; |
1038 | cthdr->gs_sub_type = sub_type; | 1038 | cthdr->gs_sub_type = sub_type; |
@@ -1050,7 +1050,7 @@ fc_gidpn_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, | |||
1050 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); | 1050 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); |
1051 | fc_gs_cthdr_build(cthdr, s_id, GS_GID_PN); | 1051 | fc_gs_cthdr_build(cthdr, s_id, GS_GID_PN); |
1052 | 1052 | ||
1053 | bfa_os_memset(gidpn, 0, sizeof(struct fcgs_gidpn_req_s)); | 1053 | memset(gidpn, 0, sizeof(struct fcgs_gidpn_req_s)); |
1054 | gidpn->port_name = port_name; | 1054 | gidpn->port_name = port_name; |
1055 | return sizeof(struct fcgs_gidpn_req_s) + sizeof(struct ct_hdr_s); | 1055 | return sizeof(struct fcgs_gidpn_req_s) + sizeof(struct ct_hdr_s); |
1056 | } | 1056 | } |
@@ -1066,7 +1066,7 @@ fc_gpnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, | |||
1066 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); | 1066 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); |
1067 | fc_gs_cthdr_build(cthdr, s_id, GS_GPN_ID); | 1067 | fc_gs_cthdr_build(cthdr, s_id, GS_GPN_ID); |
1068 | 1068 | ||
1069 | bfa_os_memset(gpnid, 0, sizeof(fcgs_gpnid_req_t)); | 1069 | memset(gpnid, 0, sizeof(fcgs_gpnid_req_t)); |
1070 | gpnid->dap = port_id; | 1070 | gpnid->dap = port_id; |
1071 | return sizeof(fcgs_gpnid_req_t) + sizeof(struct ct_hdr_s); | 1071 | return sizeof(fcgs_gpnid_req_t) + sizeof(struct ct_hdr_s); |
1072 | } | 1072 | } |
@@ -1082,7 +1082,7 @@ fc_gnnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, | |||
1082 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); | 1082 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); |
1083 | fc_gs_cthdr_build(cthdr, s_id, GS_GNN_ID); | 1083 | fc_gs_cthdr_build(cthdr, s_id, GS_GNN_ID); |
1084 | 1084 | ||
1085 | bfa_os_memset(gnnid, 0, sizeof(fcgs_gnnid_req_t)); | 1085 | memset(gnnid, 0, sizeof(fcgs_gnnid_req_t)); |
1086 | gnnid->dap = port_id; | 1086 | gnnid->dap = port_id; |
1087 | return sizeof(fcgs_gnnid_req_t) + sizeof(struct ct_hdr_s); | 1087 | return sizeof(fcgs_gnnid_req_t) + sizeof(struct ct_hdr_s); |
1088 | } | 1088 | } |
@@ -1108,7 +1108,7 @@ fc_scr_build(struct fchs_s *fchs, struct fc_scr_s *scr, | |||
1108 | 1108 | ||
1109 | fc_els_req_build(fchs, d_id, s_id, ox_id); | 1109 | fc_els_req_build(fchs, d_id, s_id, ox_id); |
1110 | 1110 | ||
1111 | bfa_os_memset(scr, 0, sizeof(struct fc_scr_s)); | 1111 | memset(scr, 0, sizeof(struct fc_scr_s)); |
1112 | scr->command = FC_ELS_SCR; | 1112 | scr->command = FC_ELS_SCR; |
1113 | scr->reg_func = FC_SCR_REG_FUNC_FULL; | 1113 | scr->reg_func = FC_SCR_REG_FUNC_FULL; |
1114 | if (set_br_reg) | 1114 | if (set_br_reg) |
@@ -1149,7 +1149,7 @@ fc_rftid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, | |||
1149 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); | 1149 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); |
1150 | fc_gs_cthdr_build(cthdr, s_id, GS_RFT_ID); | 1150 | fc_gs_cthdr_build(cthdr, s_id, GS_RFT_ID); |
1151 | 1151 | ||
1152 | bfa_os_memset(rftid, 0, sizeof(struct fcgs_rftid_req_s)); | 1152 | memset(rftid, 0, sizeof(struct fcgs_rftid_req_s)); |
1153 | 1153 | ||
1154 | rftid->dap = s_id; | 1154 | rftid->dap = s_id; |
1155 | 1155 | ||
@@ -1172,10 +1172,10 @@ fc_rftid_build_sol(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, | |||
1172 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); | 1172 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); |
1173 | fc_gs_cthdr_build(cthdr, s_id, GS_RFT_ID); | 1173 | fc_gs_cthdr_build(cthdr, s_id, GS_RFT_ID); |
1174 | 1174 | ||
1175 | bfa_os_memset(rftid, 0, sizeof(struct fcgs_rftid_req_s)); | 1175 | memset(rftid, 0, sizeof(struct fcgs_rftid_req_s)); |
1176 | 1176 | ||
1177 | rftid->dap = s_id; | 1177 | rftid->dap = s_id; |
1178 | bfa_os_memcpy((void *)rftid->fc4_type, (void *)fc4_bitmap, | 1178 | memcpy((void *)rftid->fc4_type, (void *)fc4_bitmap, |
1179 | (bitmap_size < 32 ? bitmap_size : 32)); | 1179 | (bitmap_size < 32 ? bitmap_size : 32)); |
1180 | 1180 | ||
1181 | return sizeof(struct fcgs_rftid_req_s) + sizeof(struct ct_hdr_s); | 1181 | return sizeof(struct fcgs_rftid_req_s) + sizeof(struct ct_hdr_s); |
@@ -1192,7 +1192,7 @@ fc_rffid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, | |||
1192 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); | 1192 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); |
1193 | fc_gs_cthdr_build(cthdr, s_id, GS_RFF_ID); | 1193 | fc_gs_cthdr_build(cthdr, s_id, GS_RFF_ID); |
1194 | 1194 | ||
1195 | bfa_os_memset(rffid, 0, sizeof(struct fcgs_rffid_req_s)); | 1195 | memset(rffid, 0, sizeof(struct fcgs_rffid_req_s)); |
1196 | 1196 | ||
1197 | rffid->dap = s_id; | 1197 | rffid->dap = s_id; |
1198 | rffid->fc4ftr_bits = fc4_ftrs; | 1198 | rffid->fc4ftr_bits = fc4_ftrs; |
@@ -1214,7 +1214,7 @@ fc_rspnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, | |||
1214 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); | 1214 | fc_gs_fchdr_build(fchs, d_id, s_id, ox_id); |
1215 | fc_gs_cthdr_build(cthdr, s_id, GS_RSPN_ID); | 1215 | fc_gs_cthdr_build(cthdr, s_id, GS_RSPN_ID); |
1216 | 1216 | ||
1217 | bfa_os_memset(rspnid, 0, sizeof(struct fcgs_rspnid_req_s)); | 1217 | memset(rspnid, 0, sizeof(struct fcgs_rspnid_req_s)); |
1218 | 1218 | ||
1219 | rspnid->dap = s_id; | 1219 | rspnid->dap = s_id; |
1220 | rspnid->spn_len = (u8) strlen((char *)name); | 1220 | rspnid->spn_len = (u8) strlen((char *)name); |
@@ -1235,7 +1235,7 @@ fc_gid_ft_build(struct fchs_s *fchs, void *pyld, u32 s_id, u8 fc4_type) | |||
1235 | 1235 | ||
1236 | fc_gs_cthdr_build(cthdr, s_id, GS_GID_FT); | 1236 | fc_gs_cthdr_build(cthdr, s_id, GS_GID_FT); |
1237 | 1237 | ||
1238 | bfa_os_memset(gidft, 0, sizeof(struct fcgs_gidft_req_s)); | 1238 | memset(gidft, 0, sizeof(struct fcgs_gidft_req_s)); |
1239 | gidft->fc4_type = fc4_type; | 1239 | gidft->fc4_type = fc4_type; |
1240 | gidft->domain_id = 0; | 1240 | gidft->domain_id = 0; |
1241 | gidft->area_id = 0; | 1241 | gidft->area_id = 0; |
@@ -1254,7 +1254,7 @@ fc_rpnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u32 port_id, | |||
1254 | fc_gs_fchdr_build(fchs, d_id, s_id, 0); | 1254 | fc_gs_fchdr_build(fchs, d_id, s_id, 0); |
1255 | fc_gs_cthdr_build(cthdr, s_id, GS_RPN_ID); | 1255 | fc_gs_cthdr_build(cthdr, s_id, GS_RPN_ID); |
1256 | 1256 | ||
1257 | bfa_os_memset(rpnid, 0, sizeof(struct fcgs_rpnid_req_s)); | 1257 | memset(rpnid, 0, sizeof(struct fcgs_rpnid_req_s)); |
1258 | rpnid->port_id = port_id; | 1258 | rpnid->port_id = port_id; |
1259 | rpnid->port_name = port_name; | 1259 | rpnid->port_name = port_name; |
1260 | 1260 | ||
@@ -1272,7 +1272,7 @@ fc_rnnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u32 port_id, | |||
1272 | fc_gs_fchdr_build(fchs, d_id, s_id, 0); | 1272 | fc_gs_fchdr_build(fchs, d_id, s_id, 0); |
1273 | fc_gs_cthdr_build(cthdr, s_id, GS_RNN_ID); | 1273 | fc_gs_cthdr_build(cthdr, s_id, GS_RNN_ID); |
1274 | 1274 | ||
1275 | bfa_os_memset(rnnid, 0, sizeof(struct fcgs_rnnid_req_s)); | 1275 | memset(rnnid, 0, sizeof(struct fcgs_rnnid_req_s)); |
1276 | rnnid->port_id = port_id; | 1276 | rnnid->port_id = port_id; |
1277 | rnnid->node_name = node_name; | 1277 | rnnid->node_name = node_name; |
1278 | 1278 | ||
@@ -1291,7 +1291,7 @@ fc_rcsid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u32 port_id, | |||
1291 | fc_gs_fchdr_build(fchs, d_id, s_id, 0); | 1291 | fc_gs_fchdr_build(fchs, d_id, s_id, 0); |
1292 | fc_gs_cthdr_build(cthdr, s_id, GS_RCS_ID); | 1292 | fc_gs_cthdr_build(cthdr, s_id, GS_RCS_ID); |
1293 | 1293 | ||
1294 | bfa_os_memset(rcsid, 0, sizeof(struct fcgs_rcsid_req_s)); | 1294 | memset(rcsid, 0, sizeof(struct fcgs_rcsid_req_s)); |
1295 | rcsid->port_id = port_id; | 1295 | rcsid->port_id = port_id; |
1296 | rcsid->cos = cos; | 1296 | rcsid->cos = cos; |
1297 | 1297 | ||
@@ -1309,7 +1309,7 @@ fc_rptid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u32 port_id, | |||
1309 | fc_gs_fchdr_build(fchs, d_id, s_id, 0); | 1309 | fc_gs_fchdr_build(fchs, d_id, s_id, 0); |
1310 | fc_gs_cthdr_build(cthdr, s_id, GS_RPT_ID); | 1310 | fc_gs_cthdr_build(cthdr, s_id, GS_RPT_ID); |
1311 | 1311 | ||
1312 | bfa_os_memset(rptid, 0, sizeof(struct fcgs_rptid_req_s)); | 1312 | memset(rptid, 0, sizeof(struct fcgs_rptid_req_s)); |
1313 | rptid->port_id = port_id; | 1313 | rptid->port_id = port_id; |
1314 | rptid->port_type = port_type; | 1314 | rptid->port_type = port_type; |
1315 | 1315 | ||
@@ -1326,7 +1326,7 @@ fc_ganxt_build(struct fchs_s *fchs, void *pyld, u32 s_id, u32 port_id) | |||
1326 | fc_gs_fchdr_build(fchs, d_id, s_id, 0); | 1326 | fc_gs_fchdr_build(fchs, d_id, s_id, 0); |
1327 | fc_gs_cthdr_build(cthdr, s_id, GS_GA_NXT); | 1327 | fc_gs_cthdr_build(cthdr, s_id, GS_GA_NXT); |
1328 | 1328 | ||
1329 | bfa_os_memset(ganxt, 0, sizeof(struct fcgs_ganxt_req_s)); | 1329 | memset(ganxt, 0, sizeof(struct fcgs_ganxt_req_s)); |
1330 | ganxt->port_id = port_id; | 1330 | ganxt->port_id = port_id; |
1331 | 1331 | ||
1332 | return sizeof(struct ct_hdr_s) + sizeof(struct fcgs_ganxt_req_s); | 1332 | return sizeof(struct ct_hdr_s) + sizeof(struct fcgs_ganxt_req_s); |
@@ -1383,7 +1383,7 @@ fc_gmal_req_build(struct fchs_s *fchs, void *pyld, u32 s_id, wwn_t wwn) | |||
1383 | fc_gs_ms_cthdr_build(cthdr, s_id, GS_FC_GMAL_CMD, | 1383 | fc_gs_ms_cthdr_build(cthdr, s_id, GS_FC_GMAL_CMD, |
1384 | CT_GSSUBTYPE_CFGSERVER); | 1384 | CT_GSSUBTYPE_CFGSERVER); |
1385 | 1385 | ||
1386 | bfa_os_memset(gmal, 0, sizeof(fcgs_gmal_req_t)); | 1386 | memset(gmal, 0, sizeof(fcgs_gmal_req_t)); |
1387 | gmal->wwn = wwn; | 1387 | gmal->wwn = wwn; |
1388 | 1388 | ||
1389 | return sizeof(struct ct_hdr_s) + sizeof(fcgs_gmal_req_t); | 1389 | return sizeof(struct ct_hdr_s) + sizeof(fcgs_gmal_req_t); |
@@ -1403,7 +1403,7 @@ fc_gfn_req_build(struct fchs_s *fchs, void *pyld, u32 s_id, wwn_t wwn) | |||
1403 | fc_gs_ms_cthdr_build(cthdr, s_id, GS_FC_GFN_CMD, | 1403 | fc_gs_ms_cthdr_build(cthdr, s_id, GS_FC_GFN_CMD, |
1404 | CT_GSSUBTYPE_CFGSERVER); | 1404 | CT_GSSUBTYPE_CFGSERVER); |
1405 | 1405 | ||
1406 | bfa_os_memset(gfn, 0, sizeof(fcgs_gfn_req_t)); | 1406 | memset(gfn, 0, sizeof(fcgs_gfn_req_t)); |
1407 | gfn->wwn = wwn; | 1407 | gfn->wwn = wwn; |
1408 | 1408 | ||
1409 | return sizeof(struct ct_hdr_s) + sizeof(fcgs_gfn_req_t); | 1409 | return sizeof(struct ct_hdr_s) + sizeof(fcgs_gfn_req_t); |