Lines Matching refs:cee

516 bfa_cee_get_attr_isr(struct bfa_cee_s *cee, bfa_status_t status)  in bfa_cee_get_attr_isr()  argument
518 struct bfa_cee_lldp_cfg_s *lldp_cfg = &cee->attr->lldp_remote; in bfa_cee_get_attr_isr()
520 cee->get_attr_status = status; in bfa_cee_get_attr_isr()
521 bfa_trc(cee, 0); in bfa_cee_get_attr_isr()
523 bfa_trc(cee, 0); in bfa_cee_get_attr_isr()
524 memcpy(cee->attr, cee->attr_dma.kva, in bfa_cee_get_attr_isr()
530 cee->get_attr_pending = BFA_FALSE; in bfa_cee_get_attr_isr()
531 if (cee->cbfn.get_attr_cbfn) { in bfa_cee_get_attr_isr()
532 bfa_trc(cee, 0); in bfa_cee_get_attr_isr()
533 cee->cbfn.get_attr_cbfn(cee->cbfn.get_attr_cbarg, status); in bfa_cee_get_attr_isr()
548 bfa_cee_get_stats_isr(struct bfa_cee_s *cee, bfa_status_t status) in bfa_cee_get_stats_isr() argument
553 cee->get_stats_status = status; in bfa_cee_get_stats_isr()
554 bfa_trc(cee, 0); in bfa_cee_get_stats_isr()
556 bfa_trc(cee, 0); in bfa_cee_get_stats_isr()
557 memcpy(cee->stats, cee->stats_dma.kva, in bfa_cee_get_stats_isr()
560 buffer = (u32 *)cee->stats; in bfa_cee_get_stats_isr()
565 cee->get_stats_pending = BFA_FALSE; in bfa_cee_get_stats_isr()
566 bfa_trc(cee, 0); in bfa_cee_get_stats_isr()
567 if (cee->cbfn.get_stats_cbfn) { in bfa_cee_get_stats_isr()
568 bfa_trc(cee, 0); in bfa_cee_get_stats_isr()
569 cee->cbfn.get_stats_cbfn(cee->cbfn.get_stats_cbarg, status); in bfa_cee_get_stats_isr()
584 bfa_cee_reset_stats_isr(struct bfa_cee_s *cee, bfa_status_t status) in bfa_cee_reset_stats_isr() argument
586 cee->reset_stats_status = status; in bfa_cee_reset_stats_isr()
587 cee->reset_stats_pending = BFA_FALSE; in bfa_cee_reset_stats_isr()
588 if (cee->cbfn.reset_stats_cbfn) in bfa_cee_reset_stats_isr()
589 cee->cbfn.reset_stats_cbfn(cee->cbfn.reset_stats_cbarg, status); in bfa_cee_reset_stats_isr()
620 bfa_cee_mem_claim(struct bfa_cee_s *cee, u8 *dma_kva, u64 dma_pa) in bfa_cee_mem_claim() argument
622 cee->attr_dma.kva = dma_kva; in bfa_cee_mem_claim()
623 cee->attr_dma.pa = dma_pa; in bfa_cee_mem_claim()
624 cee->stats_dma.kva = dma_kva + BFA_ROUNDUP( in bfa_cee_mem_claim()
626 cee->stats_dma.pa = dma_pa + BFA_ROUNDUP( in bfa_cee_mem_claim()
628 cee->attr = (struct bfa_cee_attr_s *) dma_kva; in bfa_cee_mem_claim()
629 cee->stats = (struct bfa_cee_stats_s *) (dma_kva + BFA_ROUNDUP( in bfa_cee_mem_claim()
645 bfa_cee_get_attr(struct bfa_cee_s *cee, struct bfa_cee_attr_s *attr, in bfa_cee_get_attr() argument
650 WARN_ON((cee == NULL) || (cee->ioc == NULL)); in bfa_cee_get_attr()
651 bfa_trc(cee, 0); in bfa_cee_get_attr()
652 if (!bfa_ioc_is_operational(cee->ioc)) { in bfa_cee_get_attr()
653 bfa_trc(cee, 0); in bfa_cee_get_attr()
656 if (cee->get_attr_pending == BFA_TRUE) { in bfa_cee_get_attr()
657 bfa_trc(cee, 0); in bfa_cee_get_attr()
660 cee->get_attr_pending = BFA_TRUE; in bfa_cee_get_attr()
661 cmd = (struct bfi_cee_get_req_s *) cee->get_cfg_mb.msg; in bfa_cee_get_attr()
662 cee->attr = attr; in bfa_cee_get_attr()
663 cee->cbfn.get_attr_cbfn = cbfn; in bfa_cee_get_attr()
664 cee->cbfn.get_attr_cbarg = cbarg; in bfa_cee_get_attr()
666 bfa_ioc_portid(cee->ioc)); in bfa_cee_get_attr()
667 bfa_dma_be_addr_set(cmd->dma_addr, cee->attr_dma.pa); in bfa_cee_get_attr()
668 bfa_ioc_mbox_queue(cee->ioc, &cee->get_cfg_mb); in bfa_cee_get_attr()
685 bfa_cee_get_stats(struct bfa_cee_s *cee, struct bfa_cee_stats_s *stats, in bfa_cee_get_stats() argument
690 WARN_ON((cee == NULL) || (cee->ioc == NULL)); in bfa_cee_get_stats()
692 if (!bfa_ioc_is_operational(cee->ioc)) { in bfa_cee_get_stats()
693 bfa_trc(cee, 0); in bfa_cee_get_stats()
696 if (cee->get_stats_pending == BFA_TRUE) { in bfa_cee_get_stats()
697 bfa_trc(cee, 0); in bfa_cee_get_stats()
700 cee->get_stats_pending = BFA_TRUE; in bfa_cee_get_stats()
701 cmd = (struct bfi_cee_get_req_s *) cee->get_stats_mb.msg; in bfa_cee_get_stats()
702 cee->stats = stats; in bfa_cee_get_stats()
703 cee->cbfn.get_stats_cbfn = cbfn; in bfa_cee_get_stats()
704 cee->cbfn.get_stats_cbarg = cbarg; in bfa_cee_get_stats()
706 bfa_ioc_portid(cee->ioc)); in bfa_cee_get_stats()
707 bfa_dma_be_addr_set(cmd->dma_addr, cee->stats_dma.pa); in bfa_cee_get_stats()
708 bfa_ioc_mbox_queue(cee->ioc, &cee->get_stats_mb); in bfa_cee_get_stats()
724 bfa_cee_reset_stats(struct bfa_cee_s *cee, in bfa_cee_reset_stats() argument
729 WARN_ON((cee == NULL) || (cee->ioc == NULL)); in bfa_cee_reset_stats()
730 if (!bfa_ioc_is_operational(cee->ioc)) { in bfa_cee_reset_stats()
731 bfa_trc(cee, 0); in bfa_cee_reset_stats()
734 if (cee->reset_stats_pending == BFA_TRUE) { in bfa_cee_reset_stats()
735 bfa_trc(cee, 0); in bfa_cee_reset_stats()
738 cee->reset_stats_pending = BFA_TRUE; in bfa_cee_reset_stats()
739 cmd = (struct bfi_cee_reset_stats_s *) cee->reset_stats_mb.msg; in bfa_cee_reset_stats()
740 cee->cbfn.reset_stats_cbfn = cbfn; in bfa_cee_reset_stats()
741 cee->cbfn.reset_stats_cbarg = cbarg; in bfa_cee_reset_stats()
743 bfa_ioc_portid(cee->ioc)); in bfa_cee_reset_stats()
744 bfa_ioc_mbox_queue(cee->ioc, &cee->reset_stats_mb); in bfa_cee_reset_stats()
764 struct bfa_cee_s *cee = (struct bfa_cee_s *) cbarg; in bfa_cee_isr() local
767 bfa_trc(cee, msg->mh.msg_id); in bfa_cee_isr()
770 bfa_trc(cee, get_rsp->cmd_status); in bfa_cee_isr()
771 bfa_cee_get_attr_isr(cee, get_rsp->cmd_status); in bfa_cee_isr()
774 bfa_cee_get_stats_isr(cee, get_rsp->cmd_status); in bfa_cee_isr()
777 bfa_cee_reset_stats_isr(cee, get_rsp->cmd_status); in bfa_cee_isr()
798 struct bfa_cee_s *cee = (struct bfa_cee_s *) arg; in bfa_cee_notify() local
800 bfa_trc(cee, event); in bfa_cee_notify()
805 if (cee->get_attr_pending == BFA_TRUE) { in bfa_cee_notify()
806 cee->get_attr_status = BFA_STATUS_FAILED; in bfa_cee_notify()
807 cee->get_attr_pending = BFA_FALSE; in bfa_cee_notify()
808 if (cee->cbfn.get_attr_cbfn) { in bfa_cee_notify()
809 cee->cbfn.get_attr_cbfn( in bfa_cee_notify()
810 cee->cbfn.get_attr_cbarg, in bfa_cee_notify()
814 if (cee->get_stats_pending == BFA_TRUE) { in bfa_cee_notify()
815 cee->get_stats_status = BFA_STATUS_FAILED; in bfa_cee_notify()
816 cee->get_stats_pending = BFA_FALSE; in bfa_cee_notify()
817 if (cee->cbfn.get_stats_cbfn) { in bfa_cee_notify()
818 cee->cbfn.get_stats_cbfn( in bfa_cee_notify()
819 cee->cbfn.get_stats_cbarg, in bfa_cee_notify()
823 if (cee->reset_stats_pending == BFA_TRUE) { in bfa_cee_notify()
824 cee->reset_stats_status = BFA_STATUS_FAILED; in bfa_cee_notify()
825 cee->reset_stats_pending = BFA_FALSE; in bfa_cee_notify()
826 if (cee->cbfn.reset_stats_cbfn) { in bfa_cee_notify()
827 cee->cbfn.reset_stats_cbfn( in bfa_cee_notify()
828 cee->cbfn.reset_stats_cbarg, in bfa_cee_notify()
853 bfa_cee_attach(struct bfa_cee_s *cee, struct bfa_ioc_s *ioc, in bfa_cee_attach() argument
856 WARN_ON(cee == NULL); in bfa_cee_attach()
857 cee->dev = dev; in bfa_cee_attach()
858 cee->ioc = ioc; in bfa_cee_attach()
860 bfa_ioc_mbox_regisr(cee->ioc, BFI_MC_CEE, bfa_cee_isr, cee); in bfa_cee_attach()
861 bfa_q_qe_init(&cee->ioc_notify); in bfa_cee_attach()
862 bfa_ioc_notify_init(&cee->ioc_notify, bfa_cee_notify, cee); in bfa_cee_attach()
863 list_add_tail(&cee->ioc_notify.qe, &cee->ioc->notify_q); in bfa_cee_attach()