Lines Matching refs:iocfc
248 bfa_iocfc_sm_stopped_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_stopped_entry() argument
253 bfa_iocfc_sm_stopped(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_stopped() argument
255 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_stopped()
260 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_initing); in bfa_iocfc_sm_stopped()
263 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_stopped()
269 bfa_iocfc_sm_initing_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_initing_entry() argument
271 bfa_ioc_enable(&iocfc->bfa->ioc); in bfa_iocfc_sm_initing_entry()
275 bfa_iocfc_sm_initing(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_initing() argument
277 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_initing()
281 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_dconf_read); in bfa_iocfc_sm_initing()
285 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_disabling); in bfa_iocfc_sm_initing()
289 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_stopping); in bfa_iocfc_sm_initing()
293 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_init_failed); in bfa_iocfc_sm_initing()
296 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_initing()
302 bfa_iocfc_sm_dconf_read_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_dconf_read_entry() argument
304 bfa_dconf_modinit(iocfc->bfa); in bfa_iocfc_sm_dconf_read_entry()
308 bfa_iocfc_sm_dconf_read(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_dconf_read() argument
310 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_dconf_read()
314 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_init_cfg_wait); in bfa_iocfc_sm_dconf_read()
318 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_disabling); in bfa_iocfc_sm_dconf_read()
322 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_stopping); in bfa_iocfc_sm_dconf_read()
326 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_init_failed); in bfa_iocfc_sm_dconf_read()
329 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_dconf_read()
335 bfa_iocfc_sm_init_cfg_wait_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_init_cfg_wait_entry() argument
337 bfa_iocfc_send_cfg(iocfc->bfa); in bfa_iocfc_sm_init_cfg_wait_entry()
341 bfa_iocfc_sm_init_cfg_wait(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_init_cfg_wait() argument
343 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_init_cfg_wait()
347 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_init_cfg_done); in bfa_iocfc_sm_init_cfg_wait()
351 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_disabling); in bfa_iocfc_sm_init_cfg_wait()
355 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_stopping); in bfa_iocfc_sm_init_cfg_wait()
359 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_init_failed); in bfa_iocfc_sm_init_cfg_wait()
362 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_init_cfg_wait()
368 bfa_iocfc_sm_init_cfg_done_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_init_cfg_done_entry() argument
370 iocfc->bfa->iocfc.op_status = BFA_STATUS_OK; in bfa_iocfc_sm_init_cfg_done_entry()
371 bfa_cb_queue(iocfc->bfa, &iocfc->bfa->iocfc.init_hcb_qe, in bfa_iocfc_sm_init_cfg_done_entry()
372 bfa_iocfc_init_cb, iocfc->bfa); in bfa_iocfc_sm_init_cfg_done_entry()
376 bfa_iocfc_sm_init_cfg_done(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_init_cfg_done() argument
378 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_init_cfg_done()
382 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_operational); in bfa_iocfc_sm_init_cfg_done()
385 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_stopping); in bfa_iocfc_sm_init_cfg_done()
388 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_disabling); in bfa_iocfc_sm_init_cfg_done()
391 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_failed); in bfa_iocfc_sm_init_cfg_done()
394 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_init_cfg_done()
400 bfa_iocfc_sm_operational_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_operational_entry() argument
402 bfa_fcport_init(iocfc->bfa); in bfa_iocfc_sm_operational_entry()
403 bfa_iocfc_start_submod(iocfc->bfa); in bfa_iocfc_sm_operational_entry()
407 bfa_iocfc_sm_operational(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_operational() argument
409 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_operational()
413 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_dconf_write); in bfa_iocfc_sm_operational()
416 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_disabling); in bfa_iocfc_sm_operational()
419 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_failed); in bfa_iocfc_sm_operational()
422 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_operational()
428 bfa_iocfc_sm_dconf_write_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_dconf_write_entry() argument
430 bfa_dconf_modexit(iocfc->bfa); in bfa_iocfc_sm_dconf_write_entry()
434 bfa_iocfc_sm_dconf_write(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_dconf_write() argument
436 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_dconf_write()
441 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_stopping); in bfa_iocfc_sm_dconf_write()
444 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_dconf_write()
450 bfa_iocfc_sm_stopping_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_stopping_entry() argument
452 bfa_ioc_disable(&iocfc->bfa->ioc); in bfa_iocfc_sm_stopping_entry()
456 bfa_iocfc_sm_stopping(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_stopping() argument
458 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_stopping()
462 bfa_isr_disable(iocfc->bfa); in bfa_iocfc_sm_stopping()
463 bfa_iocfc_disable_submod(iocfc->bfa); in bfa_iocfc_sm_stopping()
464 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_stopped); in bfa_iocfc_sm_stopping()
465 iocfc->bfa->iocfc.op_status = BFA_STATUS_OK; in bfa_iocfc_sm_stopping()
466 bfa_cb_queue(iocfc->bfa, &iocfc->bfa->iocfc.stop_hcb_qe, in bfa_iocfc_sm_stopping()
467 bfa_iocfc_stop_cb, iocfc->bfa); in bfa_iocfc_sm_stopping()
476 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_stopping()
482 bfa_iocfc_sm_enabling_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_enabling_entry() argument
484 bfa_ioc_enable(&iocfc->bfa->ioc); in bfa_iocfc_sm_enabling_entry()
488 bfa_iocfc_sm_enabling(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_enabling() argument
490 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_enabling()
494 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_cfg_wait); in bfa_iocfc_sm_enabling()
498 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_disabling); in bfa_iocfc_sm_enabling()
502 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_dconf_write); in bfa_iocfc_sm_enabling()
506 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_failed); in bfa_iocfc_sm_enabling()
508 if (iocfc->bfa->iocfc.cb_reqd == BFA_FALSE) in bfa_iocfc_sm_enabling()
511 iocfc->bfa->iocfc.op_status = BFA_STATUS_FAILED; in bfa_iocfc_sm_enabling()
512 bfa_cb_queue(iocfc->bfa, &iocfc->bfa->iocfc.en_hcb_qe, in bfa_iocfc_sm_enabling()
513 bfa_iocfc_enable_cb, iocfc->bfa); in bfa_iocfc_sm_enabling()
514 iocfc->bfa->iocfc.cb_reqd = BFA_FALSE; in bfa_iocfc_sm_enabling()
517 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_enabling()
523 bfa_iocfc_sm_cfg_wait_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_cfg_wait_entry() argument
525 bfa_iocfc_send_cfg(iocfc->bfa); in bfa_iocfc_sm_cfg_wait_entry()
529 bfa_iocfc_sm_cfg_wait(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_cfg_wait() argument
531 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_cfg_wait()
535 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_operational); in bfa_iocfc_sm_cfg_wait()
536 if (iocfc->bfa->iocfc.cb_reqd == BFA_FALSE) in bfa_iocfc_sm_cfg_wait()
539 iocfc->bfa->iocfc.op_status = BFA_STATUS_OK; in bfa_iocfc_sm_cfg_wait()
540 bfa_cb_queue(iocfc->bfa, &iocfc->bfa->iocfc.en_hcb_qe, in bfa_iocfc_sm_cfg_wait()
541 bfa_iocfc_enable_cb, iocfc->bfa); in bfa_iocfc_sm_cfg_wait()
542 iocfc->bfa->iocfc.cb_reqd = BFA_FALSE; in bfa_iocfc_sm_cfg_wait()
545 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_disabling); in bfa_iocfc_sm_cfg_wait()
549 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_dconf_write); in bfa_iocfc_sm_cfg_wait()
552 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_failed); in bfa_iocfc_sm_cfg_wait()
553 if (iocfc->bfa->iocfc.cb_reqd == BFA_FALSE) in bfa_iocfc_sm_cfg_wait()
556 iocfc->bfa->iocfc.op_status = BFA_STATUS_FAILED; in bfa_iocfc_sm_cfg_wait()
557 bfa_cb_queue(iocfc->bfa, &iocfc->bfa->iocfc.en_hcb_qe, in bfa_iocfc_sm_cfg_wait()
558 bfa_iocfc_enable_cb, iocfc->bfa); in bfa_iocfc_sm_cfg_wait()
559 iocfc->bfa->iocfc.cb_reqd = BFA_FALSE; in bfa_iocfc_sm_cfg_wait()
562 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_cfg_wait()
568 bfa_iocfc_sm_disabling_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_disabling_entry() argument
570 bfa_ioc_disable(&iocfc->bfa->ioc); in bfa_iocfc_sm_disabling_entry()
574 bfa_iocfc_sm_disabling(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_disabling() argument
576 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_disabling()
580 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_disabled); in bfa_iocfc_sm_disabling()
587 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_disabling()
593 bfa_iocfc_sm_disabled_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_disabled_entry() argument
595 bfa_isr_disable(iocfc->bfa); in bfa_iocfc_sm_disabled_entry()
596 bfa_iocfc_disable_submod(iocfc->bfa); in bfa_iocfc_sm_disabled_entry()
597 iocfc->bfa->iocfc.op_status = BFA_STATUS_OK; in bfa_iocfc_sm_disabled_entry()
598 bfa_cb_queue(iocfc->bfa, &iocfc->bfa->iocfc.dis_hcb_qe, in bfa_iocfc_sm_disabled_entry()
599 bfa_iocfc_disable_cb, iocfc->bfa); in bfa_iocfc_sm_disabled_entry()
603 bfa_iocfc_sm_disabled(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_disabled() argument
605 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_disabled()
609 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_dconf_write); in bfa_iocfc_sm_disabled()
612 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_enabling); in bfa_iocfc_sm_disabled()
615 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_disabled()
621 bfa_iocfc_sm_failed_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_failed_entry() argument
623 bfa_isr_disable(iocfc->bfa); in bfa_iocfc_sm_failed_entry()
624 bfa_iocfc_disable_submod(iocfc->bfa); in bfa_iocfc_sm_failed_entry()
628 bfa_iocfc_sm_failed(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_failed() argument
630 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_failed()
634 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_dconf_write); in bfa_iocfc_sm_failed()
637 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_disabling); in bfa_iocfc_sm_failed()
640 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_cfg_wait); in bfa_iocfc_sm_failed()
645 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_failed()
651 bfa_iocfc_sm_init_failed_entry(struct bfa_iocfc_s *iocfc) in bfa_iocfc_sm_init_failed_entry() argument
653 bfa_isr_disable(iocfc->bfa); in bfa_iocfc_sm_init_failed_entry()
654 iocfc->bfa->iocfc.op_status = BFA_STATUS_FAILED; in bfa_iocfc_sm_init_failed_entry()
655 bfa_cb_queue(iocfc->bfa, &iocfc->bfa->iocfc.init_hcb_qe, in bfa_iocfc_sm_init_failed_entry()
656 bfa_iocfc_init_cb, iocfc->bfa); in bfa_iocfc_sm_init_failed_entry()
660 bfa_iocfc_sm_init_failed(struct bfa_iocfc_s *iocfc, enum iocfc_event event) in bfa_iocfc_sm_init_failed() argument
662 bfa_trc(iocfc->bfa, event); in bfa_iocfc_sm_init_failed()
666 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_stopping); in bfa_iocfc_sm_init_failed()
669 bfa_ioc_disable(&iocfc->bfa->ioc); in bfa_iocfc_sm_init_failed()
672 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_dconf_read); in bfa_iocfc_sm_init_failed()
675 bfa_fsm_set_state(iocfc, bfa_iocfc_sm_stopped); in bfa_iocfc_sm_init_failed()
676 iocfc->bfa->iocfc.op_status = BFA_STATUS_OK; in bfa_iocfc_sm_init_failed()
677 bfa_cb_queue(iocfc->bfa, &iocfc->bfa->iocfc.dis_hcb_qe, in bfa_iocfc_sm_init_failed()
678 bfa_iocfc_disable_cb, iocfc->bfa); in bfa_iocfc_sm_init_failed()
683 bfa_sm_fault(iocfc->bfa, event); in bfa_iocfc_sm_init_failed()
729 CQ_INCR(ci, bfa->iocfc.cfg.drvcfg.num_rspq_elems); in bfa_isr_rspq()
768 intr = readl(bfa->iocfc.bfa_regs.intr_status); in bfa_msix_all()
807 intr = readl(bfa->iocfc.bfa_regs.intr_status); in bfa_intx()
811 writel(qintr, bfa->iocfc.bfa_regs.intr_status); in bfa_intx()
863 writel(umsk, bfa->iocfc.bfa_regs.intr_status); in bfa_isr_enable()
864 writel(~umsk, bfa->iocfc.bfa_regs.intr_mask); in bfa_isr_enable()
865 bfa->iocfc.intr_mask = ~umsk; in bfa_isr_enable()
879 writel(-1L, bfa->iocfc.bfa_regs.intr_mask); in bfa_isr_disable()
886 bfa_isr_reqq(bfa, vec - bfa->iocfc.hwif.cpe_vec_q0); in bfa_msix_reqq()
902 bfa_isr_rspq(bfa, vec - bfa->iocfc.hwif.rme_vec_q0); in bfa_msix_rspq()
911 intr = readl(bfa->iocfc.bfa_regs.intr_status); in bfa_msix_lpu_err()
954 writel(intr, bfa->iocfc.bfa_regs.intr_status); in bfa_msix_lpu_err()
974 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_iocfc_send_cfg() local
976 struct bfi_iocfc_cfg_s *cfg_info = iocfc->cfginfo; in bfa_iocfc_send_cfg()
977 struct bfa_iocfc_cfg_s *cfg = &iocfc->cfg; in bfa_iocfc_send_cfg()
997 bfa_dma_be_addr_set(cfg_info->cfgrsp_addr, iocfc->cfgrsp_dma.pa); in bfa_iocfc_send_cfg()
1003 iocfc->req_cq_ba[i].pa); in bfa_iocfc_send_cfg()
1005 iocfc->req_cq_shadow_ci[i].pa); in bfa_iocfc_send_cfg()
1010 iocfc->rsp_cq_ba[i].pa); in bfa_iocfc_send_cfg()
1012 iocfc->rsp_cq_shadow_pi[i].pa); in bfa_iocfc_send_cfg()
1021 if (bfa_fsm_cmp_state(iocfc, bfa_iocfc_sm_init_cfg_wait)) in bfa_iocfc_send_cfg()
1029 bfa_dma_be_addr_set(cfg_req.ioc_cfg_dma_addr, iocfc->cfg_info.pa); in bfa_iocfc_send_cfg()
1039 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_iocfc_init_mem() local
1042 iocfc->bfa = bfa; in bfa_iocfc_init_mem()
1043 iocfc->cfg = *cfg; in bfa_iocfc_init_mem()
1049 iocfc->hwif.hw_reginit = bfa_hwct_reginit; in bfa_iocfc_init_mem()
1050 iocfc->hwif.hw_reqq_ack = bfa_hwct_reqq_ack; in bfa_iocfc_init_mem()
1051 iocfc->hwif.hw_rspq_ack = bfa_hwct_rspq_ack; in bfa_iocfc_init_mem()
1052 iocfc->hwif.hw_msix_init = bfa_hwct_msix_init; in bfa_iocfc_init_mem()
1053 iocfc->hwif.hw_msix_ctrl_install = bfa_hwct_msix_ctrl_install; in bfa_iocfc_init_mem()
1054 iocfc->hwif.hw_msix_queue_install = bfa_hwct_msix_queue_install; in bfa_iocfc_init_mem()
1055 iocfc->hwif.hw_msix_uninstall = bfa_hwct_msix_uninstall; in bfa_iocfc_init_mem()
1056 iocfc->hwif.hw_isr_mode_set = bfa_hwct_isr_mode_set; in bfa_iocfc_init_mem()
1057 iocfc->hwif.hw_msix_getvecs = bfa_hwct_msix_getvecs; in bfa_iocfc_init_mem()
1058 iocfc->hwif.hw_msix_get_rme_range = bfa_hwct_msix_get_rme_range; in bfa_iocfc_init_mem()
1059 iocfc->hwif.rme_vec_q0 = BFI_MSIX_RME_QMIN_CT; in bfa_iocfc_init_mem()
1060 iocfc->hwif.cpe_vec_q0 = BFI_MSIX_CPE_QMIN_CT; in bfa_iocfc_init_mem()
1062 iocfc->hwif.hw_reginit = bfa_hwcb_reginit; in bfa_iocfc_init_mem()
1063 iocfc->hwif.hw_reqq_ack = NULL; in bfa_iocfc_init_mem()
1064 iocfc->hwif.hw_rspq_ack = bfa_hwcb_rspq_ack; in bfa_iocfc_init_mem()
1065 iocfc->hwif.hw_msix_init = bfa_hwcb_msix_init; in bfa_iocfc_init_mem()
1066 iocfc->hwif.hw_msix_ctrl_install = bfa_hwcb_msix_ctrl_install; in bfa_iocfc_init_mem()
1067 iocfc->hwif.hw_msix_queue_install = bfa_hwcb_msix_queue_install; in bfa_iocfc_init_mem()
1068 iocfc->hwif.hw_msix_uninstall = bfa_hwcb_msix_uninstall; in bfa_iocfc_init_mem()
1069 iocfc->hwif.hw_isr_mode_set = bfa_hwcb_isr_mode_set; in bfa_iocfc_init_mem()
1070 iocfc->hwif.hw_msix_getvecs = bfa_hwcb_msix_getvecs; in bfa_iocfc_init_mem()
1071 iocfc->hwif.hw_msix_get_rme_range = bfa_hwcb_msix_get_rme_range; in bfa_iocfc_init_mem()
1072 iocfc->hwif.rme_vec_q0 = BFI_MSIX_RME_QMIN_CB + in bfa_iocfc_init_mem()
1074 iocfc->hwif.cpe_vec_q0 = BFI_MSIX_CPE_QMIN_CB + in bfa_iocfc_init_mem()
1079 iocfc->hwif.hw_reginit = bfa_hwct2_reginit; in bfa_iocfc_init_mem()
1080 iocfc->hwif.hw_isr_mode_set = NULL; in bfa_iocfc_init_mem()
1081 iocfc->hwif.hw_rspq_ack = bfa_hwct2_rspq_ack; in bfa_iocfc_init_mem()
1084 iocfc->hwif.hw_reginit(bfa); in bfa_iocfc_init_mem()
1094 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_iocfc_mem_claim() local
1111 iocfc->req_cq_ba[i].kva = bfa_mem_dma_virt(reqq_dma); in bfa_iocfc_mem_claim()
1112 iocfc->req_cq_ba[i].pa = bfa_mem_dma_phys(reqq_dma); in bfa_iocfc_mem_claim()
1113 memset(iocfc->req_cq_ba[i].kva, 0, per_reqq_sz); in bfa_iocfc_mem_claim()
1116 iocfc->rsp_cq_ba[i].kva = bfa_mem_dma_virt(rspq_dma); in bfa_iocfc_mem_claim()
1117 iocfc->rsp_cq_ba[i].pa = bfa_mem_dma_phys(rspq_dma); in bfa_iocfc_mem_claim()
1118 memset(iocfc->rsp_cq_ba[i].kva, 0, per_rspq_sz); in bfa_iocfc_mem_claim()
1126 iocfc->req_cq_shadow_ci[i].kva = dm_kva; in bfa_iocfc_mem_claim()
1127 iocfc->req_cq_shadow_ci[i].pa = dm_pa; in bfa_iocfc_mem_claim()
1131 iocfc->rsp_cq_shadow_pi[i].kva = dm_kva; in bfa_iocfc_mem_claim()
1132 iocfc->rsp_cq_shadow_pi[i].pa = dm_pa; in bfa_iocfc_mem_claim()
1138 bfa->iocfc.cfg_info.kva = dm_kva; in bfa_iocfc_mem_claim()
1139 bfa->iocfc.cfg_info.pa = dm_pa; in bfa_iocfc_mem_claim()
1140 bfa->iocfc.cfginfo = (struct bfi_iocfc_cfg_s *) dm_kva; in bfa_iocfc_mem_claim()
1145 bfa->iocfc.cfgrsp_dma.kva = dm_kva; in bfa_iocfc_mem_claim()
1146 bfa->iocfc.cfgrsp_dma.pa = dm_pa; in bfa_iocfc_mem_claim()
1147 bfa->iocfc.cfgrsp = (struct bfi_iocfc_cfgrsp_s *) dm_kva; in bfa_iocfc_mem_claim()
1154 bfa_ioc_debug_memclaim(&bfa->ioc, bfa_mem_kva_curp(iocfc)); in bfa_iocfc_mem_claim()
1155 bfa_mem_kva_curp(iocfc) += BFA_DBG_FWTRC_LEN; in bfa_iocfc_mem_claim()
1178 bfa->iocfc.submod_enabled = BFA_TRUE; in bfa_iocfc_start_submod()
1187 if (bfa->iocfc.submod_enabled == BFA_FALSE) in bfa_iocfc_disable_submod()
1198 bfa->iocfc.submod_enabled = BFA_FALSE; in bfa_iocfc_disable_submod()
1207 bfa_cb_init(bfa->bfad, bfa->iocfc.op_status); in bfa_iocfc_init_cb()
1247 struct bfa_iocfc_regs_s *r = &bfa->iocfc.bfa_regs; in bfa_iocfc_qreg()
1251 bfa->iocfc.hw_qid[i] = qreg->hw_qid[i]; in bfa_iocfc_qreg()
1264 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_iocfc_res_recfg() local
1265 struct bfi_iocfc_cfg_s *cfg_info = iocfc->cfginfo; in bfa_iocfc_res_recfg()
1281 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_iocfc_cfgrsp() local
1282 struct bfi_iocfc_cfgrsp_s *cfgrsp = iocfc->cfgrsp; in bfa_iocfc_cfgrsp()
1308 if (bfa->iocfc.cfgrsp->pbc_cfg.pbc_pwwn != 0) { in bfa_iocfc_cfgrsp()
1309 bfa->ioc.attr->pwwn = bfa->iocfc.cfgrsp->pbc_cfg.pbc_pwwn; in bfa_iocfc_cfgrsp()
1310 bfa->ioc.attr->nwwn = bfa->iocfc.cfgrsp->pbc_cfg.pbc_nwwn; in bfa_iocfc_cfgrsp()
1311 bfa_fsm_send_event(iocfc, IOCFC_E_CFG_DONE); in bfa_iocfc_cfgrsp()
1334 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_iocfc_process_faa_addr() local
1335 struct bfi_iocfc_cfgrsp_s *cfgrsp = iocfc->cfgrsp; in bfa_iocfc_process_faa_addr()
1342 bfa_fsm_send_event(iocfc, IOCFC_E_CFG_DONE); in bfa_iocfc_process_faa_addr()
1371 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_faa_query() local
1378 if (iocfc->faa_args.busy == BFA_TRUE) in bfa_faa_query()
1381 iocfc->faa_args.faa_attr = attr; in bfa_faa_query()
1382 iocfc->faa_args.faa_cb.faa_cbfn = cbfn; in bfa_faa_query()
1383 iocfc->faa_args.faa_cb.faa_cbarg = cbarg; in bfa_faa_query()
1385 iocfc->faa_args.busy = BFA_TRUE; in bfa_faa_query()
1400 bfa_faa_query_reply(struct bfa_iocfc_s *iocfc, in bfa_faa_query_reply() argument
1403 void *cbarg = iocfc->faa_args.faa_cb.faa_cbarg; in bfa_faa_query_reply()
1405 if (iocfc->faa_args.faa_attr) { in bfa_faa_query_reply()
1406 iocfc->faa_args.faa_attr->faa = rsp->faa; in bfa_faa_query_reply()
1407 iocfc->faa_args.faa_attr->faa_state = rsp->faa_status; in bfa_faa_query_reply()
1408 iocfc->faa_args.faa_attr->pwwn_source = rsp->addr_source; in bfa_faa_query_reply()
1411 WARN_ON(!iocfc->faa_args.faa_cb.faa_cbfn); in bfa_faa_query_reply()
1413 iocfc->faa_args.faa_cb.faa_cbfn(cbarg, BFA_STATUS_OK); in bfa_faa_query_reply()
1414 iocfc->faa_args.busy = BFA_FALSE; in bfa_faa_query_reply()
1426 bfa_fsm_send_event(&bfa->iocfc, IOCFC_E_IOC_ENABLED); in bfa_iocfc_enable_cbfn()
1428 bfa_fsm_send_event(&bfa->iocfc, IOCFC_E_IOC_FAILED); in bfa_iocfc_enable_cbfn()
1440 bfa_fsm_send_event(&bfa->iocfc, IOCFC_E_IOC_DISABLED); in bfa_iocfc_disable_cbfn()
1452 bfa_fsm_send_event(&bfa->iocfc, IOCFC_E_IOC_FAILED); in bfa_iocfc_hbfail_cbfn()
1542 bfa->iocfc.cb_reqd = BFA_FALSE; in bfa_iocfc_attach()
1543 bfa->iocfc.op_status = BFA_STATUS_OK; in bfa_iocfc_attach()
1544 bfa->iocfc.submod_enabled = BFA_FALSE; in bfa_iocfc_attach()
1546 bfa_fsm_set_state(&bfa->iocfc, bfa_iocfc_sm_stopped); in bfa_iocfc_attach()
1555 bfa_fsm_send_event(&bfa->iocfc, IOCFC_E_INIT); in bfa_iocfc_init()
1565 bfa_fsm_send_event(&bfa->iocfc, IOCFC_E_START); in bfa_iocfc_start()
1575 bfa_fsm_send_event(&bfa->iocfc, IOCFC_E_STOP); in bfa_iocfc_stop()
1582 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_iocfc_isr() local
1593 iocfc->updateq_cbfn(iocfc->updateq_cbarg, BFA_STATUS_OK); in bfa_iocfc_isr()
1600 bfa_faa_query_reply(iocfc, (bfi_faa_query_rsp_t *)msg); in bfa_iocfc_isr()
1610 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_iocfc_get_attr() local
1612 attr->intr_attr.coalesce = iocfc->cfginfo->intr_attr.coalesce; in bfa_iocfc_get_attr()
1614 attr->intr_attr.delay = iocfc->cfginfo->intr_attr.delay ? in bfa_iocfc_get_attr()
1615 be16_to_cpu(iocfc->cfginfo->intr_attr.delay) : in bfa_iocfc_get_attr()
1616 be16_to_cpu(iocfc->cfgrsp->intr_attr.delay); in bfa_iocfc_get_attr()
1618 attr->intr_attr.latency = iocfc->cfginfo->intr_attr.latency ? in bfa_iocfc_get_attr()
1619 be16_to_cpu(iocfc->cfginfo->intr_attr.latency) : in bfa_iocfc_get_attr()
1620 be16_to_cpu(iocfc->cfgrsp->intr_attr.latency); in bfa_iocfc_get_attr()
1622 attr->config = iocfc->cfg; in bfa_iocfc_get_attr()
1628 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_iocfc_israttr_set() local
1631 iocfc->cfginfo->intr_attr.coalesce = attr->coalesce; in bfa_iocfc_israttr_set()
1632 iocfc->cfginfo->intr_attr.delay = cpu_to_be16(attr->delay); in bfa_iocfc_israttr_set()
1633 iocfc->cfginfo->intr_attr.latency = cpu_to_be16(attr->latency); in bfa_iocfc_israttr_set()
1644 m->coalesce = iocfc->cfginfo->intr_attr.coalesce; in bfa_iocfc_israttr_set()
1645 m->delay = iocfc->cfginfo->intr_attr.delay; in bfa_iocfc_israttr_set()
1646 m->latency = iocfc->cfginfo->intr_attr.latency; in bfa_iocfc_israttr_set()
1658 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_iocfc_set_snsbase() local
1660 iocfc->cfginfo->sense_buf_len = (BFI_IOIM_SNSLEN - 1); in bfa_iocfc_set_snsbase()
1661 bfa_dma_be_addr_set(iocfc->cfginfo->ioim_snsbase[seg_no], snsbase_pa); in bfa_iocfc_set_snsbase()
1671 bfa->iocfc.cb_reqd = BFA_TRUE; in bfa_iocfc_enable()
1672 bfa_fsm_send_event(&bfa->iocfc, IOCFC_E_ENABLE); in bfa_iocfc_enable()
1681 bfa_fsm_send_event(&bfa->iocfc, IOCFC_E_DISABLE); in bfa_iocfc_disable()
1688 bfa_fsm_cmp_state(&bfa->iocfc, bfa_iocfc_sm_operational); in bfa_iocfc_is_operational()
1697 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_iocfc_get_bootwwns() local
1698 struct bfi_iocfc_cfgrsp_s *cfgrsp = iocfc->cfgrsp; in bfa_iocfc_get_bootwwns()
1717 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_iocfc_get_pbc_vports() local
1718 struct bfi_iocfc_cfgrsp_s *cfgrsp = iocfc->cfgrsp; in bfa_iocfc_get_pbc_vports()