Lines Matching refs:cee
78 bfa_cee_get_attr_isr(struct bfa_cee *cee, enum bfa_status status) in bfa_cee_get_attr_isr() argument
80 cee->get_attr_status = status; in bfa_cee_get_attr_isr()
82 memcpy(cee->attr, cee->attr_dma.kva, in bfa_cee_get_attr_isr()
84 bfa_cee_format_cee_cfg(cee->attr); in bfa_cee_get_attr_isr()
86 cee->get_attr_pending = false; in bfa_cee_get_attr_isr()
87 if (cee->cbfn.get_attr_cbfn) in bfa_cee_get_attr_isr()
88 cee->cbfn.get_attr_cbfn(cee->cbfn.get_attr_cbarg, status); in bfa_cee_get_attr_isr()
98 bfa_cee_get_stats_isr(struct bfa_cee *cee, enum bfa_status status) in bfa_cee_get_stats_isr() argument
100 cee->get_stats_status = status; in bfa_cee_get_stats_isr()
102 memcpy(cee->stats, cee->stats_dma.kva, in bfa_cee_get_stats_isr()
104 bfa_cee_stats_swap(cee->stats); in bfa_cee_get_stats_isr()
106 cee->get_stats_pending = false; in bfa_cee_get_stats_isr()
107 if (cee->cbfn.get_stats_cbfn) in bfa_cee_get_stats_isr()
108 cee->cbfn.get_stats_cbfn(cee->cbfn.get_stats_cbarg, status); in bfa_cee_get_stats_isr()
122 bfa_cee_reset_stats_isr(struct bfa_cee *cee, enum bfa_status status) in bfa_cee_reset_stats_isr() argument
124 cee->reset_stats_status = status; in bfa_cee_reset_stats_isr()
125 cee->reset_stats_pending = false; in bfa_cee_reset_stats_isr()
126 if (cee->cbfn.reset_stats_cbfn) in bfa_cee_reset_stats_isr()
127 cee->cbfn.reset_stats_cbfn(cee->cbfn.reset_stats_cbarg, status); in bfa_cee_reset_stats_isr()
146 bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva, u64 dma_pa) in bfa_nw_cee_mem_claim() argument
148 cee->attr_dma.kva = dma_kva; in bfa_nw_cee_mem_claim()
149 cee->attr_dma.pa = dma_pa; in bfa_nw_cee_mem_claim()
150 cee->stats_dma.kva = dma_kva + bfa_cee_attr_meminfo(); in bfa_nw_cee_mem_claim()
151 cee->stats_dma.pa = dma_pa + bfa_cee_attr_meminfo(); in bfa_nw_cee_mem_claim()
152 cee->attr = (struct bfa_cee_attr *) dma_kva; in bfa_nw_cee_mem_claim()
153 cee->stats = (struct bfa_cee_stats *) in bfa_nw_cee_mem_claim()
165 bfa_nw_cee_get_attr(struct bfa_cee *cee, struct bfa_cee_attr *attr, in bfa_nw_cee_get_attr() argument
170 BUG_ON(!((cee != NULL) && (cee->ioc != NULL))); in bfa_nw_cee_get_attr()
171 if (!bfa_nw_ioc_is_operational(cee->ioc)) in bfa_nw_cee_get_attr()
174 if (cee->get_attr_pending) in bfa_nw_cee_get_attr()
177 cee->get_attr_pending = true; in bfa_nw_cee_get_attr()
178 cmd = (struct bfi_cee_get_req *) cee->get_cfg_mb.msg; in bfa_nw_cee_get_attr()
179 cee->attr = attr; in bfa_nw_cee_get_attr()
180 cee->cbfn.get_attr_cbfn = cbfn; in bfa_nw_cee_get_attr()
181 cee->cbfn.get_attr_cbarg = cbarg; in bfa_nw_cee_get_attr()
183 bfa_ioc_portid(cee->ioc)); in bfa_nw_cee_get_attr()
184 bfa_dma_be_addr_set(cmd->dma_addr, cee->attr_dma.pa); in bfa_nw_cee_get_attr()
185 bfa_nw_ioc_mbox_queue(cee->ioc, &cee->get_cfg_mb, NULL, NULL); in bfa_nw_cee_get_attr()
199 struct bfa_cee *cee = (struct bfa_cee *) cbarg; in bfa_cee_isr() local
204 bfa_cee_get_attr_isr(cee, get_rsp->cmd_status); in bfa_cee_isr()
207 bfa_cee_get_stats_isr(cee, get_rsp->cmd_status); in bfa_cee_isr()
210 bfa_cee_reset_stats_isr(cee, get_rsp->cmd_status); in bfa_cee_isr()
226 struct bfa_cee *cee; in bfa_cee_notify() local
227 cee = (struct bfa_cee *) arg; in bfa_cee_notify()
232 if (cee->get_attr_pending) { in bfa_cee_notify()
233 cee->get_attr_status = BFA_STATUS_FAILED; in bfa_cee_notify()
234 cee->get_attr_pending = false; in bfa_cee_notify()
235 if (cee->cbfn.get_attr_cbfn) { in bfa_cee_notify()
236 cee->cbfn.get_attr_cbfn( in bfa_cee_notify()
237 cee->cbfn.get_attr_cbarg, in bfa_cee_notify()
241 if (cee->get_stats_pending) { in bfa_cee_notify()
242 cee->get_stats_status = BFA_STATUS_FAILED; in bfa_cee_notify()
243 cee->get_stats_pending = false; in bfa_cee_notify()
244 if (cee->cbfn.get_stats_cbfn) { in bfa_cee_notify()
245 cee->cbfn.get_stats_cbfn( in bfa_cee_notify()
246 cee->cbfn.get_stats_cbarg, in bfa_cee_notify()
250 if (cee->reset_stats_pending) { in bfa_cee_notify()
251 cee->reset_stats_status = BFA_STATUS_FAILED; in bfa_cee_notify()
252 cee->reset_stats_pending = false; in bfa_cee_notify()
253 if (cee->cbfn.reset_stats_cbfn) { in bfa_cee_notify()
254 cee->cbfn.reset_stats_cbfn( in bfa_cee_notify()
255 cee->cbfn.reset_stats_cbarg, in bfa_cee_notify()
276 bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, in bfa_nw_cee_attach() argument
279 BUG_ON(!(cee != NULL)); in bfa_nw_cee_attach()
280 cee->dev = dev; in bfa_nw_cee_attach()
281 cee->ioc = ioc; in bfa_nw_cee_attach()
283 bfa_nw_ioc_mbox_regisr(cee->ioc, BFI_MC_CEE, bfa_cee_isr, cee); in bfa_nw_cee_attach()
284 bfa_q_qe_init(&cee->ioc_notify); 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()