Lines Matching refs:cee
71 bfa_cee_get_attr_isr(struct bfa_cee *cee, enum bfa_status status) in bfa_cee_get_attr_isr() argument
73 cee->get_attr_status = status; in bfa_cee_get_attr_isr()
75 memcpy(cee->attr, cee->attr_dma.kva, in bfa_cee_get_attr_isr()
77 bfa_cee_format_cee_cfg(cee->attr); in bfa_cee_get_attr_isr()
79 cee->get_attr_pending = false; in bfa_cee_get_attr_isr()
80 if (cee->cbfn.get_attr_cbfn) in bfa_cee_get_attr_isr()
81 cee->cbfn.get_attr_cbfn(cee->cbfn.get_attr_cbarg, status); in bfa_cee_get_attr_isr()
91 bfa_cee_get_stats_isr(struct bfa_cee *cee, enum bfa_status status) in bfa_cee_get_stats_isr() argument
93 cee->get_stats_status = status; in bfa_cee_get_stats_isr()
95 memcpy(cee->stats, cee->stats_dma.kva, in bfa_cee_get_stats_isr()
97 bfa_cee_stats_swap(cee->stats); in bfa_cee_get_stats_isr()
99 cee->get_stats_pending = false; in bfa_cee_get_stats_isr()
100 if (cee->cbfn.get_stats_cbfn) in bfa_cee_get_stats_isr()
101 cee->cbfn.get_stats_cbfn(cee->cbfn.get_stats_cbarg, status); in bfa_cee_get_stats_isr()
111 bfa_cee_reset_stats_isr(struct bfa_cee *cee, enum bfa_status status) in bfa_cee_reset_stats_isr() argument
113 cee->reset_stats_status = status; in bfa_cee_reset_stats_isr()
114 cee->reset_stats_pending = false; in bfa_cee_reset_stats_isr()
115 if (cee->cbfn.reset_stats_cbfn) in bfa_cee_reset_stats_isr()
116 cee->cbfn.reset_stats_cbfn(cee->cbfn.reset_stats_cbarg, status); in bfa_cee_reset_stats_isr()
135 bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva, u64 dma_pa) in bfa_nw_cee_mem_claim() argument
137 cee->attr_dma.kva = dma_kva; in bfa_nw_cee_mem_claim()
138 cee->attr_dma.pa = dma_pa; in bfa_nw_cee_mem_claim()
139 cee->stats_dma.kva = dma_kva + bfa_cee_attr_meminfo(); in bfa_nw_cee_mem_claim()
140 cee->stats_dma.pa = dma_pa + bfa_cee_attr_meminfo(); in bfa_nw_cee_mem_claim()
141 cee->attr = (struct bfa_cee_attr *) dma_kva; in bfa_nw_cee_mem_claim()
142 cee->stats = (struct bfa_cee_stats *) in bfa_nw_cee_mem_claim()
157 bfa_nw_cee_get_attr(struct bfa_cee *cee, struct bfa_cee_attr *attr, in bfa_nw_cee_get_attr() argument
162 BUG_ON(!((cee != NULL) && (cee->ioc != NULL))); in bfa_nw_cee_get_attr()
163 if (!bfa_nw_ioc_is_operational(cee->ioc)) in bfa_nw_cee_get_attr()
166 if (cee->get_attr_pending) in bfa_nw_cee_get_attr()
169 cee->get_attr_pending = true; in bfa_nw_cee_get_attr()
170 cmd = (struct bfi_cee_get_req *) cee->get_cfg_mb.msg; in bfa_nw_cee_get_attr()
171 cee->attr = attr; in bfa_nw_cee_get_attr()
172 cee->cbfn.get_attr_cbfn = cbfn; in bfa_nw_cee_get_attr()
173 cee->cbfn.get_attr_cbarg = cbarg; in bfa_nw_cee_get_attr()
175 bfa_ioc_portid(cee->ioc)); in bfa_nw_cee_get_attr()
176 bfa_dma_be_addr_set(cmd->dma_addr, cee->attr_dma.pa); in bfa_nw_cee_get_attr()
177 bfa_nw_ioc_mbox_queue(cee->ioc, &cee->get_cfg_mb, NULL, NULL); in bfa_nw_cee_get_attr()
193 struct bfa_cee *cee = (struct bfa_cee *) cbarg; in bfa_cee_isr() local
198 bfa_cee_get_attr_isr(cee, get_rsp->cmd_status); in bfa_cee_isr()
201 bfa_cee_get_stats_isr(cee, get_rsp->cmd_status); in bfa_cee_isr()
204 bfa_cee_reset_stats_isr(cee, get_rsp->cmd_status); in bfa_cee_isr()
221 struct bfa_cee *cee; in bfa_cee_notify() local
222 cee = (struct bfa_cee *) arg; in bfa_cee_notify()
227 if (cee->get_attr_pending) { in bfa_cee_notify()
228 cee->get_attr_status = BFA_STATUS_FAILED; in bfa_cee_notify()
229 cee->get_attr_pending = false; in bfa_cee_notify()
230 if (cee->cbfn.get_attr_cbfn) { in bfa_cee_notify()
231 cee->cbfn.get_attr_cbfn( in bfa_cee_notify()
232 cee->cbfn.get_attr_cbarg, in bfa_cee_notify()
236 if (cee->get_stats_pending) { in bfa_cee_notify()
237 cee->get_stats_status = BFA_STATUS_FAILED; in bfa_cee_notify()
238 cee->get_stats_pending = false; in bfa_cee_notify()
239 if (cee->cbfn.get_stats_cbfn) { in bfa_cee_notify()
240 cee->cbfn.get_stats_cbfn( in bfa_cee_notify()
241 cee->cbfn.get_stats_cbarg, in bfa_cee_notify()
245 if (cee->reset_stats_pending) { in bfa_cee_notify()
246 cee->reset_stats_status = BFA_STATUS_FAILED; in bfa_cee_notify()
247 cee->reset_stats_pending = false; in bfa_cee_notify()
248 if (cee->cbfn.reset_stats_cbfn) { in bfa_cee_notify()
249 cee->cbfn.reset_stats_cbfn( in bfa_cee_notify()
250 cee->cbfn.reset_stats_cbarg, in bfa_cee_notify()
271 bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, in bfa_nw_cee_attach() argument
274 BUG_ON(!(cee != NULL)); in bfa_nw_cee_attach()
275 cee->dev = dev; in bfa_nw_cee_attach()
276 cee->ioc = ioc; in bfa_nw_cee_attach()
278 bfa_nw_ioc_mbox_regisr(cee->ioc, BFI_MC_CEE, bfa_cee_isr, cee); in bfa_nw_cee_attach()
279 bfa_ioc_notify_init(&cee->ioc_notify, bfa_cee_notify, cee); in bfa_nw_cee_attach()
280 bfa_nw_ioc_notify_register(cee->ioc, &cee->ioc_notify); in bfa_nw_cee_attach()