Lines Matching refs:ablk

3280 	struct bfa_ablk_s *ablk = (struct bfa_ablk_s *)cbarg;  in bfa_ablk_isr()  local
3285 bfa_trc(ablk->ioc, msg->mh.msg_id); in bfa_ablk_isr()
3290 memcpy(ablk->cfg, ablk->dma_addr.kva, in bfa_ablk_isr()
3292 bfa_ablk_config_swap(ablk->cfg); in bfa_ablk_isr()
3293 ablk->cfg = NULL; in bfa_ablk_isr()
3300 ablk->ioc->port_mode_cfg = rsp->port_mode; in bfa_ablk_isr()
3311 *(ablk->pcifn) = rsp->pcifn; in bfa_ablk_isr()
3312 ablk->pcifn = NULL; in bfa_ablk_isr()
3319 ablk->busy = BFA_FALSE; in bfa_ablk_isr()
3320 if (ablk->cbfn) { in bfa_ablk_isr()
3321 cbfn = ablk->cbfn; in bfa_ablk_isr()
3322 ablk->cbfn = NULL; in bfa_ablk_isr()
3323 cbfn(ablk->cbarg, rsp->status); in bfa_ablk_isr()
3330 struct bfa_ablk_s *ablk = (struct bfa_ablk_s *)cbarg; in bfa_ablk_notify() local
3332 bfa_trc(ablk->ioc, event); in bfa_ablk_notify()
3336 WARN_ON(ablk->busy != BFA_FALSE); in bfa_ablk_notify()
3342 ablk->pcifn = NULL; in bfa_ablk_notify()
3343 if (ablk->busy) { in bfa_ablk_notify()
3344 if (ablk->cbfn) in bfa_ablk_notify()
3345 ablk->cbfn(ablk->cbarg, BFA_STATUS_FAILED); in bfa_ablk_notify()
3346 ablk->cbfn = NULL; in bfa_ablk_notify()
3347 ablk->busy = BFA_FALSE; in bfa_ablk_notify()
3364 bfa_ablk_memclaim(struct bfa_ablk_s *ablk, u8 *dma_kva, u64 dma_pa) in bfa_ablk_memclaim() argument
3366 ablk->dma_addr.kva = dma_kva; in bfa_ablk_memclaim()
3367 ablk->dma_addr.pa = dma_pa; in bfa_ablk_memclaim()
3371 bfa_ablk_attach(struct bfa_ablk_s *ablk, struct bfa_ioc_s *ioc) in bfa_ablk_attach() argument
3373 ablk->ioc = ioc; in bfa_ablk_attach()
3375 bfa_ioc_mbox_regisr(ablk->ioc, BFI_MC_ABLK, bfa_ablk_isr, ablk); in bfa_ablk_attach()
3376 bfa_q_qe_init(&ablk->ioc_notify); in bfa_ablk_attach()
3377 bfa_ioc_notify_init(&ablk->ioc_notify, bfa_ablk_notify, ablk); in bfa_ablk_attach()
3378 list_add_tail(&ablk->ioc_notify.qe, &ablk->ioc->notify_q); in bfa_ablk_attach()
3382 bfa_ablk_query(struct bfa_ablk_s *ablk, struct bfa_ablk_cfg_s *ablk_cfg, in bfa_ablk_query() argument
3389 if (!bfa_ioc_is_operational(ablk->ioc)) { in bfa_ablk_query()
3390 bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); in bfa_ablk_query()
3394 if (ablk->busy) { in bfa_ablk_query()
3395 bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); in bfa_ablk_query()
3399 ablk->cfg = ablk_cfg; in bfa_ablk_query()
3400 ablk->cbfn = cbfn; in bfa_ablk_query()
3401 ablk->cbarg = cbarg; in bfa_ablk_query()
3402 ablk->busy = BFA_TRUE; in bfa_ablk_query()
3404 m = (struct bfi_ablk_h2i_query_s *)ablk->mb.msg; in bfa_ablk_query()
3406 bfa_ioc_portid(ablk->ioc)); in bfa_ablk_query()
3407 bfa_dma_be_addr_set(m->addr, ablk->dma_addr.pa); in bfa_ablk_query()
3408 bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); in bfa_ablk_query()
3414 bfa_ablk_pf_create(struct bfa_ablk_s *ablk, u16 *pcifn, in bfa_ablk_pf_create() argument
3421 if (!bfa_ioc_is_operational(ablk->ioc)) { in bfa_ablk_pf_create()
3422 bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); in bfa_ablk_pf_create()
3426 if (ablk->busy) { in bfa_ablk_pf_create()
3427 bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); in bfa_ablk_pf_create()
3431 ablk->pcifn = pcifn; in bfa_ablk_pf_create()
3432 ablk->cbfn = cbfn; in bfa_ablk_pf_create()
3433 ablk->cbarg = cbarg; in bfa_ablk_pf_create()
3434 ablk->busy = BFA_TRUE; in bfa_ablk_pf_create()
3436 m = (struct bfi_ablk_h2i_pf_req_s *)ablk->mb.msg; in bfa_ablk_pf_create()
3438 bfa_ioc_portid(ablk->ioc)); in bfa_ablk_pf_create()
3443 bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); in bfa_ablk_pf_create()
3449 bfa_ablk_pf_delete(struct bfa_ablk_s *ablk, int pcifn, in bfa_ablk_pf_delete() argument
3454 if (!bfa_ioc_is_operational(ablk->ioc)) { in bfa_ablk_pf_delete()
3455 bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); in bfa_ablk_pf_delete()
3459 if (ablk->busy) { in bfa_ablk_pf_delete()
3460 bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); in bfa_ablk_pf_delete()
3464 ablk->cbfn = cbfn; in bfa_ablk_pf_delete()
3465 ablk->cbarg = cbarg; in bfa_ablk_pf_delete()
3466 ablk->busy = BFA_TRUE; in bfa_ablk_pf_delete()
3468 m = (struct bfi_ablk_h2i_pf_req_s *)ablk->mb.msg; in bfa_ablk_pf_delete()
3470 bfa_ioc_portid(ablk->ioc)); in bfa_ablk_pf_delete()
3472 bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); in bfa_ablk_pf_delete()
3478 bfa_ablk_adapter_config(struct bfa_ablk_s *ablk, enum bfa_mode_s mode, in bfa_ablk_adapter_config() argument
3483 if (!bfa_ioc_is_operational(ablk->ioc)) { in bfa_ablk_adapter_config()
3484 bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); in bfa_ablk_adapter_config()
3488 if (ablk->busy) { in bfa_ablk_adapter_config()
3489 bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); in bfa_ablk_adapter_config()
3493 ablk->cbfn = cbfn; in bfa_ablk_adapter_config()
3494 ablk->cbarg = cbarg; in bfa_ablk_adapter_config()
3495 ablk->busy = BFA_TRUE; in bfa_ablk_adapter_config()
3497 m = (struct bfi_ablk_h2i_cfg_req_s *)ablk->mb.msg; in bfa_ablk_adapter_config()
3499 bfa_ioc_portid(ablk->ioc)); in bfa_ablk_adapter_config()
3503 bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); in bfa_ablk_adapter_config()
3509 bfa_ablk_port_config(struct bfa_ablk_s *ablk, int port, enum bfa_mode_s mode, in bfa_ablk_port_config() argument
3514 if (!bfa_ioc_is_operational(ablk->ioc)) { in bfa_ablk_port_config()
3515 bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); in bfa_ablk_port_config()
3519 if (ablk->busy) { in bfa_ablk_port_config()
3520 bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); in bfa_ablk_port_config()
3524 ablk->cbfn = cbfn; in bfa_ablk_port_config()
3525 ablk->cbarg = cbarg; in bfa_ablk_port_config()
3526 ablk->busy = BFA_TRUE; in bfa_ablk_port_config()
3528 m = (struct bfi_ablk_h2i_cfg_req_s *)ablk->mb.msg; in bfa_ablk_port_config()
3530 bfa_ioc_portid(ablk->ioc)); in bfa_ablk_port_config()
3535 bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); in bfa_ablk_port_config()
3541 bfa_ablk_pf_update(struct bfa_ablk_s *ablk, int pcifn, u16 bw_min, in bfa_ablk_pf_update() argument
3546 if (!bfa_ioc_is_operational(ablk->ioc)) { in bfa_ablk_pf_update()
3547 bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); in bfa_ablk_pf_update()
3551 if (ablk->busy) { in bfa_ablk_pf_update()
3552 bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); in bfa_ablk_pf_update()
3556 ablk->cbfn = cbfn; in bfa_ablk_pf_update()
3557 ablk->cbarg = cbarg; in bfa_ablk_pf_update()
3558 ablk->busy = BFA_TRUE; in bfa_ablk_pf_update()
3560 m = (struct bfi_ablk_h2i_pf_req_s *)ablk->mb.msg; in bfa_ablk_pf_update()
3562 bfa_ioc_portid(ablk->ioc)); in bfa_ablk_pf_update()
3566 bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); in bfa_ablk_pf_update()
3572 bfa_ablk_optrom_en(struct bfa_ablk_s *ablk, bfa_ablk_cbfn_t cbfn, void *cbarg) in bfa_ablk_optrom_en() argument
3576 if (!bfa_ioc_is_operational(ablk->ioc)) { in bfa_ablk_optrom_en()
3577 bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); in bfa_ablk_optrom_en()
3581 if (ablk->busy) { in bfa_ablk_optrom_en()
3582 bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); in bfa_ablk_optrom_en()
3586 ablk->cbfn = cbfn; in bfa_ablk_optrom_en()
3587 ablk->cbarg = cbarg; in bfa_ablk_optrom_en()
3588 ablk->busy = BFA_TRUE; in bfa_ablk_optrom_en()
3590 m = (struct bfi_ablk_h2i_optrom_s *)ablk->mb.msg; in bfa_ablk_optrom_en()
3592 bfa_ioc_portid(ablk->ioc)); in bfa_ablk_optrom_en()
3593 bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); in bfa_ablk_optrom_en()
3599 bfa_ablk_optrom_dis(struct bfa_ablk_s *ablk, bfa_ablk_cbfn_t cbfn, void *cbarg) in bfa_ablk_optrom_dis() argument
3603 if (!bfa_ioc_is_operational(ablk->ioc)) { in bfa_ablk_optrom_dis()
3604 bfa_trc(ablk->ioc, BFA_STATUS_IOC_FAILURE); in bfa_ablk_optrom_dis()
3608 if (ablk->busy) { in bfa_ablk_optrom_dis()
3609 bfa_trc(ablk->ioc, BFA_STATUS_DEVBUSY); in bfa_ablk_optrom_dis()
3613 ablk->cbfn = cbfn; in bfa_ablk_optrom_dis()
3614 ablk->cbarg = cbarg; in bfa_ablk_optrom_dis()
3615 ablk->busy = BFA_TRUE; in bfa_ablk_optrom_dis()
3617 m = (struct bfi_ablk_h2i_optrom_s *)ablk->mb.msg; in bfa_ablk_optrom_dis()
3619 bfa_ioc_portid(ablk->ioc)); in bfa_ablk_optrom_dis()
3620 bfa_ioc_mbox_queue(ablk->ioc, &ablk->mb); in bfa_ablk_optrom_dis()