Lines Matching refs:cee
79 bfa_cee_get_attr_isr(struct bfa_cee *cee, enum bfa_status status) in bfa_cee_get_attr_isr() argument
81 cee->get_attr_status = status; in bfa_cee_get_attr_isr()
83 memcpy(cee->attr, cee->attr_dma.kva, in bfa_cee_get_attr_isr()
85 bfa_cee_format_cee_cfg(cee->attr); in bfa_cee_get_attr_isr()
87 cee->get_attr_pending = false; in bfa_cee_get_attr_isr()
88 if (cee->cbfn.get_attr_cbfn) in bfa_cee_get_attr_isr()
89 cee->cbfn.get_attr_cbfn(cee->cbfn.get_attr_cbarg, status); in bfa_cee_get_attr_isr()
99 bfa_cee_get_stats_isr(struct bfa_cee *cee, enum bfa_status status) in bfa_cee_get_stats_isr() argument
101 cee->get_stats_status = status; in bfa_cee_get_stats_isr()
103 memcpy(cee->stats, cee->stats_dma.kva, in bfa_cee_get_stats_isr()
105 bfa_cee_stats_swap(cee->stats); in bfa_cee_get_stats_isr()
107 cee->get_stats_pending = false; in bfa_cee_get_stats_isr()
108 if (cee->cbfn.get_stats_cbfn) in bfa_cee_get_stats_isr()
109 cee->cbfn.get_stats_cbfn(cee->cbfn.get_stats_cbarg, status); in bfa_cee_get_stats_isr()
123 bfa_cee_reset_stats_isr(struct bfa_cee *cee, enum bfa_status status) in bfa_cee_reset_stats_isr() argument
125 cee->reset_stats_status = status; in bfa_cee_reset_stats_isr()
126 cee->reset_stats_pending = false; in bfa_cee_reset_stats_isr()
127 if (cee->cbfn.reset_stats_cbfn) in bfa_cee_reset_stats_isr()
128 cee->cbfn.reset_stats_cbfn(cee->cbfn.reset_stats_cbarg, status); in bfa_cee_reset_stats_isr()
147 bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva, u64 dma_pa) in bfa_nw_cee_mem_claim() argument
149 cee->attr_dma.kva = dma_kva; in bfa_nw_cee_mem_claim()
150 cee->attr_dma.pa = dma_pa; in bfa_nw_cee_mem_claim()
151 cee->stats_dma.kva = dma_kva + bfa_cee_attr_meminfo(); in bfa_nw_cee_mem_claim()
152 cee->stats_dma.pa = dma_pa + bfa_cee_attr_meminfo(); in bfa_nw_cee_mem_claim()
153 cee->attr = (struct bfa_cee_attr *) dma_kva; in bfa_nw_cee_mem_claim()
154 cee->stats = (struct bfa_cee_stats *) in bfa_nw_cee_mem_claim()
166 bfa_nw_cee_get_attr(struct bfa_cee *cee, struct bfa_cee_attr *attr, in bfa_nw_cee_get_attr() argument
171 BUG_ON(!((cee != NULL) && (cee->ioc != NULL))); in bfa_nw_cee_get_attr()
172 if (!bfa_nw_ioc_is_operational(cee->ioc)) in bfa_nw_cee_get_attr()
175 if (cee->get_attr_pending) in bfa_nw_cee_get_attr()
178 cee->get_attr_pending = true; in bfa_nw_cee_get_attr()
179 cmd = (struct bfi_cee_get_req *) cee->get_cfg_mb.msg; in bfa_nw_cee_get_attr()
180 cee->attr = attr; in bfa_nw_cee_get_attr()
181 cee->cbfn.get_attr_cbfn = cbfn; in bfa_nw_cee_get_attr()
182 cee->cbfn.get_attr_cbarg = cbarg; in bfa_nw_cee_get_attr()
184 bfa_ioc_portid(cee->ioc)); in bfa_nw_cee_get_attr()
185 bfa_dma_be_addr_set(cmd->dma_addr, cee->attr_dma.pa); in bfa_nw_cee_get_attr()
186 bfa_nw_ioc_mbox_queue(cee->ioc, &cee->get_cfg_mb, NULL, NULL); in bfa_nw_cee_get_attr()
200 struct bfa_cee *cee = (struct bfa_cee *) cbarg; in bfa_cee_isr() local
205 bfa_cee_get_attr_isr(cee, get_rsp->cmd_status); in bfa_cee_isr()
208 bfa_cee_get_stats_isr(cee, get_rsp->cmd_status); in bfa_cee_isr()
211 bfa_cee_reset_stats_isr(cee, get_rsp->cmd_status); in bfa_cee_isr()
227 struct bfa_cee *cee; in bfa_cee_notify() local
228 cee = (struct bfa_cee *) arg; in bfa_cee_notify()
233 if (cee->get_attr_pending) { in bfa_cee_notify()
234 cee->get_attr_status = BFA_STATUS_FAILED; in bfa_cee_notify()
235 cee->get_attr_pending = false; in bfa_cee_notify()
236 if (cee->cbfn.get_attr_cbfn) { in bfa_cee_notify()
237 cee->cbfn.get_attr_cbfn( in bfa_cee_notify()
238 cee->cbfn.get_attr_cbarg, in bfa_cee_notify()
242 if (cee->get_stats_pending) { in bfa_cee_notify()
243 cee->get_stats_status = BFA_STATUS_FAILED; in bfa_cee_notify()
244 cee->get_stats_pending = false; in bfa_cee_notify()
245 if (cee->cbfn.get_stats_cbfn) { in bfa_cee_notify()
246 cee->cbfn.get_stats_cbfn( in bfa_cee_notify()
247 cee->cbfn.get_stats_cbarg, in bfa_cee_notify()
251 if (cee->reset_stats_pending) { in bfa_cee_notify()
252 cee->reset_stats_status = BFA_STATUS_FAILED; in bfa_cee_notify()
253 cee->reset_stats_pending = false; in bfa_cee_notify()
254 if (cee->cbfn.reset_stats_cbfn) { in bfa_cee_notify()
255 cee->cbfn.reset_stats_cbfn( in bfa_cee_notify()
256 cee->cbfn.reset_stats_cbarg, in bfa_cee_notify()
277 bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, in bfa_nw_cee_attach() argument
280 BUG_ON(!(cee != NULL)); in bfa_nw_cee_attach()
281 cee->dev = dev; in bfa_nw_cee_attach()
282 cee->ioc = ioc; in bfa_nw_cee_attach()
284 bfa_nw_ioc_mbox_regisr(cee->ioc, BFI_MC_CEE, bfa_cee_isr, cee); in bfa_nw_cee_attach()
285 bfa_ioc_notify_init(&cee->ioc_notify, bfa_cee_notify, cee); in bfa_nw_cee_attach()
286 bfa_nw_ioc_notify_register(cee->ioc, &cee->ioc_notify); in bfa_nw_cee_attach()