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 | |
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>
-rw-r--r-- | drivers/scsi/bfa/bfa_core.c | 8 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcbuild.c | 102 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcpim.c | 29 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcs.c | 199 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcs.h | 13 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcs_fcpim.c | 4 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcs_lport.c | 22 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcs_rport.c | 4 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc.c | 30 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc.h | 2 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc_cb.c | 4 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc_ct.c | 6 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_os_inc.h | 23 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_svc.c | 62 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfad.c | 24 |
15 files changed, 136 insertions, 396 deletions
diff --git a/drivers/scsi/bfa/bfa_core.c b/drivers/scsi/bfa/bfa_core.c index c2fa07f2485d..4d0530b9633c 100644 --- a/drivers/scsi/bfa/bfa_core.c +++ b/drivers/scsi/bfa/bfa_core.c | |||
@@ -440,7 +440,7 @@ bfa_iocfc_init_mem(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
440 | iocfc->bfa = bfa; | 440 | iocfc->bfa = bfa; |
441 | iocfc->action = BFA_IOCFC_ACT_NONE; | 441 | iocfc->action = BFA_IOCFC_ACT_NONE; |
442 | 442 | ||
443 | bfa_os_assign(iocfc->cfg, *cfg); | 443 | iocfc->cfg = *cfg; |
444 | 444 | ||
445 | /** | 445 | /** |
446 | * Initialize chip specific handlers. | 446 | * Initialize chip specific handlers. |
@@ -503,13 +503,13 @@ bfa_iocfc_mem_claim(struct bfa_s *bfa, struct bfa_iocfc_cfg_s *cfg, | |||
503 | for (i = 0; i < cfg->fwcfg.num_cqs; i++) { | 503 | for (i = 0; i < cfg->fwcfg.num_cqs; i++) { |
504 | iocfc->req_cq_ba[i].kva = dm_kva; | 504 | iocfc->req_cq_ba[i].kva = dm_kva; |
505 | iocfc->req_cq_ba[i].pa = dm_pa; | 505 | iocfc->req_cq_ba[i].pa = dm_pa; |
506 | bfa_os_memset(dm_kva, 0, per_reqq_sz); | 506 | memset(dm_kva, 0, per_reqq_sz); |
507 | dm_kva += per_reqq_sz; | 507 | dm_kva += per_reqq_sz; |
508 | dm_pa += per_reqq_sz; | 508 | dm_pa += per_reqq_sz; |
509 | 509 | ||
510 | iocfc->rsp_cq_ba[i].kva = dm_kva; | 510 | iocfc->rsp_cq_ba[i].kva = dm_kva; |
511 | iocfc->rsp_cq_ba[i].pa = dm_pa; | 511 | iocfc->rsp_cq_ba[i].pa = dm_pa; |
512 | bfa_os_memset(dm_kva, 0, per_rspq_sz); | 512 | memset(dm_kva, 0, per_rspq_sz); |
513 | dm_kva += per_rspq_sz; | 513 | dm_kva += per_rspq_sz; |
514 | dm_pa += per_rspq_sz; | 514 | dm_pa += per_rspq_sz; |
515 | } | 515 | } |
@@ -1038,7 +1038,7 @@ bfa_cfg_get_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *meminfo) | |||
1038 | 1038 | ||
1039 | bfa_assert((cfg != NULL) && (meminfo != NULL)); | 1039 | bfa_assert((cfg != NULL) && (meminfo != NULL)); |
1040 | 1040 | ||
1041 | bfa_os_memset((void *)meminfo, 0, sizeof(struct bfa_meminfo_s)); | 1041 | memset((void *)meminfo, 0, sizeof(struct bfa_meminfo_s)); |
1042 | meminfo->meminfo[BFA_MEM_TYPE_KVA - 1].mem_type = | 1042 | meminfo->meminfo[BFA_MEM_TYPE_KVA - 1].mem_type = |
1043 | BFA_MEM_TYPE_KVA; | 1043 | BFA_MEM_TYPE_KVA; |
1044 | meminfo->meminfo[BFA_MEM_TYPE_DMA - 1].mem_type = | 1044 | meminfo->meminfo[BFA_MEM_TYPE_DMA - 1].mem_type = |
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); |
diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c index 33c8dd51f474..e9075a68e703 100644 --- a/drivers/scsi/bfa/bfa_fcpim.c +++ b/drivers/scsi/bfa/bfa_fcpim.c | |||
@@ -463,7 +463,7 @@ bfa_fcpim_port_iostats(struct bfa_s *bfa, struct bfa_itnim_iostats_s *stats, | |||
463 | struct bfa_itnim_s *itnim; | 463 | struct bfa_itnim_s *itnim; |
464 | 464 | ||
465 | /* accumulate IO stats from itnim */ | 465 | /* accumulate IO stats from itnim */ |
466 | bfa_os_memset(stats, 0, sizeof(struct bfa_itnim_iostats_s)); | 466 | memset(stats, 0, sizeof(struct bfa_itnim_iostats_s)); |
467 | list_for_each_safe(qe, qen, &fcpim->itnim_q) { | 467 | list_for_each_safe(qe, qen, &fcpim->itnim_q) { |
468 | itnim = (struct bfa_itnim_s *) qe; | 468 | itnim = (struct bfa_itnim_s *) qe; |
469 | if (itnim->rport->rport_info.lp_tag != lp_tag) | 469 | if (itnim->rport->rport_info.lp_tag != lp_tag) |
@@ -480,7 +480,7 @@ bfa_fcpim_get_modstats(struct bfa_s *bfa, struct bfa_itnim_iostats_s *modstats) | |||
480 | struct bfa_itnim_s *itnim; | 480 | struct bfa_itnim_s *itnim; |
481 | 481 | ||
482 | /* accumulate IO stats from itnim */ | 482 | /* accumulate IO stats from itnim */ |
483 | bfa_os_memset(modstats, 0, sizeof(struct bfa_itnim_iostats_s)); | 483 | memset(modstats, 0, sizeof(struct bfa_itnim_iostats_s)); |
484 | list_for_each_safe(qe, qen, &fcpim->itnim_q) { | 484 | list_for_each_safe(qe, qen, &fcpim->itnim_q) { |
485 | itnim = (struct bfa_itnim_s *) qe; | 485 | itnim = (struct bfa_itnim_s *) qe; |
486 | bfa_fcpim_add_stats(modstats, &(itnim->stats)); | 486 | bfa_fcpim_add_stats(modstats, &(itnim->stats)); |
@@ -560,7 +560,7 @@ bfa_fcpim_clr_modstats(struct bfa_s *bfa) | |||
560 | itnim = (struct bfa_itnim_s *) qe; | 560 | itnim = (struct bfa_itnim_s *) qe; |
561 | bfa_itnim_clear_stats(itnim); | 561 | bfa_itnim_clear_stats(itnim); |
562 | } | 562 | } |
563 | bfa_os_memset(&fcpim->del_itn_stats, 0, | 563 | memset(&fcpim->del_itn_stats, 0, |
564 | sizeof(struct bfa_fcpim_del_itn_stats_s)); | 564 | sizeof(struct bfa_fcpim_del_itn_stats_s)); |
565 | 565 | ||
566 | return BFA_STATUS_OK; | 566 | return BFA_STATUS_OK; |
@@ -1229,7 +1229,7 @@ bfa_itnim_attach(struct bfa_fcpim_mod_s *fcpim, struct bfa_meminfo_s *minfo) | |||
1229 | fcpim->itnim_arr = itnim; | 1229 | fcpim->itnim_arr = itnim; |
1230 | 1230 | ||
1231 | for (i = 0; i < fcpim->num_itnims; i++, itnim++) { | 1231 | for (i = 0; i < fcpim->num_itnims; i++, itnim++) { |
1232 | bfa_os_memset(itnim, 0, sizeof(struct bfa_itnim_s)); | 1232 | memset(itnim, 0, sizeof(struct bfa_itnim_s)); |
1233 | itnim->bfa = bfa; | 1233 | itnim->bfa = bfa; |
1234 | itnim->fcpim = fcpim; | 1234 | itnim->fcpim = fcpim; |
1235 | itnim->reqq = BFA_REQQ_QOS_LO; | 1235 | itnim->reqq = BFA_REQQ_QOS_LO; |
@@ -1597,8 +1597,8 @@ void | |||
1597 | bfa_itnim_clear_stats(struct bfa_itnim_s *itnim) | 1597 | bfa_itnim_clear_stats(struct bfa_itnim_s *itnim) |
1598 | { | 1598 | { |
1599 | int j; | 1599 | int j; |
1600 | bfa_os_memset(&itnim->stats, 0, sizeof(itnim->stats)); | 1600 | memset(&itnim->stats, 0, sizeof(itnim->stats)); |
1601 | bfa_os_memset(&itnim->ioprofile, 0, sizeof(itnim->ioprofile)); | 1601 | memset(&itnim->ioprofile, 0, sizeof(itnim->ioprofile)); |
1602 | for (j = 0; j < BFA_IOBUCKET_MAX; j++) | 1602 | for (j = 0; j < BFA_IOBUCKET_MAX; j++) |
1603 | itnim->ioprofile.io_latency.min[j] = ~0; | 1603 | itnim->ioprofile.io_latency.min[j] = ~0; |
1604 | } | 1604 | } |
@@ -2390,11 +2390,10 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim) | |||
2390 | /** | 2390 | /** |
2391 | * set up I/O command parameters | 2391 | * set up I/O command parameters |
2392 | */ | 2392 | */ |
2393 | bfa_os_assign(m->cmnd, cmnd_z0); | 2393 | m->cmnd = cmnd_z0; |
2394 | m->cmnd.lun = bfa_cb_ioim_get_lun(ioim->dio); | 2394 | m->cmnd.lun = bfa_cb_ioim_get_lun(ioim->dio); |
2395 | m->cmnd.iodir = bfa_cb_ioim_get_iodir(ioim->dio); | 2395 | m->cmnd.iodir = bfa_cb_ioim_get_iodir(ioim->dio); |
2396 | bfa_os_assign(m->cmnd.cdb, | 2396 | m->cmnd.cdb = *(scsi_cdb_t *)bfa_cb_ioim_get_cdb(ioim->dio); |
2397 | *(scsi_cdb_t *)bfa_cb_ioim_get_cdb(ioim->dio)); | ||
2398 | fcp_dl = bfa_cb_ioim_get_size(ioim->dio); | 2397 | fcp_dl = bfa_cb_ioim_get_size(ioim->dio); |
2399 | m->cmnd.fcp_dl = bfa_os_htonl(fcp_dl); | 2398 | m->cmnd.fcp_dl = bfa_os_htonl(fcp_dl); |
2400 | 2399 | ||
@@ -2433,7 +2432,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim) | |||
2433 | m->cmnd.addl_cdb_len = (bfa_cb_ioim_get_cdblen(ioim->dio) - | 2432 | m->cmnd.addl_cdb_len = (bfa_cb_ioim_get_cdblen(ioim->dio) - |
2434 | FCP_CMND_CDB_LEN) / sizeof(u32); | 2433 | FCP_CMND_CDB_LEN) / sizeof(u32); |
2435 | if (m->cmnd.addl_cdb_len) { | 2434 | if (m->cmnd.addl_cdb_len) { |
2436 | bfa_os_memcpy(&m->cmnd.cdb + 1, (scsi_cdb_t *) | 2435 | memcpy(&m->cmnd.cdb + 1, (scsi_cdb_t *) |
2437 | bfa_cb_ioim_get_cdb(ioim->dio) + 1, | 2436 | bfa_cb_ioim_get_cdb(ioim->dio) + 1, |
2438 | m->cmnd.addl_cdb_len * sizeof(u32)); | 2437 | m->cmnd.addl_cdb_len * sizeof(u32)); |
2439 | fcp_cmnd_fcpdl(&m->cmnd) = | 2438 | fcp_cmnd_fcpdl(&m->cmnd) = |
@@ -2706,7 +2705,7 @@ bfa_ioim_attach(struct bfa_fcpim_mod_s *fcpim, struct bfa_meminfo_s *minfo) | |||
2706 | /* | 2705 | /* |
2707 | * initialize IOIM | 2706 | * initialize IOIM |
2708 | */ | 2707 | */ |
2709 | bfa_os_memset(ioim, 0, sizeof(struct bfa_ioim_s)); | 2708 | memset(ioim, 0, sizeof(struct bfa_ioim_s)); |
2710 | ioim->iotag = i; | 2709 | ioim->iotag = i; |
2711 | ioim->bfa = fcpim->bfa; | 2710 | ioim->bfa = fcpim->bfa; |
2712 | ioim->fcpim = fcpim; | 2711 | ioim->fcpim = fcpim; |
@@ -2750,7 +2749,7 @@ bfa_ioim_isr(struct bfa_s *bfa, struct bfi_msg_s *m) | |||
2750 | bfa_trc(ioim->bfa, rsp->reuse_io_tag); | 2749 | bfa_trc(ioim->bfa, rsp->reuse_io_tag); |
2751 | 2750 | ||
2752 | if (bfa_sm_cmp_state(ioim, bfa_ioim_sm_active)) | 2751 | if (bfa_sm_cmp_state(ioim, bfa_ioim_sm_active)) |
2753 | bfa_os_assign(ioim->iosp->comp_rspmsg, *m); | 2752 | ioim->iosp->comp_rspmsg = *m; |
2754 | 2753 | ||
2755 | switch (rsp->io_status) { | 2754 | switch (rsp->io_status) { |
2756 | case BFI_IOIM_STS_OK: | 2755 | case BFI_IOIM_STS_OK: |
@@ -2837,7 +2836,7 @@ bfa_ioim_good_comp_isr(struct bfa_s *bfa, struct bfi_msg_s *m) | |||
2837 | void | 2836 | void |
2838 | bfa_ioim_profile_start(struct bfa_ioim_s *ioim) | 2837 | bfa_ioim_profile_start(struct bfa_ioim_s *ioim) |
2839 | { | 2838 | { |
2840 | ioim->start_time = bfa_os_get_clock(); | 2839 | ioim->start_time = jiffies; |
2841 | } | 2840 | } |
2842 | 2841 | ||
2843 | void | 2842 | void |
@@ -2845,7 +2844,7 @@ bfa_ioim_profile_comp(struct bfa_ioim_s *ioim) | |||
2845 | { | 2844 | { |
2846 | u32 fcp_dl = bfa_cb_ioim_get_size(ioim->dio); | 2845 | u32 fcp_dl = bfa_cb_ioim_get_size(ioim->dio); |
2847 | u32 index = bfa_ioim_get_index(fcp_dl); | 2846 | u32 index = bfa_ioim_get_index(fcp_dl); |
2848 | u64 end_time = bfa_os_get_clock(); | 2847 | u64 end_time = jiffies; |
2849 | struct bfa_itnim_latency_s *io_lat = | 2848 | struct bfa_itnim_latency_s *io_lat = |
2850 | &(ioim->itnim->ioprofile.io_latency); | 2849 | &(ioim->itnim->ioprofile.io_latency); |
2851 | u32 val = (u32)(end_time - ioim->start_time); | 2850 | u32 val = (u32)(end_time - ioim->start_time); |
@@ -3507,7 +3506,7 @@ bfa_tskim_attach(struct bfa_fcpim_mod_s *fcpim, struct bfa_meminfo_s *minfo) | |||
3507 | /* | 3506 | /* |
3508 | * initialize TSKIM | 3507 | * initialize TSKIM |
3509 | */ | 3508 | */ |
3510 | bfa_os_memset(tskim, 0, sizeof(struct bfa_tskim_s)); | 3509 | memset(tskim, 0, sizeof(struct bfa_tskim_s)); |
3511 | tskim->tsk_tag = i; | 3510 | tskim->tsk_tag = i; |
3512 | tskim->bfa = fcpim->bfa; | 3511 | tskim->bfa = fcpim->bfa; |
3513 | tskim->fcpim = fcpim; | 3512 | tskim->fcpim = fcpim; |
diff --git a/drivers/scsi/bfa/bfa_fcs.c b/drivers/scsi/bfa/bfa_fcs.c index 9cebbe30a678..2bb3a7a61924 100644 --- a/drivers/scsi/bfa/bfa_fcs.c +++ b/drivers/scsi/bfa/bfa_fcs.c | |||
@@ -978,7 +978,7 @@ bfa_fcs_fabric_attach(struct bfa_fcs_s *fcs) | |||
978 | struct bfa_fcs_fabric_s *fabric; | 978 | struct bfa_fcs_fabric_s *fabric; |
979 | 979 | ||
980 | fabric = &fcs->fabric; | 980 | fabric = &fcs->fabric; |
981 | bfa_os_memset(fabric, 0, sizeof(struct bfa_fcs_fabric_s)); | 981 | memset(fabric, 0, sizeof(struct bfa_fcs_fabric_s)); |
982 | 982 | ||
983 | /** | 983 | /** |
984 | * Initialize base fabric. | 984 | * Initialize base fabric. |
@@ -1418,129 +1418,6 @@ bfa_fcs_fabric_set_fabric_name(struct bfa_fcs_fabric_s *fabric, | |||
1418 | } | 1418 | } |
1419 | 1419 | ||
1420 | /** | 1420 | /** |
1421 | * fcs_vf_api virtual fabrics API | ||
1422 | */ | ||
1423 | |||
1424 | /** | ||
1425 | * Enable VF mode. | ||
1426 | * | ||
1427 | * @param[in] fcs fcs module instance | ||
1428 | * @param[in] vf_id default vf_id of port, FC_VF_ID_NULL | ||
1429 | * to use standard default vf_id of 1. | ||
1430 | * | ||
1431 | * @retval BFA_STATUS_OK vf mode is enabled | ||
1432 | * @retval BFA_STATUS_BUSY Port is active. Port must be disabled | ||
1433 | * before VF mode can be enabled. | ||
1434 | */ | ||
1435 | bfa_status_t | ||
1436 | bfa_fcs_vf_mode_enable(struct bfa_fcs_s *fcs, u16 vf_id) | ||
1437 | { | ||
1438 | return BFA_STATUS_OK; | ||
1439 | } | ||
1440 | |||
1441 | /** | ||
1442 | * Disable VF mode. | ||
1443 | * | ||
1444 | * @param[in] fcs fcs module instance | ||
1445 | * | ||
1446 | * @retval BFA_STATUS_OK vf mode is disabled | ||
1447 | * @retval BFA_STATUS_BUSY VFs are present and being used. All | ||
1448 | * VFs must be deleted before disabling | ||
1449 | * VF mode. | ||
1450 | */ | ||
1451 | bfa_status_t | ||
1452 | bfa_fcs_vf_mode_disable(struct bfa_fcs_s *fcs) | ||
1453 | { | ||
1454 | return BFA_STATUS_OK; | ||
1455 | } | ||
1456 | |||
1457 | /** | ||
1458 | * Create a new VF instance. | ||
1459 | * | ||
1460 | * A new VF is created using the given VF configuration. A VF is identified | ||
1461 | * by VF id. No duplicate VF creation is allowed with the same VF id. Once | ||
1462 | * a VF is created, VF is automatically started after link initialization | ||
1463 | * and EVFP exchange is completed. | ||
1464 | * | ||
1465 | * param[in] vf - FCS vf data structure. Memory is | ||
1466 | * allocated by caller (driver) | ||
1467 | * param[in] fcs - FCS module | ||
1468 | * param[in] vf_cfg - VF configuration | ||
1469 | * param[in] vf_drv - Opaque handle back to the driver's | ||
1470 | * virtual vf structure | ||
1471 | * | ||
1472 | * retval BFA_STATUS_OK VF creation is successful | ||
1473 | * retval BFA_STATUS_FAILED VF creation failed | ||
1474 | * retval BFA_STATUS_EEXIST A VF exists with the given vf_id | ||
1475 | */ | ||
1476 | bfa_status_t | ||
1477 | bfa_fcs_vf_create(bfa_fcs_vf_t *vf, struct bfa_fcs_s *fcs, u16 vf_id, | ||
1478 | struct bfa_lport_cfg_s *port_cfg, struct bfad_vf_s *vf_drv) | ||
1479 | { | ||
1480 | bfa_trc(fcs, vf_id); | ||
1481 | return BFA_STATUS_OK; | ||
1482 | } | ||
1483 | |||
1484 | /** | ||
1485 | * Use this function to delete a BFA VF object. VF object should | ||
1486 | * be stopped before this function call. | ||
1487 | * | ||
1488 | * param[in] vf - pointer to bfa_vf_t. | ||
1489 | * | ||
1490 | * retval BFA_STATUS_OK On vf deletion success | ||
1491 | * retval BFA_STATUS_BUSY VF is not in a stopped state | ||
1492 | * retval BFA_STATUS_INPROGRESS VF deletion in in progress | ||
1493 | */ | ||
1494 | bfa_status_t | ||
1495 | bfa_fcs_vf_delete(bfa_fcs_vf_t *vf) | ||
1496 | { | ||
1497 | bfa_trc(vf->fcs, vf->vf_id); | ||
1498 | return BFA_STATUS_OK; | ||
1499 | } | ||
1500 | |||
1501 | |||
1502 | /** | ||
1503 | * Returns attributes of the given VF. | ||
1504 | * | ||
1505 | * param[in] vf pointer to bfa_vf_t. | ||
1506 | * param[out] vf_attr vf attributes returned | ||
1507 | * | ||
1508 | * return None | ||
1509 | */ | ||
1510 | void | ||
1511 | bfa_fcs_vf_get_attr(bfa_fcs_vf_t *vf, struct bfa_vf_attr_s *vf_attr) | ||
1512 | { | ||
1513 | bfa_trc(vf->fcs, vf->vf_id); | ||
1514 | } | ||
1515 | |||
1516 | /** | ||
1517 | * Return statistics associated with the given vf. | ||
1518 | * | ||
1519 | * param[in] vf pointer to bfa_vf_t. | ||
1520 | * param[out] vf_stats vf statistics returned | ||
1521 | * | ||
1522 | * @return None | ||
1523 | */ | ||
1524 | void | ||
1525 | bfa_fcs_vf_get_stats(bfa_fcs_vf_t *vf, struct bfa_vf_stats_s *vf_stats) | ||
1526 | { | ||
1527 | bfa_os_memcpy(vf_stats, &vf->stats, sizeof(struct bfa_vf_stats_s)); | ||
1528 | } | ||
1529 | |||
1530 | /** | ||
1531 | * clear statistics associated with the given vf. | ||
1532 | * | ||
1533 | * param[in] vf pointer to bfa_vf_t. | ||
1534 | * | ||
1535 | * @return None | ||
1536 | */ | ||
1537 | void | ||
1538 | bfa_fcs_vf_clear_stats(bfa_fcs_vf_t *vf) | ||
1539 | { | ||
1540 | bfa_os_memset(&vf->stats, 0, sizeof(struct bfa_vf_stats_s)); | ||
1541 | } | ||
1542 | |||
1543 | /** | ||
1544 | * Returns FCS vf structure for a given vf_id. | 1421 | * Returns FCS vf structure for a given vf_id. |
1545 | * | 1422 | * |
1546 | * param[in] vf_id - VF_ID | 1423 | * param[in] vf_id - VF_ID |
@@ -1559,80 +1436,6 @@ bfa_fcs_vf_lookup(struct bfa_fcs_s *fcs, u16 vf_id) | |||
1559 | } | 1436 | } |
1560 | 1437 | ||
1561 | /** | 1438 | /** |
1562 | * Return the list of VFs configured. | ||
1563 | * | ||
1564 | * param[in] fcs fcs module instance | ||
1565 | * param[out] vf_ids returned list of vf_ids | ||
1566 | * param[in,out] nvfs in:size of vf_ids array, | ||
1567 | * out:total elements present, | ||
1568 | * actual elements returned is limited by the size | ||
1569 | * | ||
1570 | * return Driver VF structure | ||
1571 | */ | ||
1572 | void | ||
1573 | bfa_fcs_vf_list(struct bfa_fcs_s *fcs, u16 *vf_ids, int *nvfs) | ||
1574 | { | ||
1575 | bfa_trc(fcs, *nvfs); | ||
1576 | } | ||
1577 | |||
1578 | /** | ||
1579 | * Return the list of all VFs visible from fabric. | ||
1580 | * | ||
1581 | * param[in] fcs fcs module instance | ||
1582 | * param[out] vf_ids returned list of vf_ids | ||
1583 | * param[in,out] nvfs in:size of vf_ids array, | ||
1584 | * out:total elements present, | ||
1585 | * actual elements returned is limited by the size | ||
1586 | * | ||
1587 | * return Driver VF structure | ||
1588 | */ | ||
1589 | void | ||
1590 | bfa_fcs_vf_list_all(struct bfa_fcs_s *fcs, u16 *vf_ids, int *nvfs) | ||
1591 | { | ||
1592 | bfa_trc(fcs, *nvfs); | ||
1593 | } | ||
1594 | |||
1595 | /** | ||
1596 | * Return the list of local logical ports present in the given VF. | ||
1597 | * | ||
1598 | * param[in] vf vf for which logical ports are returned | ||
1599 | * param[out] lpwwn returned logical port wwn list | ||
1600 | * param[in,out] nlports in:size of lpwwn list; | ||
1601 | * out:total elements present, | ||
1602 | * actual elements returned is limited by the size | ||
1603 | */ | ||
1604 | void | ||
1605 | bfa_fcs_vf_get_ports(bfa_fcs_vf_t *vf, wwn_t lpwwn[], int *nlports) | ||
1606 | { | ||
1607 | struct list_head *qe; | ||
1608 | struct bfa_fcs_vport_s *vport; | ||
1609 | int i; | ||
1610 | struct bfa_fcs_s *fcs; | ||
1611 | |||
1612 | if (vf == NULL || lpwwn == NULL || *nlports == 0) | ||
1613 | return; | ||
1614 | |||
1615 | fcs = vf->fcs; | ||
1616 | |||
1617 | bfa_trc(fcs, vf->vf_id); | ||
1618 | bfa_trc(fcs, (u32) *nlports); | ||
1619 | |||
1620 | i = 0; | ||
1621 | lpwwn[i++] = vf->bport.port_cfg.pwwn; | ||
1622 | |||
1623 | list_for_each(qe, &vf->vport_q) { | ||
1624 | if (i >= *nlports) | ||
1625 | break; | ||
1626 | |||
1627 | vport = (struct bfa_fcs_vport_s *) qe; | ||
1628 | lpwwn[i++] = vport->lport.port_cfg.pwwn; | ||
1629 | } | ||
1630 | |||
1631 | bfa_trc(fcs, i); | ||
1632 | *nlports = i; | ||
1633 | } | ||
1634 | |||
1635 | /** | ||
1636 | * BFA FCS PPORT ( physical port) | 1439 | * BFA FCS PPORT ( physical port) |
1637 | */ | 1440 | */ |
1638 | static void | 1441 | static void |
diff --git a/drivers/scsi/bfa/bfa_fcs.h b/drivers/scsi/bfa/bfa_fcs.h index d75045df1e7e..e5ff91901be8 100644 --- a/drivers/scsi/bfa/bfa_fcs.h +++ b/drivers/scsi/bfa/bfa_fcs.h | |||
@@ -680,19 +680,6 @@ void bfa_fcs_start(struct bfa_fcs_s *fcs); | |||
680 | /** | 680 | /** |
681 | * bfa fcs vf public functions | 681 | * bfa fcs vf public functions |
682 | */ | 682 | */ |
683 | bfa_status_t bfa_fcs_vf_mode_enable(struct bfa_fcs_s *fcs, u16 vf_id); | ||
684 | bfa_status_t bfa_fcs_vf_mode_disable(struct bfa_fcs_s *fcs); | ||
685 | bfa_status_t bfa_fcs_vf_create(bfa_fcs_vf_t *vf, struct bfa_fcs_s *fcs, | ||
686 | u16 vf_id, struct bfa_lport_cfg_s *port_cfg, | ||
687 | struct bfad_vf_s *vf_drv); | ||
688 | bfa_status_t bfa_fcs_vf_delete(bfa_fcs_vf_t *vf); | ||
689 | void bfa_fcs_vf_list(struct bfa_fcs_s *fcs, u16 *vf_ids, int *nvfs); | ||
690 | void bfa_fcs_vf_list_all(struct bfa_fcs_s *fcs, u16 *vf_ids, int *nvfs); | ||
691 | void bfa_fcs_vf_get_attr(bfa_fcs_vf_t *vf, struct bfa_vf_attr_s *vf_attr); | ||
692 | void bfa_fcs_vf_get_stats(bfa_fcs_vf_t *vf, | ||
693 | struct bfa_vf_stats_s *vf_stats); | ||
694 | void bfa_fcs_vf_clear_stats(bfa_fcs_vf_t *vf); | ||
695 | void bfa_fcs_vf_get_ports(bfa_fcs_vf_t *vf, wwn_t vpwwn[], int *nports); | ||
696 | bfa_fcs_vf_t *bfa_fcs_vf_lookup(struct bfa_fcs_s *fcs, u16 vf_id); | 683 | bfa_fcs_vf_t *bfa_fcs_vf_lookup(struct bfa_fcs_s *fcs, u16 vf_id); |
697 | u16 bfa_fcs_fabric_vport_count(struct bfa_fcs_fabric_s *fabric); | 684 | u16 bfa_fcs_fabric_vport_count(struct bfa_fcs_fabric_s *fabric); |
698 | 685 | ||
diff --git a/drivers/scsi/bfa/bfa_fcs_fcpim.c b/drivers/scsi/bfa/bfa_fcs_fcpim.c index 569dfefab70d..faca5f3b0b1f 100644 --- a/drivers/scsi/bfa/bfa_fcs_fcpim.c +++ b/drivers/scsi/bfa/bfa_fcs_fcpim.c | |||
@@ -736,7 +736,7 @@ bfa_fcs_itnim_stats_get(struct bfa_fcs_lport_s *port, wwn_t rpwwn, | |||
736 | if (itnim == NULL) | 736 | if (itnim == NULL) |
737 | return BFA_STATUS_NO_FCPIM_NEXUS; | 737 | return BFA_STATUS_NO_FCPIM_NEXUS; |
738 | 738 | ||
739 | bfa_os_memcpy(stats, &itnim->stats, sizeof(struct bfa_itnim_stats_s)); | 739 | memcpy(stats, &itnim->stats, sizeof(struct bfa_itnim_stats_s)); |
740 | 740 | ||
741 | return BFA_STATUS_OK; | 741 | return BFA_STATUS_OK; |
742 | } | 742 | } |
@@ -753,7 +753,7 @@ bfa_fcs_itnim_stats_clear(struct bfa_fcs_lport_s *port, wwn_t rpwwn) | |||
753 | if (itnim == NULL) | 753 | if (itnim == NULL) |
754 | return BFA_STATUS_NO_FCPIM_NEXUS; | 754 | return BFA_STATUS_NO_FCPIM_NEXUS; |
755 | 755 | ||
756 | bfa_os_memset(&itnim->stats, 0, sizeof(struct bfa_itnim_stats_s)); | 756 | memset(&itnim->stats, 0, sizeof(struct bfa_itnim_stats_s)); |
757 | return BFA_STATUS_OK; | 757 | return BFA_STATUS_OK; |
758 | } | 758 | } |
759 | 759 | ||
diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c index b522bf30247a..6cee56fafa1d 100644 --- a/drivers/scsi/bfa/bfa_fcs_lport.c +++ b/drivers/scsi/bfa/bfa_fcs_lport.c | |||
@@ -479,7 +479,7 @@ static void | |||
479 | bfa_fs_port_get_gen_topo_data(struct bfa_fcs_lport_s *port, | 479 | bfa_fs_port_get_gen_topo_data(struct bfa_fcs_lport_s *port, |
480 | struct fc_rnid_general_topology_data_s *gen_topo_data) | 480 | struct fc_rnid_general_topology_data_s *gen_topo_data) |
481 | { | 481 | { |
482 | bfa_os_memset(gen_topo_data, 0, | 482 | memset(gen_topo_data, 0, |
483 | sizeof(struct fc_rnid_general_topology_data_s)); | 483 | sizeof(struct fc_rnid_general_topology_data_s)); |
484 | 484 | ||
485 | gen_topo_data->asso_type = bfa_os_htonl(RNID_ASSOCIATED_TYPE_HOST); | 485 | gen_topo_data->asso_type = bfa_os_htonl(RNID_ASSOCIATED_TYPE_HOST); |
@@ -878,7 +878,7 @@ bfa_fcs_lport_init(struct bfa_fcs_lport_s *lport, | |||
878 | struct bfad_s *bfad = (struct bfad_s *)lport->fcs->bfad; | 878 | struct bfad_s *bfad = (struct bfad_s *)lport->fcs->bfad; |
879 | char lpwwn_buf[BFA_STRING_32]; | 879 | char lpwwn_buf[BFA_STRING_32]; |
880 | 880 | ||
881 | bfa_os_assign(lport->port_cfg, *port_cfg); | 881 | lport->port_cfg = *port_cfg; |
882 | 882 | ||
883 | lport->bfad_port = bfa_fcb_lport_new(lport->fcs->bfad, lport, | 883 | lport->bfad_port = bfa_fcb_lport_new(lport->fcs->bfad, lport, |
884 | lport->port_cfg.roles, | 884 | lport->port_cfg.roles, |
@@ -1549,7 +1549,7 @@ bfa_fcs_lport_fdmi_send_rhba(void *fdmi_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
1549 | fdmi->fcxp = fcxp; | 1549 | fdmi->fcxp = fcxp; |
1550 | 1550 | ||
1551 | pyld = bfa_fcxp_get_reqbuf(fcxp); | 1551 | pyld = bfa_fcxp_get_reqbuf(fcxp); |
1552 | bfa_os_memset(pyld, 0, FC_MAX_PDUSZ); | 1552 | memset(pyld, 0, FC_MAX_PDUSZ); |
1553 | 1553 | ||
1554 | len = fc_fdmi_reqhdr_build(&fchs, pyld, bfa_fcs_lport_get_fcid(port), | 1554 | len = fc_fdmi_reqhdr_build(&fchs, pyld, bfa_fcs_lport_get_fcid(port), |
1555 | FDMI_RHBA); | 1555 | FDMI_RHBA); |
@@ -1861,7 +1861,7 @@ bfa_fcs_lport_fdmi_send_rprt(void *fdmi_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
1861 | fdmi->fcxp = fcxp; | 1861 | fdmi->fcxp = fcxp; |
1862 | 1862 | ||
1863 | pyld = bfa_fcxp_get_reqbuf(fcxp); | 1863 | pyld = bfa_fcxp_get_reqbuf(fcxp); |
1864 | bfa_os_memset(pyld, 0, FC_MAX_PDUSZ); | 1864 | memset(pyld, 0, FC_MAX_PDUSZ); |
1865 | 1865 | ||
1866 | len = fc_fdmi_reqhdr_build(&fchs, pyld, bfa_fcs_lport_get_fcid(port), | 1866 | len = fc_fdmi_reqhdr_build(&fchs, pyld, bfa_fcs_lport_get_fcid(port), |
1867 | FDMI_RPRT); | 1867 | FDMI_RPRT); |
@@ -2086,7 +2086,7 @@ bfa_fcs_lport_fdmi_send_rpa(void *fdmi_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
2086 | fdmi->fcxp = fcxp; | 2086 | fdmi->fcxp = fcxp; |
2087 | 2087 | ||
2088 | pyld = bfa_fcxp_get_reqbuf(fcxp); | 2088 | pyld = bfa_fcxp_get_reqbuf(fcxp); |
2089 | bfa_os_memset(pyld, 0, FC_MAX_PDUSZ); | 2089 | memset(pyld, 0, FC_MAX_PDUSZ); |
2090 | 2090 | ||
2091 | len = fc_fdmi_reqhdr_build(&fchs, pyld, bfa_fcs_lport_get_fcid(port), | 2091 | len = fc_fdmi_reqhdr_build(&fchs, pyld, bfa_fcs_lport_get_fcid(port), |
2092 | FDMI_RPA); | 2092 | FDMI_RPA); |
@@ -2170,7 +2170,7 @@ bfa_fcs_fdmi_get_hbaattr(struct bfa_fcs_lport_fdmi_s *fdmi, | |||
2170 | struct bfa_fcs_lport_s *port = fdmi->ms->port; | 2170 | struct bfa_fcs_lport_s *port = fdmi->ms->port; |
2171 | struct bfa_fcs_driver_info_s *driver_info = &port->fcs->driver_info; | 2171 | struct bfa_fcs_driver_info_s *driver_info = &port->fcs->driver_info; |
2172 | 2172 | ||
2173 | bfa_os_memset(hba_attr, 0, sizeof(struct bfa_fcs_fdmi_hba_attr_s)); | 2173 | memset(hba_attr, 0, sizeof(struct bfa_fcs_fdmi_hba_attr_s)); |
2174 | 2174 | ||
2175 | bfa_ioc_get_adapter_manufacturer(&port->fcs->bfa->ioc, | 2175 | bfa_ioc_get_adapter_manufacturer(&port->fcs->bfa->ioc, |
2176 | hba_attr->manufacturer); | 2176 | hba_attr->manufacturer); |
@@ -2215,7 +2215,7 @@ bfa_fcs_fdmi_get_portattr(struct bfa_fcs_lport_fdmi_s *fdmi, | |||
2215 | struct bfa_fcs_driver_info_s *driver_info = &port->fcs->driver_info; | 2215 | struct bfa_fcs_driver_info_s *driver_info = &port->fcs->driver_info; |
2216 | struct bfa_port_attr_s pport_attr; | 2216 | struct bfa_port_attr_s pport_attr; |
2217 | 2217 | ||
2218 | bfa_os_memset(port_attr, 0, sizeof(struct bfa_fcs_fdmi_port_attr_s)); | 2218 | memset(port_attr, 0, sizeof(struct bfa_fcs_fdmi_port_attr_s)); |
2219 | 2219 | ||
2220 | /* | 2220 | /* |
2221 | * get pport attributes from hal | 2221 | * get pport attributes from hal |
@@ -3738,7 +3738,7 @@ bfa_fcs_lport_ns_send_rspn_id(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
3738 | u8 symbl[256]; | 3738 | u8 symbl[256]; |
3739 | u8 *psymbl = &symbl[0]; | 3739 | u8 *psymbl = &symbl[0]; |
3740 | 3740 | ||
3741 | bfa_os_memset(symbl, 0, sizeof(symbl)); | 3741 | memset(symbl, 0, sizeof(symbl)); |
3742 | 3742 | ||
3743 | bfa_trc(port->fcs, port->port_cfg.pwwn); | 3743 | bfa_trc(port->fcs, port->port_cfg.pwwn); |
3744 | 3744 | ||
@@ -4943,7 +4943,7 @@ bfa_fcs_lport_get_stats(struct bfa_fcs_lport_s *fcs_port, | |||
4943 | void | 4943 | void |
4944 | bfa_fcs_lport_clear_stats(struct bfa_fcs_lport_s *fcs_port) | 4944 | bfa_fcs_lport_clear_stats(struct bfa_fcs_lport_s *fcs_port) |
4945 | { | 4945 | { |
4946 | bfa_os_memset(&fcs_port->stats, 0, sizeof(struct bfa_lport_stats_s)); | 4946 | memset(&fcs_port->stats, 0, sizeof(struct bfa_lport_stats_s)); |
4947 | } | 4947 | } |
4948 | 4948 | ||
4949 | /** | 4949 | /** |
@@ -5672,7 +5672,7 @@ bfa_fcs_vport_get_attr(struct bfa_fcs_vport_s *vport, | |||
5672 | if (vport == NULL || attr == NULL) | 5672 | if (vport == NULL || attr == NULL) |
5673 | return; | 5673 | return; |
5674 | 5674 | ||
5675 | bfa_os_memset(attr, 0, sizeof(struct bfa_vport_attr_s)); | 5675 | memset(attr, 0, sizeof(struct bfa_vport_attr_s)); |
5676 | 5676 | ||
5677 | bfa_fcs_lport_get_attr(&vport->lport, &attr->port_attr); | 5677 | bfa_fcs_lport_get_attr(&vport->lport, &attr->port_attr); |
5678 | attr->vport_state = bfa_sm_to_state(vport_sm_table, vport->sm); | 5678 | attr->vport_state = bfa_sm_to_state(vport_sm_table, vport->sm); |
@@ -5703,7 +5703,7 @@ bfa_fcs_vport_get_stats(struct bfa_fcs_vport_s *vport, | |||
5703 | void | 5703 | void |
5704 | bfa_fcs_vport_clr_stats(struct bfa_fcs_vport_s *vport) | 5704 | bfa_fcs_vport_clr_stats(struct bfa_fcs_vport_s *vport) |
5705 | { | 5705 | { |
5706 | bfa_os_memset(&vport->vport_stats, 0, sizeof(struct bfa_vport_stats_s)); | 5706 | memset(&vport->vport_stats, 0, sizeof(struct bfa_vport_stats_s)); |
5707 | } | 5707 | } |
5708 | 5708 | ||
5709 | /** | 5709 | /** |
diff --git a/drivers/scsi/bfa/bfa_fcs_rport.c b/drivers/scsi/bfa/bfa_fcs_rport.c index 635f0cd88714..a6872d328975 100644 --- a/drivers/scsi/bfa/bfa_fcs_rport.c +++ b/drivers/scsi/bfa/bfa_fcs_rport.c | |||
@@ -2674,7 +2674,7 @@ bfa_fcs_rport_get_attr(struct bfa_fcs_rport_s *rport, | |||
2674 | bfa_fcs_lport_t *port = rport->port; | 2674 | bfa_fcs_lport_t *port = rport->port; |
2675 | bfa_port_speed_t rport_speed = rport->rpf.rpsc_speed; | 2675 | bfa_port_speed_t rport_speed = rport->rpf.rpsc_speed; |
2676 | 2676 | ||
2677 | bfa_os_memset(rport_attr, 0, sizeof(struct bfa_rport_attr_s)); | 2677 | memset(rport_attr, 0, sizeof(struct bfa_rport_attr_s)); |
2678 | 2678 | ||
2679 | rport_attr->pid = rport->pid; | 2679 | rport_attr->pid = rport->pid; |
2680 | rport_attr->pwwn = rport->pwwn; | 2680 | rport_attr->pwwn = rport->pwwn; |
@@ -2717,7 +2717,7 @@ bfa_fcs_rport_get_stats(struct bfa_fcs_rport_s *rport, | |||
2717 | void | 2717 | void |
2718 | bfa_fcs_rport_clear_stats(struct bfa_fcs_rport_s *rport) | 2718 | bfa_fcs_rport_clear_stats(struct bfa_fcs_rport_s *rport) |
2719 | { | 2719 | { |
2720 | bfa_os_memset((char *)&rport->stats, 0, | 2720 | memset((char *)&rport->stats, 0, |
2721 | sizeof(struct bfa_rport_stats_s)); | 2721 | sizeof(struct bfa_rport_stats_s)); |
2722 | } | 2722 | } |
2723 | 2723 | ||
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c index 6795b247791a..bd25fc2c874b 100644 --- a/drivers/scsi/bfa/bfa_ioc.c +++ b/drivers/scsi/bfa/bfa_ioc.c | |||
@@ -1133,7 +1133,7 @@ bfa_ioc_sem_get(bfa_os_addr_t sem_reg) | |||
1133 | 1133 | ||
1134 | while (r32 && (cnt < BFA_SEM_SPINCNT)) { | 1134 | while (r32 && (cnt < BFA_SEM_SPINCNT)) { |
1135 | cnt++; | 1135 | cnt++; |
1136 | bfa_os_udelay(2); | 1136 | udelay(2); |
1137 | r32 = bfa_reg_read(sem_reg); | 1137 | r32 = bfa_reg_read(sem_reg); |
1138 | } | 1138 | } |
1139 | 1139 | ||
@@ -2293,7 +2293,7 @@ bfa_ioc_get_adapter_attr(struct bfa_ioc_s *ioc, | |||
2293 | bfa_ioc_get_adapter_fw_ver(ioc, ad_attr->fw_ver); | 2293 | bfa_ioc_get_adapter_fw_ver(ioc, ad_attr->fw_ver); |
2294 | bfa_ioc_get_adapter_optrom_ver(ioc, ad_attr->optrom_ver); | 2294 | bfa_ioc_get_adapter_optrom_ver(ioc, ad_attr->optrom_ver); |
2295 | bfa_ioc_get_adapter_manufacturer(ioc, ad_attr->manufacturer); | 2295 | bfa_ioc_get_adapter_manufacturer(ioc, ad_attr->manufacturer); |
2296 | bfa_os_memcpy(&ad_attr->vpd, &ioc_attr->vpd, | 2296 | memcpy(&ad_attr->vpd, &ioc_attr->vpd, |
2297 | sizeof(struct bfa_mfg_vpd_s)); | 2297 | sizeof(struct bfa_mfg_vpd_s)); |
2298 | 2298 | ||
2299 | ad_attr->nports = bfa_ioc_get_nports(ioc); | 2299 | ad_attr->nports = bfa_ioc_get_nports(ioc); |
@@ -2343,8 +2343,8 @@ bfa_ioc_get_type(struct bfa_ioc_s *ioc) | |||
2343 | void | 2343 | void |
2344 | bfa_ioc_get_adapter_serial_num(struct bfa_ioc_s *ioc, char *serial_num) | 2344 | bfa_ioc_get_adapter_serial_num(struct bfa_ioc_s *ioc, char *serial_num) |
2345 | { | 2345 | { |
2346 | bfa_os_memset((void *)serial_num, 0, BFA_ADAPTER_SERIAL_NUM_LEN); | 2346 | memset((void *)serial_num, 0, BFA_ADAPTER_SERIAL_NUM_LEN); |
2347 | bfa_os_memcpy((void *)serial_num, | 2347 | memcpy((void *)serial_num, |
2348 | (void *)ioc->attr->brcd_serialnum, | 2348 | (void *)ioc->attr->brcd_serialnum, |
2349 | BFA_ADAPTER_SERIAL_NUM_LEN); | 2349 | BFA_ADAPTER_SERIAL_NUM_LEN); |
2350 | } | 2350 | } |
@@ -2352,8 +2352,8 @@ bfa_ioc_get_adapter_serial_num(struct bfa_ioc_s *ioc, char *serial_num) | |||
2352 | void | 2352 | void |
2353 | bfa_ioc_get_adapter_fw_ver(struct bfa_ioc_s *ioc, char *fw_ver) | 2353 | bfa_ioc_get_adapter_fw_ver(struct bfa_ioc_s *ioc, char *fw_ver) |
2354 | { | 2354 | { |
2355 | bfa_os_memset((void *)fw_ver, 0, BFA_VERSION_LEN); | 2355 | memset((void *)fw_ver, 0, BFA_VERSION_LEN); |
2356 | bfa_os_memcpy(fw_ver, ioc->attr->fw_version, BFA_VERSION_LEN); | 2356 | memcpy(fw_ver, ioc->attr->fw_version, BFA_VERSION_LEN); |
2357 | } | 2357 | } |
2358 | 2358 | ||
2359 | void | 2359 | void |
@@ -2361,7 +2361,7 @@ bfa_ioc_get_pci_chip_rev(struct bfa_ioc_s *ioc, char *chip_rev) | |||
2361 | { | 2361 | { |
2362 | bfa_assert(chip_rev); | 2362 | bfa_assert(chip_rev); |
2363 | 2363 | ||
2364 | bfa_os_memset((void *)chip_rev, 0, BFA_IOC_CHIP_REV_LEN); | 2364 | memset((void *)chip_rev, 0, BFA_IOC_CHIP_REV_LEN); |
2365 | 2365 | ||
2366 | chip_rev[0] = 'R'; | 2366 | chip_rev[0] = 'R'; |
2367 | chip_rev[1] = 'e'; | 2367 | chip_rev[1] = 'e'; |
@@ -2374,16 +2374,16 @@ bfa_ioc_get_pci_chip_rev(struct bfa_ioc_s *ioc, char *chip_rev) | |||
2374 | void | 2374 | void |
2375 | bfa_ioc_get_adapter_optrom_ver(struct bfa_ioc_s *ioc, char *optrom_ver) | 2375 | bfa_ioc_get_adapter_optrom_ver(struct bfa_ioc_s *ioc, char *optrom_ver) |
2376 | { | 2376 | { |
2377 | bfa_os_memset((void *)optrom_ver, 0, BFA_VERSION_LEN); | 2377 | memset((void *)optrom_ver, 0, BFA_VERSION_LEN); |
2378 | bfa_os_memcpy(optrom_ver, ioc->attr->optrom_version, | 2378 | memcpy(optrom_ver, ioc->attr->optrom_version, |
2379 | BFA_VERSION_LEN); | 2379 | BFA_VERSION_LEN); |
2380 | } | 2380 | } |
2381 | 2381 | ||
2382 | void | 2382 | void |
2383 | bfa_ioc_get_adapter_manufacturer(struct bfa_ioc_s *ioc, char *manufacturer) | 2383 | bfa_ioc_get_adapter_manufacturer(struct bfa_ioc_s *ioc, char *manufacturer) |
2384 | { | 2384 | { |
2385 | bfa_os_memset((void *)manufacturer, 0, BFA_ADAPTER_MFG_NAME_LEN); | 2385 | memset((void *)manufacturer, 0, BFA_ADAPTER_MFG_NAME_LEN); |
2386 | bfa_os_memcpy(manufacturer, BFA_MFG_NAME, BFA_ADAPTER_MFG_NAME_LEN); | 2386 | memcpy(manufacturer, BFA_MFG_NAME, BFA_ADAPTER_MFG_NAME_LEN); |
2387 | } | 2387 | } |
2388 | 2388 | ||
2389 | void | 2389 | void |
@@ -2392,14 +2392,14 @@ bfa_ioc_get_adapter_model(struct bfa_ioc_s *ioc, char *model) | |||
2392 | struct bfi_ioc_attr_s *ioc_attr; | 2392 | struct bfi_ioc_attr_s *ioc_attr; |
2393 | 2393 | ||
2394 | bfa_assert(model); | 2394 | bfa_assert(model); |
2395 | bfa_os_memset((void *)model, 0, BFA_ADAPTER_MODEL_NAME_LEN); | 2395 | memset((void *)model, 0, BFA_ADAPTER_MODEL_NAME_LEN); |
2396 | 2396 | ||
2397 | ioc_attr = ioc->attr; | 2397 | ioc_attr = ioc->attr; |
2398 | 2398 | ||
2399 | /** | 2399 | /** |
2400 | * model name | 2400 | * model name |
2401 | */ | 2401 | */ |
2402 | bfa_os_snprintf(model, BFA_ADAPTER_MODEL_NAME_LEN, "%s-%u", | 2402 | snprintf(model, BFA_ADAPTER_MODEL_NAME_LEN, "%s-%u", |
2403 | BFA_MFG_NAME, ioc_attr->card_type); | 2403 | BFA_MFG_NAME, ioc_attr->card_type); |
2404 | } | 2404 | } |
2405 | 2405 | ||
@@ -2446,7 +2446,7 @@ bfa_ioc_get_state(struct bfa_ioc_s *ioc) | |||
2446 | void | 2446 | void |
2447 | bfa_ioc_get_attr(struct bfa_ioc_s *ioc, struct bfa_ioc_attr_s *ioc_attr) | 2447 | bfa_ioc_get_attr(struct bfa_ioc_s *ioc, struct bfa_ioc_attr_s *ioc_attr) |
2448 | { | 2448 | { |
2449 | bfa_os_memset((void *)ioc_attr, 0, sizeof(struct bfa_ioc_attr_s)); | 2449 | memset((void *)ioc_attr, 0, sizeof(struct bfa_ioc_attr_s)); |
2450 | 2450 | ||
2451 | ioc_attr->state = bfa_ioc_get_state(ioc); | 2451 | ioc_attr->state = bfa_ioc_get_state(ioc); |
2452 | ioc_attr->port_id = ioc->port_id; | 2452 | ioc_attr->port_id = ioc->port_id; |
@@ -2541,7 +2541,7 @@ bfa_ioc_debug_fwsave(struct bfa_ioc_s *ioc, void *trcdata, int *trclen) | |||
2541 | if (tlen > ioc->dbg_fwsave_len) | 2541 | if (tlen > ioc->dbg_fwsave_len) |
2542 | tlen = ioc->dbg_fwsave_len; | 2542 | tlen = ioc->dbg_fwsave_len; |
2543 | 2543 | ||
2544 | bfa_os_memcpy(trcdata, ioc->dbg_fwsave, tlen); | 2544 | memcpy(trcdata, ioc->dbg_fwsave, tlen); |
2545 | *trclen = tlen; | 2545 | *trclen = tlen; |
2546 | return BFA_STATUS_OK; | 2546 | return BFA_STATUS_OK; |
2547 | } | 2547 | } |
diff --git a/drivers/scsi/bfa/bfa_ioc.h b/drivers/scsi/bfa/bfa_ioc.h index 288c5801aace..97e1b16d2082 100644 --- a/drivers/scsi/bfa/bfa_ioc.h +++ b/drivers/scsi/bfa/bfa_ioc.h | |||
@@ -267,7 +267,7 @@ struct bfa_ioc_hwif_s { | |||
267 | #define bfa_ioc_fetch_stats(__ioc, __stats) \ | 267 | #define bfa_ioc_fetch_stats(__ioc, __stats) \ |
268 | (((__stats)->drv_stats) = (__ioc)->stats) | 268 | (((__stats)->drv_stats) = (__ioc)->stats) |
269 | #define bfa_ioc_clr_stats(__ioc) \ | 269 | #define bfa_ioc_clr_stats(__ioc) \ |
270 | bfa_os_memset(&(__ioc)->stats, 0, sizeof((__ioc)->stats)) | 270 | memset(&(__ioc)->stats, 0, sizeof((__ioc)->stats)) |
271 | #define bfa_ioc_maxfrsize(__ioc) ((__ioc)->attr->maxfrsize) | 271 | #define bfa_ioc_maxfrsize(__ioc) ((__ioc)->attr->maxfrsize) |
272 | #define bfa_ioc_rx_bbcredit(__ioc) ((__ioc)->attr->rx_bbcredit) | 272 | #define bfa_ioc_rx_bbcredit(__ioc) ((__ioc)->attr->rx_bbcredit) |
273 | #define bfa_ioc_speed_sup(__ioc) \ | 273 | #define bfa_ioc_speed_sup(__ioc) \ |
diff --git a/drivers/scsi/bfa/bfa_ioc_cb.c b/drivers/scsi/bfa/bfa_ioc_cb.c index d7ac864d8539..a32c8601c51f 100644 --- a/drivers/scsi/bfa/bfa_ioc_cb.c +++ b/drivers/scsi/bfa/bfa_ioc_cb.c | |||
@@ -217,7 +217,7 @@ bfa_ioc_cb_pll_init(bfa_os_addr_t rb, bfa_boolean_t fcmode) | |||
217 | bfa_reg_write(rb + APP_PLL_400_CTL_REG, | 217 | bfa_reg_write(rb + APP_PLL_400_CTL_REG, |
218 | __APP_PLL_400_BYPASS | | 218 | __APP_PLL_400_BYPASS | |
219 | __APP_PLL_400_LOGIC_SOFT_RESET); | 219 | __APP_PLL_400_LOGIC_SOFT_RESET); |
220 | bfa_os_udelay(2); | 220 | udelay(2); |
221 | bfa_reg_write(rb + APP_PLL_212_CTL_REG, | 221 | bfa_reg_write(rb + APP_PLL_212_CTL_REG, |
222 | __APP_PLL_212_LOGIC_SOFT_RESET); | 222 | __APP_PLL_212_LOGIC_SOFT_RESET); |
223 | bfa_reg_write(rb + APP_PLL_400_CTL_REG, | 223 | bfa_reg_write(rb + APP_PLL_400_CTL_REG, |
@@ -226,7 +226,7 @@ bfa_ioc_cb_pll_init(bfa_os_addr_t rb, bfa_boolean_t fcmode) | |||
226 | pll_sclk | __APP_PLL_212_LOGIC_SOFT_RESET); | 226 | pll_sclk | __APP_PLL_212_LOGIC_SOFT_RESET); |
227 | bfa_reg_write(rb + APP_PLL_400_CTL_REG, | 227 | bfa_reg_write(rb + APP_PLL_400_CTL_REG, |
228 | pll_fclk | __APP_PLL_400_LOGIC_SOFT_RESET); | 228 | pll_fclk | __APP_PLL_400_LOGIC_SOFT_RESET); |
229 | bfa_os_udelay(2000); | 229 | udelay(2000); |
230 | bfa_reg_write((rb + HOSTFN0_INT_STATUS), 0xffffffffU); | 230 | bfa_reg_write((rb + HOSTFN0_INT_STATUS), 0xffffffffU); |
231 | bfa_reg_write((rb + HOSTFN1_INT_STATUS), 0xffffffffU); | 231 | bfa_reg_write((rb + HOSTFN1_INT_STATUS), 0xffffffffU); |
232 | bfa_reg_write((rb + APP_PLL_212_CTL_REG), pll_sclk); | 232 | bfa_reg_write((rb + APP_PLL_212_CTL_REG), pll_sclk); |
diff --git a/drivers/scsi/bfa/bfa_ioc_ct.c b/drivers/scsi/bfa/bfa_ioc_ct.c index f21b82c5f64c..5008afe96c99 100644 --- a/drivers/scsi/bfa/bfa_ioc_ct.c +++ b/drivers/scsi/bfa/bfa_ioc_ct.c | |||
@@ -381,7 +381,7 @@ bfa_ioc_ct_pll_init(bfa_os_addr_t rb, bfa_boolean_t fcmode) | |||
381 | bfa_reg_write(rb + APP_PLL_425_CTL_REG, pll_fclk | | 381 | bfa_reg_write(rb + APP_PLL_425_CTL_REG, pll_fclk | |
382 | __APP_PLL_425_LOGIC_SOFT_RESET | __APP_PLL_425_ENABLE); | 382 | __APP_PLL_425_LOGIC_SOFT_RESET | __APP_PLL_425_ENABLE); |
383 | bfa_reg_read(rb + HOSTFN0_INT_MSK); | 383 | bfa_reg_read(rb + HOSTFN0_INT_MSK); |
384 | bfa_os_udelay(2000); | 384 | udelay(2000); |
385 | bfa_reg_write((rb + HOSTFN0_INT_STATUS), 0xffffffffU); | 385 | bfa_reg_write((rb + HOSTFN0_INT_STATUS), 0xffffffffU); |
386 | bfa_reg_write((rb + HOSTFN1_INT_STATUS), 0xffffffffU); | 386 | bfa_reg_write((rb + HOSTFN1_INT_STATUS), 0xffffffffU); |
387 | bfa_reg_write(rb + APP_PLL_312_CTL_REG, pll_sclk | | 387 | bfa_reg_write(rb + APP_PLL_312_CTL_REG, pll_sclk | |
@@ -395,14 +395,14 @@ bfa_ioc_ct_pll_init(bfa_os_addr_t rb, bfa_boolean_t fcmode) | |||
395 | r32 = bfa_reg_read((rb + PSS_CTL_REG)); | 395 | r32 = bfa_reg_read((rb + PSS_CTL_REG)); |
396 | r32 &= ~__PSS_LMEM_RESET; | 396 | r32 &= ~__PSS_LMEM_RESET; |
397 | bfa_reg_write((rb + PSS_CTL_REG), r32); | 397 | bfa_reg_write((rb + PSS_CTL_REG), r32); |
398 | bfa_os_udelay(1000); | 398 | udelay(1000); |
399 | if (!fcmode) { | 399 | if (!fcmode) { |
400 | bfa_reg_write((rb + PMM_1T_RESET_REG_P0), 0); | 400 | bfa_reg_write((rb + PMM_1T_RESET_REG_P0), 0); |
401 | bfa_reg_write((rb + PMM_1T_RESET_REG_P1), 0); | 401 | bfa_reg_write((rb + PMM_1T_RESET_REG_P1), 0); |
402 | } | 402 | } |
403 | 403 | ||
404 | bfa_reg_write((rb + MBIST_CTL_REG), __EDRAM_BISTR_START); | 404 | bfa_reg_write((rb + MBIST_CTL_REG), __EDRAM_BISTR_START); |
405 | bfa_os_udelay(1000); | 405 | udelay(1000); |
406 | r32 = bfa_reg_read((rb + MBIST_STAT_REG)); | 406 | r32 = bfa_reg_read((rb + MBIST_STAT_REG)); |
407 | bfa_reg_write((rb + MBIST_CTL_REG), 0); | 407 | bfa_reg_write((rb + MBIST_CTL_REG), 0); |
408 | return BFA_STATUS_OK; | 408 | return BFA_STATUS_OK; |
diff --git a/drivers/scsi/bfa/bfa_os_inc.h b/drivers/scsi/bfa/bfa_os_inc.h index 788a250ffb8a..a79a443f5f4a 100644 --- a/drivers/scsi/bfa/bfa_os_inc.h +++ b/drivers/scsi/bfa/bfa_os_inc.h | |||
@@ -15,10 +15,6 @@ | |||
15 | * General Public License for more details. | 15 | * General Public License for more details. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | /** | ||
19 | * Contains declarations all OS Specific files needed for BFA layer | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_OS_INC_H__ | 18 | #ifndef __BFA_OS_INC_H__ |
23 | #define __BFA_OS_INC_H__ | 19 | #define __BFA_OS_INC_H__ |
24 | 20 | ||
@@ -44,11 +40,6 @@ | |||
44 | #define __BIGENDIAN | 40 | #define __BIGENDIAN |
45 | #endif | 41 | #endif |
46 | 42 | ||
47 | static inline u64 bfa_os_get_clock(void) | ||
48 | { | ||
49 | return jiffies; | ||
50 | } | ||
51 | |||
52 | static inline u64 bfa_os_get_log_time(void) | 43 | static inline u64 bfa_os_get_log_time(void) |
53 | { | 44 | { |
54 | u64 system_time = 0; | 45 | u64 system_time = 0; |
@@ -63,13 +54,6 @@ static inline u64 bfa_os_get_log_time(void) | |||
63 | #define bfa_io_lat_clock_res_div HZ | 54 | #define bfa_io_lat_clock_res_div HZ |
64 | #define bfa_io_lat_clock_res_mul 1000 | 55 | #define bfa_io_lat_clock_res_mul 1000 |
65 | 56 | ||
66 | #define BFA_ASSERT(p) do { \ | ||
67 | if (!(p)) { \ | ||
68 | printk(KERN_ERR "assert(%s) failed at %s:%d\n", \ | ||
69 | #p, __FILE__, __LINE__); \ | ||
70 | } \ | ||
71 | } while (0) | ||
72 | |||
73 | #define BFA_LOG(level, bfad, mask, fmt, arg...) \ | 57 | #define BFA_LOG(level, bfad, mask, fmt, arg...) \ |
74 | do { \ | 58 | do { \ |
75 | if (((mask) == 4) || (level[1] <= '4')) \ | 59 | if (((mask) == 4) || (level[1] <= '4')) \ |
@@ -134,13 +118,6 @@ do { \ | |||
134 | 118 | ||
135 | #define bfa_os_u32(__pa64) ((__pa64) >> 32) | 119 | #define bfa_os_u32(__pa64) ((__pa64) >> 32) |
136 | 120 | ||
137 | #define bfa_os_memset memset | ||
138 | #define bfa_os_memcpy memcpy | ||
139 | #define bfa_os_udelay udelay | ||
140 | #define bfa_os_vsprintf vsprintf | ||
141 | #define bfa_os_snprintf snprintf | ||
142 | |||
143 | #define bfa_os_assign(__t, __s) __t = __s | ||
144 | #define bfa_os_addr_t void __iomem * | 121 | #define bfa_os_addr_t void __iomem * |
145 | 122 | ||
146 | #define bfa_os_reg_read(_raddr) readl(_raddr) | 123 | #define bfa_os_reg_read(_raddr) readl(_raddr) |
diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c index aa1dc749b281..ee0701fd7b21 100644 --- a/drivers/scsi/bfa/bfa_svc.c +++ b/drivers/scsi/bfa/bfa_svc.c | |||
@@ -330,7 +330,7 @@ bfa_plog_add(struct bfa_plog_s *plog, struct bfa_plog_rec_s *pl_rec) | |||
330 | 330 | ||
331 | pl_recp = &(plog->plog_recs[tail]); | 331 | pl_recp = &(plog->plog_recs[tail]); |
332 | 332 | ||
333 | bfa_os_memcpy(pl_recp, pl_rec, sizeof(struct bfa_plog_rec_s)); | 333 | memcpy(pl_recp, pl_rec, sizeof(struct bfa_plog_rec_s)); |
334 | 334 | ||
335 | pl_recp->tv = bfa_os_get_log_time(); | 335 | pl_recp->tv = bfa_os_get_log_time(); |
336 | BFA_PL_LOG_REC_INCR(plog->tail); | 336 | BFA_PL_LOG_REC_INCR(plog->tail); |
@@ -342,9 +342,9 @@ bfa_plog_add(struct bfa_plog_s *plog, struct bfa_plog_rec_s *pl_rec) | |||
342 | void | 342 | void |
343 | bfa_plog_init(struct bfa_plog_s *plog) | 343 | bfa_plog_init(struct bfa_plog_s *plog) |
344 | { | 344 | { |
345 | bfa_os_memset((char *)plog, 0, sizeof(struct bfa_plog_s)); | 345 | memset((char *)plog, 0, sizeof(struct bfa_plog_s)); |
346 | 346 | ||
347 | bfa_os_memcpy(plog->plog_sig, BFA_PL_SIG_STR, BFA_PL_SIG_LEN); | 347 | memcpy(plog->plog_sig, BFA_PL_SIG_STR, BFA_PL_SIG_LEN); |
348 | plog->head = plog->tail = 0; | 348 | plog->head = plog->tail = 0; |
349 | plog->plog_enabled = 1; | 349 | plog->plog_enabled = 1; |
350 | } | 350 | } |
@@ -357,7 +357,7 @@ bfa_plog_str(struct bfa_plog_s *plog, enum bfa_plog_mid mid, | |||
357 | struct bfa_plog_rec_s lp; | 357 | struct bfa_plog_rec_s lp; |
358 | 358 | ||
359 | if (plog->plog_enabled) { | 359 | if (plog->plog_enabled) { |
360 | bfa_os_memset(&lp, 0, sizeof(struct bfa_plog_rec_s)); | 360 | memset(&lp, 0, sizeof(struct bfa_plog_rec_s)); |
361 | lp.mid = mid; | 361 | lp.mid = mid; |
362 | lp.eid = event; | 362 | lp.eid = event; |
363 | lp.log_type = BFA_PL_LOG_TYPE_STRING; | 363 | lp.log_type = BFA_PL_LOG_TYPE_STRING; |
@@ -381,15 +381,14 @@ bfa_plog_intarr(struct bfa_plog_s *plog, enum bfa_plog_mid mid, | |||
381 | num_ints = BFA_PL_INT_LOG_SZ; | 381 | num_ints = BFA_PL_INT_LOG_SZ; |
382 | 382 | ||
383 | if (plog->plog_enabled) { | 383 | if (plog->plog_enabled) { |
384 | bfa_os_memset(&lp, 0, sizeof(struct bfa_plog_rec_s)); | 384 | memset(&lp, 0, sizeof(struct bfa_plog_rec_s)); |
385 | lp.mid = mid; | 385 | lp.mid = mid; |
386 | lp.eid = event; | 386 | lp.eid = event; |
387 | lp.log_type = BFA_PL_LOG_TYPE_INT; | 387 | lp.log_type = BFA_PL_LOG_TYPE_INT; |
388 | lp.misc = misc; | 388 | lp.misc = misc; |
389 | 389 | ||
390 | for (i = 0; i < num_ints; i++) | 390 | for (i = 0; i < num_ints; i++) |
391 | bfa_os_assign(lp.log_entry.int_log[i], | 391 | lp.log_entry.int_log[i] = intarr[i]; |
392 | intarr[i]); | ||
393 | 392 | ||
394 | lp.log_num_ints = (u8) num_ints; | 393 | lp.log_num_ints = (u8) num_ints; |
395 | 394 | ||
@@ -407,7 +406,7 @@ bfa_plog_fchdr(struct bfa_plog_s *plog, enum bfa_plog_mid mid, | |||
407 | u32 ints[BFA_PL_INT_LOG_SZ]; | 406 | u32 ints[BFA_PL_INT_LOG_SZ]; |
408 | 407 | ||
409 | if (plog->plog_enabled) { | 408 | if (plog->plog_enabled) { |
410 | bfa_os_memset(&lp, 0, sizeof(struct bfa_plog_rec_s)); | 409 | memset(&lp, 0, sizeof(struct bfa_plog_rec_s)); |
411 | 410 | ||
412 | ints[0] = tmp_int[0]; | 411 | ints[0] = tmp_int[0]; |
413 | ints[1] = tmp_int[1]; | 412 | ints[1] = tmp_int[1]; |
@@ -427,7 +426,7 @@ bfa_plog_fchdr_and_pl(struct bfa_plog_s *plog, enum bfa_plog_mid mid, | |||
427 | u32 ints[BFA_PL_INT_LOG_SZ]; | 426 | u32 ints[BFA_PL_INT_LOG_SZ]; |
428 | 427 | ||
429 | if (plog->plog_enabled) { | 428 | if (plog->plog_enabled) { |
430 | bfa_os_memset(&lp, 0, sizeof(struct bfa_plog_rec_s)); | 429 | memset(&lp, 0, sizeof(struct bfa_plog_rec_s)); |
431 | 430 | ||
432 | ints[0] = tmp_int[0]; | 431 | ints[0] = tmp_int[0]; |
433 | ints[1] = tmp_int[1]; | 432 | ints[1] = tmp_int[1]; |
@@ -485,7 +484,7 @@ claim_fcxp_req_rsp_mem(struct bfa_fcxp_mod_s *mod, struct bfa_meminfo_s *mi) | |||
485 | mod->req_pld_list_pa = dm_pa; | 484 | mod->req_pld_list_pa = dm_pa; |
486 | dm_kva += buf_pool_sz; | 485 | dm_kva += buf_pool_sz; |
487 | dm_pa += buf_pool_sz; | 486 | dm_pa += buf_pool_sz; |
488 | bfa_os_memset(mod->req_pld_list_kva, 0, buf_pool_sz); | 487 | memset(mod->req_pld_list_kva, 0, buf_pool_sz); |
489 | 488 | ||
490 | /* | 489 | /* |
491 | * Initialize the fcxp rsp payload list | 490 | * Initialize the fcxp rsp payload list |
@@ -495,7 +494,7 @@ claim_fcxp_req_rsp_mem(struct bfa_fcxp_mod_s *mod, struct bfa_meminfo_s *mi) | |||
495 | mod->rsp_pld_list_pa = dm_pa; | 494 | mod->rsp_pld_list_pa = dm_pa; |
496 | dm_kva += buf_pool_sz; | 495 | dm_kva += buf_pool_sz; |
497 | dm_pa += buf_pool_sz; | 496 | dm_pa += buf_pool_sz; |
498 | bfa_os_memset(mod->rsp_pld_list_kva, 0, buf_pool_sz); | 497 | memset(mod->rsp_pld_list_kva, 0, buf_pool_sz); |
499 | 498 | ||
500 | bfa_meminfo_dma_virt(mi) = dm_kva; | 499 | bfa_meminfo_dma_virt(mi) = dm_kva; |
501 | bfa_meminfo_dma_phys(mi) = dm_pa; | 500 | bfa_meminfo_dma_phys(mi) = dm_pa; |
@@ -508,7 +507,7 @@ claim_fcxps_mem(struct bfa_fcxp_mod_s *mod, struct bfa_meminfo_s *mi) | |||
508 | struct bfa_fcxp_s *fcxp; | 507 | struct bfa_fcxp_s *fcxp; |
509 | 508 | ||
510 | fcxp = (struct bfa_fcxp_s *) bfa_meminfo_kva(mi); | 509 | fcxp = (struct bfa_fcxp_s *) bfa_meminfo_kva(mi); |
511 | bfa_os_memset(fcxp, 0, sizeof(struct bfa_fcxp_s) * mod->num_fcxps); | 510 | memset(fcxp, 0, sizeof(struct bfa_fcxp_s) * mod->num_fcxps); |
512 | 511 | ||
513 | INIT_LIST_HEAD(&mod->fcxp_free_q); | 512 | INIT_LIST_HEAD(&mod->fcxp_free_q); |
514 | INIT_LIST_HEAD(&mod->fcxp_active_q); | 513 | INIT_LIST_HEAD(&mod->fcxp_active_q); |
@@ -559,7 +558,7 @@ bfa_fcxp_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
559 | { | 558 | { |
560 | struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); | 559 | struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); |
561 | 560 | ||
562 | bfa_os_memset(mod, 0, sizeof(struct bfa_fcxp_mod_s)); | 561 | memset(mod, 0, sizeof(struct bfa_fcxp_mod_s)); |
563 | mod->bfa = bfa; | 562 | mod->bfa = bfa; |
564 | mod->num_fcxps = cfg->fwcfg.num_fcxp_reqs; | 563 | mod->num_fcxps = cfg->fwcfg.num_fcxp_reqs; |
565 | 564 | ||
@@ -1479,7 +1478,7 @@ bfa_lps_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
1479 | struct bfa_lps_s *lps; | 1478 | struct bfa_lps_s *lps; |
1480 | int i; | 1479 | int i; |
1481 | 1480 | ||
1482 | bfa_os_memset(mod, 0, sizeof(struct bfa_lps_mod_s)); | 1481 | memset(mod, 0, sizeof(struct bfa_lps_mod_s)); |
1483 | mod->num_lps = BFA_LPS_MAX_LPORTS; | 1482 | mod->num_lps = BFA_LPS_MAX_LPORTS; |
1484 | if (cfg->drvcfg.min_cfg) | 1483 | if (cfg->drvcfg.min_cfg) |
1485 | mod->num_lps = BFA_LPS_MIN_LPORTS; | 1484 | mod->num_lps = BFA_LPS_MIN_LPORTS; |
@@ -2909,7 +2908,7 @@ bfa_fcport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
2909 | struct bfa_fcport_ln_s *ln = &fcport->ln; | 2908 | struct bfa_fcport_ln_s *ln = &fcport->ln; |
2910 | struct bfa_timeval_s tv; | 2909 | struct bfa_timeval_s tv; |
2911 | 2910 | ||
2912 | bfa_os_memset(fcport, 0, sizeof(struct bfa_fcport_s)); | 2911 | memset(fcport, 0, sizeof(struct bfa_fcport_s)); |
2913 | fcport->bfa = bfa; | 2912 | fcport->bfa = bfa; |
2914 | ln->fcport = fcport; | 2913 | ln->fcport = fcport; |
2915 | 2914 | ||
@@ -2986,9 +2985,8 @@ bfa_fcport_update_linkinfo(struct bfa_fcport_s *fcport) | |||
2986 | fcport->myalpa = 0; | 2985 | fcport->myalpa = 0; |
2987 | 2986 | ||
2988 | /* QoS Details */ | 2987 | /* QoS Details */ |
2989 | bfa_os_assign(fcport->qos_attr, pevent->link_state.qos_attr); | 2988 | fcport->qos_attr = pevent->link_state.qos_attr; |
2990 | bfa_os_assign(fcport->qos_vc_attr, | 2989 | fcport->qos_vc_attr = pevent->link_state.vc_fcf.qos_vc_attr; |
2991 | pevent->link_state.vc_fcf.qos_vc_attr); | ||
2992 | 2990 | ||
2993 | /** | 2991 | /** |
2994 | * update trunk state if applicable | 2992 | * update trunk state if applicable |
@@ -3223,7 +3221,7 @@ bfa_fcport_send_stats_get(void *cbarg) | |||
3223 | } | 3221 | } |
3224 | fcport->stats_qfull = BFA_FALSE; | 3222 | fcport->stats_qfull = BFA_FALSE; |
3225 | 3223 | ||
3226 | bfa_os_memset(msg, 0, sizeof(struct bfi_fcport_req_s)); | 3224 | memset(msg, 0, sizeof(struct bfi_fcport_req_s)); |
3227 | bfi_h2i_set(msg->mh, BFI_MC_FCPORT, BFI_FCPORT_H2I_STATS_GET_REQ, | 3225 | bfi_h2i_set(msg->mh, BFI_MC_FCPORT, BFI_FCPORT_H2I_STATS_GET_REQ, |
3228 | bfa_lpuid(fcport->bfa)); | 3226 | bfa_lpuid(fcport->bfa)); |
3229 | bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT); | 3227 | bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT); |
@@ -3285,7 +3283,7 @@ bfa_fcport_send_stats_clear(void *cbarg) | |||
3285 | } | 3283 | } |
3286 | fcport->stats_qfull = BFA_FALSE; | 3284 | fcport->stats_qfull = BFA_FALSE; |
3287 | 3285 | ||
3288 | bfa_os_memset(msg, 0, sizeof(struct bfi_fcport_req_s)); | 3286 | memset(msg, 0, sizeof(struct bfi_fcport_req_s)); |
3289 | bfi_h2i_set(msg->mh, BFI_MC_FCPORT, BFI_FCPORT_H2I_STATS_CLEAR_REQ, | 3287 | bfi_h2i_set(msg->mh, BFI_MC_FCPORT, BFI_FCPORT_H2I_STATS_CLEAR_REQ, |
3290 | bfa_lpuid(fcport->bfa)); | 3288 | bfa_lpuid(fcport->bfa)); |
3291 | bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT); | 3289 | bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT); |
@@ -3729,7 +3727,7 @@ bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_port_attr_s *attr) | |||
3729 | { | 3727 | { |
3730 | struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); | 3728 | struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); |
3731 | 3729 | ||
3732 | bfa_os_memset(attr, 0, sizeof(struct bfa_port_attr_s)); | 3730 | memset(attr, 0, sizeof(struct bfa_port_attr_s)); |
3733 | 3731 | ||
3734 | attr->nwwn = fcport->nwwn; | 3732 | attr->nwwn = fcport->nwwn; |
3735 | attr->pwwn = fcport->pwwn; | 3733 | attr->pwwn = fcport->pwwn; |
@@ -3737,7 +3735,7 @@ bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_port_attr_s *attr) | |||
3737 | attr->factorypwwn = bfa_ioc_get_mfg_pwwn(&bfa->ioc); | 3735 | attr->factorypwwn = bfa_ioc_get_mfg_pwwn(&bfa->ioc); |
3738 | attr->factorynwwn = bfa_ioc_get_mfg_nwwn(&bfa->ioc); | 3736 | attr->factorynwwn = bfa_ioc_get_mfg_nwwn(&bfa->ioc); |
3739 | 3737 | ||
3740 | bfa_os_memcpy(&attr->pport_cfg, &fcport->cfg, | 3738 | memcpy(&attr->pport_cfg, &fcport->cfg, |
3741 | sizeof(struct bfa_port_cfg_s)); | 3739 | sizeof(struct bfa_port_cfg_s)); |
3742 | /* speed attributes */ | 3740 | /* speed attributes */ |
3743 | attr->pport_cfg.speed = fcport->cfg.speed; | 3741 | attr->pport_cfg.speed = fcport->cfg.speed; |
@@ -4612,7 +4610,7 @@ bfa_rport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
4612 | !(mod->num_rports & (mod->num_rports - 1))); | 4610 | !(mod->num_rports & (mod->num_rports - 1))); |
4613 | 4611 | ||
4614 | for (i = 0; i < mod->num_rports; i++, rp++) { | 4612 | for (i = 0; i < mod->num_rports; i++, rp++) { |
4615 | bfa_os_memset(rp, 0, sizeof(struct bfa_rport_s)); | 4613 | memset(rp, 0, sizeof(struct bfa_rport_s)); |
4616 | rp->bfa = bfa; | 4614 | rp->bfa = bfa; |
4617 | rp->rport_tag = i; | 4615 | rp->rport_tag = i; |
4618 | bfa_sm_set_state(rp, bfa_rport_sm_uninit); | 4616 | bfa_sm_set_state(rp, bfa_rport_sm_uninit); |
@@ -4858,7 +4856,7 @@ bfa_rport_online(struct bfa_rport_s *rport, struct bfa_rport_info_s *rport_info) | |||
4858 | rport_info->max_frmsz = FC_MIN_PDUSZ; | 4856 | rport_info->max_frmsz = FC_MIN_PDUSZ; |
4859 | } | 4857 | } |
4860 | 4858 | ||
4861 | bfa_os_assign(rport->rport_info, *rport_info); | 4859 | rport->rport_info = *rport_info; |
4862 | bfa_sm_send_event(rport, BFA_RPORT_SM_ONLINE); | 4860 | bfa_sm_send_event(rport, BFA_RPORT_SM_ONLINE); |
4863 | } | 4861 | } |
4864 | 4862 | ||
@@ -4897,7 +4895,7 @@ bfa_rport_get_qos_attr(struct bfa_rport_s *rport, | |||
4897 | void | 4895 | void |
4898 | bfa_rport_clear_stats(struct bfa_rport_s *rport) | 4896 | bfa_rport_clear_stats(struct bfa_rport_s *rport) |
4899 | { | 4897 | { |
4900 | bfa_os_memset(&rport->stats, 0, sizeof(rport->stats)); | 4898 | memset(&rport->stats, 0, sizeof(rport->stats)); |
4901 | } | 4899 | } |
4902 | 4900 | ||
4903 | 4901 | ||
@@ -4957,8 +4955,8 @@ bfa_sgpg_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
4957 | bfa_assert(!(sgpg_pa.pa & (sizeof(struct bfi_sgpg_s) - 1))); | 4955 | bfa_assert(!(sgpg_pa.pa & (sizeof(struct bfi_sgpg_s) - 1))); |
4958 | 4956 | ||
4959 | for (i = 0; i < mod->num_sgpgs; i++) { | 4957 | for (i = 0; i < mod->num_sgpgs; i++) { |
4960 | bfa_os_memset(hsgpg, 0, sizeof(*hsgpg)); | 4958 | memset(hsgpg, 0, sizeof(*hsgpg)); |
4961 | bfa_os_memset(sgpg, 0, sizeof(*sgpg)); | 4959 | memset(sgpg, 0, sizeof(*sgpg)); |
4962 | 4960 | ||
4963 | hsgpg->sgpg = sgpg; | 4961 | hsgpg->sgpg = sgpg; |
4964 | sgpg_pa_tmp.pa = bfa_sgaddr_le(sgpg_pa.pa); | 4962 | sgpg_pa_tmp.pa = bfa_sgaddr_le(sgpg_pa.pa); |
@@ -5136,7 +5134,7 @@ claim_uf_pbs(struct bfa_uf_mod_s *ufm, struct bfa_meminfo_s *mi) | |||
5136 | bfa_meminfo_dma_virt(mi) += uf_pb_tot_sz; | 5134 | bfa_meminfo_dma_virt(mi) += uf_pb_tot_sz; |
5137 | bfa_meminfo_dma_phys(mi) += uf_pb_tot_sz; | 5135 | bfa_meminfo_dma_phys(mi) += uf_pb_tot_sz; |
5138 | 5136 | ||
5139 | bfa_os_memset((void *)ufm->uf_pbs_kva, 0, uf_pb_tot_sz); | 5137 | memset((void *)ufm->uf_pbs_kva, 0, uf_pb_tot_sz); |
5140 | } | 5138 | } |
5141 | 5139 | ||
5142 | static void | 5140 | static void |
@@ -5153,7 +5151,7 @@ claim_uf_post_msgs(struct bfa_uf_mod_s *ufm, struct bfa_meminfo_s *mi) | |||
5153 | 5151 | ||
5154 | for (i = 0, uf_bp_msg = ufm->uf_buf_posts; i < ufm->num_ufs; | 5152 | for (i = 0, uf_bp_msg = ufm->uf_buf_posts; i < ufm->num_ufs; |
5155 | i++, uf_bp_msg++) { | 5153 | i++, uf_bp_msg++) { |
5156 | bfa_os_memset(uf_bp_msg, 0, sizeof(struct bfi_uf_buf_post_s)); | 5154 | memset(uf_bp_msg, 0, sizeof(struct bfi_uf_buf_post_s)); |
5157 | 5155 | ||
5158 | uf_bp_msg->buf_tag = i; | 5156 | uf_bp_msg->buf_tag = i; |
5159 | buf_len = sizeof(struct bfa_uf_buf_s); | 5157 | buf_len = sizeof(struct bfa_uf_buf_s); |
@@ -5194,7 +5192,7 @@ claim_ufs(struct bfa_uf_mod_s *ufm, struct bfa_meminfo_s *mi) | |||
5194 | * Initialize UFs and queue it in UF free queue | 5192 | * Initialize UFs and queue it in UF free queue |
5195 | */ | 5193 | */ |
5196 | for (i = 0, uf = ufm->uf_list; i < ufm->num_ufs; i++, uf++) { | 5194 | for (i = 0, uf = ufm->uf_list; i < ufm->num_ufs; i++, uf++) { |
5197 | bfa_os_memset(uf, 0, sizeof(struct bfa_uf_s)); | 5195 | memset(uf, 0, sizeof(struct bfa_uf_s)); |
5198 | uf->bfa = ufm->bfa; | 5196 | uf->bfa = ufm->bfa; |
5199 | uf->uf_tag = i; | 5197 | uf->uf_tag = i; |
5200 | uf->pb_len = sizeof(struct bfa_uf_buf_s); | 5198 | uf->pb_len = sizeof(struct bfa_uf_buf_s); |
@@ -5241,7 +5239,7 @@ bfa_uf_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
5241 | { | 5239 | { |
5242 | struct bfa_uf_mod_s *ufm = BFA_UF_MOD(bfa); | 5240 | struct bfa_uf_mod_s *ufm = BFA_UF_MOD(bfa); |
5243 | 5241 | ||
5244 | bfa_os_memset(ufm, 0, sizeof(struct bfa_uf_mod_s)); | 5242 | memset(ufm, 0, sizeof(struct bfa_uf_mod_s)); |
5245 | ufm->bfa = bfa; | 5243 | ufm->bfa = bfa; |
5246 | ufm->num_ufs = cfg->fwcfg.num_uf_bufs; | 5244 | ufm->num_ufs = cfg->fwcfg.num_uf_bufs; |
5247 | INIT_LIST_HEAD(&ufm->uf_free_q); | 5245 | INIT_LIST_HEAD(&ufm->uf_free_q); |
@@ -5279,7 +5277,7 @@ bfa_uf_post(struct bfa_uf_mod_s *ufm, struct bfa_uf_s *uf) | |||
5279 | if (!uf_post_msg) | 5277 | if (!uf_post_msg) |
5280 | return BFA_STATUS_FAILED; | 5278 | return BFA_STATUS_FAILED; |
5281 | 5279 | ||
5282 | bfa_os_memcpy(uf_post_msg, &ufm->uf_buf_posts[uf->uf_tag], | 5280 | memcpy(uf_post_msg, &ufm->uf_buf_posts[uf->uf_tag], |
5283 | sizeof(struct bfi_uf_buf_post_s)); | 5281 | sizeof(struct bfi_uf_buf_post_s)); |
5284 | bfa_reqq_produce(ufm->bfa, BFA_REQQ_FCXP); | 5282 | bfa_reqq_produce(ufm->bfa, BFA_REQQ_FCXP); |
5285 | 5283 | ||
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index 4d8784e06e14..d3966bcfa205 100644 --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bfa/bfad.c | |||
@@ -716,30 +716,6 @@ ext: | |||
716 | return rc; | 716 | return rc; |
717 | } | 717 | } |
718 | 718 | ||
719 | /** | ||
720 | * Create a vf and its base vport implicitely. | ||
721 | */ | ||
722 | bfa_status_t | ||
723 | bfad_vf_create(struct bfad_s *bfad, u16 vf_id, | ||
724 | struct bfa_lport_cfg_s *port_cfg) | ||
725 | { | ||
726 | struct bfad_vf_s *vf; | ||
727 | int rc = BFA_STATUS_OK; | ||
728 | |||
729 | vf = kzalloc(sizeof(struct bfad_vf_s), GFP_KERNEL); | ||
730 | if (!vf) { | ||
731 | rc = BFA_STATUS_FAILED; | ||
732 | goto ext; | ||
733 | } | ||
734 | |||
735 | rc = bfa_fcs_vf_create(&vf->fcs_vf, &bfad->bfa_fcs, vf_id, port_cfg, | ||
736 | vf); | ||
737 | if (rc != BFA_STATUS_OK) | ||
738 | kfree(vf); | ||
739 | ext: | ||
740 | return rc; | ||
741 | } | ||
742 | |||
743 | void | 719 | void |
744 | bfad_bfa_tmo(unsigned long data) | 720 | bfad_bfa_tmo(unsigned long data) |
745 | { | 721 | { |