Lines Matching refs:ioceth
156 bna_bfi_attr_get_rsp(struct bna_ioceth *ioceth, in bna_bfi_attr_get_rsp() argument
166 if (!ioceth->attr.fw_query_complete) { in bna_bfi_attr_get_rsp()
167 ioceth->attr.num_txq = ntohl(rsp->max_cfg); in bna_bfi_attr_get_rsp()
168 ioceth->attr.num_rxp = ntohl(rsp->max_cfg); in bna_bfi_attr_get_rsp()
169 ioceth->attr.num_ucmac = ntohl(rsp->max_ucmac); in bna_bfi_attr_get_rsp()
170 ioceth->attr.num_mcmac = BFI_ENET_MAX_MCAM; in bna_bfi_attr_get_rsp()
171 ioceth->attr.max_rit_size = ntohl(rsp->rit_size); in bna_bfi_attr_get_rsp()
172 ioceth->attr.fw_query_complete = true; in bna_bfi_attr_get_rsp()
175 bfa_fsm_send_event(ioceth, IOCETH_E_ENET_ATTR_RESP); in bna_bfi_attr_get_rsp()
258 bfa_nw_ioc_error_isr(&bna->ioceth.ioc); in bna_err_handler()
269 bfa_nw_ioc_mbox_isr(&bna->ioceth.ioc); in bna_mbox_handler()
346 bna_bfi_attr_get_rsp(&bna->ioceth, msghdr); in bna_msgq_rsp_handler()
1217 struct bna_ioceth *ioceth = (struct bna_ioceth *)arg; in bna_ioceth_cb_enet_stopped() local
1219 bfa_fsm_send_event(ioceth, IOCETH_E_ENET_STOPPED); in bna_ioceth_cb_enet_stopped()
1226 enet->stop_cbarg = &enet->bna->ioceth; in bna_enet_stop()
1309 bfa_nw_ioc_get_mac(&enet->bna->ioceth.ioc, mac); in bna_enet_perm_mac_get()
1362 static void bna_bfi_attr_get(struct bna_ioceth *ioceth);
1382 bna_ioceth_sm_stopped_entry(struct bna_ioceth *ioceth) in bna_ioceth_sm_stopped_entry() argument
1384 call_ioceth_stop_cbfn(ioceth); in bna_ioceth_sm_stopped_entry()
1388 bna_ioceth_sm_stopped(struct bna_ioceth *ioceth, in bna_ioceth_sm_stopped() argument
1393 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_ready_wait); in bna_ioceth_sm_stopped()
1394 bfa_nw_ioc_enable(&ioceth->ioc); in bna_ioceth_sm_stopped()
1398 bfa_fsm_set_state(ioceth, bna_ioceth_sm_stopped); in bna_ioceth_sm_stopped()
1402 enable_mbox_intr(ioceth); in bna_ioceth_sm_stopped()
1406 disable_mbox_intr(ioceth); in bna_ioceth_sm_stopped()
1407 bfa_fsm_set_state(ioceth, bna_ioceth_sm_failed); in bna_ioceth_sm_stopped()
1416 bna_ioceth_sm_ioc_ready_wait_entry(struct bna_ioceth *ioceth) in bna_ioceth_sm_ioc_ready_wait_entry() argument
1425 bna_ioceth_sm_ioc_ready_wait(struct bna_ioceth *ioceth, in bna_ioceth_sm_ioc_ready_wait() argument
1430 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_disable_wait); in bna_ioceth_sm_ioc_ready_wait()
1431 bfa_nw_ioc_disable(&ioceth->ioc); in bna_ioceth_sm_ioc_ready_wait()
1435 enable_mbox_intr(ioceth); in bna_ioceth_sm_ioc_ready_wait()
1439 disable_mbox_intr(ioceth); in bna_ioceth_sm_ioc_ready_wait()
1440 bfa_fsm_set_state(ioceth, bna_ioceth_sm_failed); in bna_ioceth_sm_ioc_ready_wait()
1444 bfa_fsm_set_state(ioceth, bna_ioceth_sm_enet_attr_wait); in bna_ioceth_sm_ioc_ready_wait()
1453 bna_ioceth_sm_enet_attr_wait_entry(struct bna_ioceth *ioceth) in bna_ioceth_sm_enet_attr_wait_entry() argument
1455 bna_bfi_attr_get(ioceth); in bna_ioceth_sm_enet_attr_wait_entry()
1459 bna_ioceth_sm_enet_attr_wait(struct bna_ioceth *ioceth, in bna_ioceth_sm_enet_attr_wait() argument
1464 bfa_fsm_set_state(ioceth, bna_ioceth_sm_last_resp_wait); in bna_ioceth_sm_enet_attr_wait()
1468 disable_mbox_intr(ioceth); in bna_ioceth_sm_enet_attr_wait()
1469 bfa_fsm_set_state(ioceth, bna_ioceth_sm_failed); in bna_ioceth_sm_enet_attr_wait()
1473 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ready); in bna_ioceth_sm_enet_attr_wait()
1482 bna_ioceth_sm_ready_entry(struct bna_ioceth *ioceth) in bna_ioceth_sm_ready_entry() argument
1484 bna_enet_start(&ioceth->bna->enet); in bna_ioceth_sm_ready_entry()
1485 bna_stats_mod_start(&ioceth->bna->stats_mod); in bna_ioceth_sm_ready_entry()
1486 bnad_cb_ioceth_ready(ioceth->bna->bnad); in bna_ioceth_sm_ready_entry()
1490 bna_ioceth_sm_ready(struct bna_ioceth *ioceth, enum bna_ioceth_event event) in bna_ioceth_sm_ready() argument
1494 bfa_fsm_set_state(ioceth, bna_ioceth_sm_enet_stop_wait); in bna_ioceth_sm_ready()
1498 disable_mbox_intr(ioceth); in bna_ioceth_sm_ready()
1499 bna_enet_fail(&ioceth->bna->enet); in bna_ioceth_sm_ready()
1500 bna_stats_mod_fail(&ioceth->bna->stats_mod); in bna_ioceth_sm_ready()
1501 bfa_fsm_set_state(ioceth, bna_ioceth_sm_failed); in bna_ioceth_sm_ready()
1510 bna_ioceth_sm_last_resp_wait_entry(struct bna_ioceth *ioceth) in bna_ioceth_sm_last_resp_wait_entry() argument
1515 bna_ioceth_sm_last_resp_wait(struct bna_ioceth *ioceth, in bna_ioceth_sm_last_resp_wait() argument
1520 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_disable_wait); in bna_ioceth_sm_last_resp_wait()
1521 disable_mbox_intr(ioceth); in bna_ioceth_sm_last_resp_wait()
1522 bfa_nw_ioc_disable(&ioceth->ioc); in bna_ioceth_sm_last_resp_wait()
1526 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_disable_wait); in bna_ioceth_sm_last_resp_wait()
1527 bfa_nw_ioc_disable(&ioceth->ioc); in bna_ioceth_sm_last_resp_wait()
1536 bna_ioceth_sm_enet_stop_wait_entry(struct bna_ioceth *ioceth) in bna_ioceth_sm_enet_stop_wait_entry() argument
1538 bna_stats_mod_stop(&ioceth->bna->stats_mod); in bna_ioceth_sm_enet_stop_wait_entry()
1539 bna_enet_stop(&ioceth->bna->enet); in bna_ioceth_sm_enet_stop_wait_entry()
1543 bna_ioceth_sm_enet_stop_wait(struct bna_ioceth *ioceth, in bna_ioceth_sm_enet_stop_wait() argument
1548 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_disable_wait); in bna_ioceth_sm_enet_stop_wait()
1549 disable_mbox_intr(ioceth); in bna_ioceth_sm_enet_stop_wait()
1550 bna_enet_fail(&ioceth->bna->enet); in bna_ioceth_sm_enet_stop_wait()
1551 bna_stats_mod_fail(&ioceth->bna->stats_mod); in bna_ioceth_sm_enet_stop_wait()
1552 bfa_nw_ioc_disable(&ioceth->ioc); in bna_ioceth_sm_enet_stop_wait()
1556 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_disable_wait); in bna_ioceth_sm_enet_stop_wait()
1557 bfa_nw_ioc_disable(&ioceth->ioc); in bna_ioceth_sm_enet_stop_wait()
1566 bna_ioceth_sm_ioc_disable_wait_entry(struct bna_ioceth *ioceth) in bna_ioceth_sm_ioc_disable_wait_entry() argument
1571 bna_ioceth_sm_ioc_disable_wait(struct bna_ioceth *ioceth, in bna_ioceth_sm_ioc_disable_wait() argument
1576 disable_mbox_intr(ioceth); in bna_ioceth_sm_ioc_disable_wait()
1577 bfa_fsm_set_state(ioceth, bna_ioceth_sm_stopped); in bna_ioceth_sm_ioc_disable_wait()
1591 bna_ioceth_sm_failed_entry(struct bna_ioceth *ioceth) in bna_ioceth_sm_failed_entry() argument
1593 bnad_cb_ioceth_failed(ioceth->bna->bnad); in bna_ioceth_sm_failed_entry()
1597 bna_ioceth_sm_failed(struct bna_ioceth *ioceth, in bna_ioceth_sm_failed() argument
1602 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_disable_wait); in bna_ioceth_sm_failed()
1603 bfa_nw_ioc_disable(&ioceth->ioc); in bna_ioceth_sm_failed()
1607 enable_mbox_intr(ioceth); in bna_ioceth_sm_failed()
1608 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_ready_wait); in bna_ioceth_sm_failed()
1620 bna_bfi_attr_get(struct bna_ioceth *ioceth) in bna_bfi_attr_get() argument
1622 struct bfi_enet_attr_req *attr_req = &ioceth->attr_req; in bna_bfi_attr_get()
1628 bfa_msgq_cmd_set(&ioceth->msgq_cmd, NULL, NULL, in bna_bfi_attr_get()
1630 bfa_msgq_cmd_post(&ioceth->bna->msgq, &ioceth->msgq_cmd); in bna_bfi_attr_get()
1638 struct bna_ioceth *ioceth = (struct bna_ioceth *)arg; in bna_cb_ioceth_enable() local
1641 bfa_fsm_send_event(ioceth, IOCETH_E_IOC_FAILED); in bna_cb_ioceth_enable()
1643 bfa_fsm_send_event(ioceth, IOCETH_E_IOC_READY); in bna_cb_ioceth_enable()
1649 struct bna_ioceth *ioceth = (struct bna_ioceth *)arg; in bna_cb_ioceth_disable() local
1651 bfa_fsm_send_event(ioceth, IOCETH_E_IOC_DISABLED); in bna_cb_ioceth_disable()
1657 struct bna_ioceth *ioceth = (struct bna_ioceth *)arg; in bna_cb_ioceth_hbfail() local
1659 bfa_fsm_send_event(ioceth, IOCETH_E_IOC_FAILED); in bna_cb_ioceth_hbfail()
1665 struct bna_ioceth *ioceth = (struct bna_ioceth *)arg; in bna_cb_ioceth_reset() local
1667 bfa_fsm_send_event(ioceth, IOCETH_E_IOC_RESET); in bna_cb_ioceth_reset()
1677 static void bna_attr_init(struct bna_ioceth *ioceth) in bna_attr_init() argument
1679 ioceth->attr.num_txq = BFI_ENET_DEF_TXQ; in bna_attr_init()
1680 ioceth->attr.num_rxp = BFI_ENET_DEF_RXP; in bna_attr_init()
1681 ioceth->attr.num_ucmac = BFI_ENET_DEF_UCAM; in bna_attr_init()
1682 ioceth->attr.num_mcmac = BFI_ENET_MAX_MCAM; in bna_attr_init()
1683 ioceth->attr.max_rit_size = BFI_ENET_DEF_RITSZ; in bna_attr_init()
1684 ioceth->attr.fw_query_complete = false; in bna_attr_init()
1688 bna_ioceth_init(struct bna_ioceth *ioceth, struct bna *bna, in bna_ioceth_init() argument
1694 ioceth->bna = bna; in bna_ioceth_init()
1701 bfa_nw_ioc_attach(&ioceth->ioc, ioceth, &bna_ioceth_cbfn); in bna_ioceth_init()
1702 bfa_nw_ioc_pci_init(&ioceth->ioc, &bna->pcidev, BFI_PCIFN_CLASS_ETH); in bna_ioceth_init()
1707 bfa_nw_ioc_mem_claim(&ioceth->ioc, kva, dma); in bna_ioceth_init()
1710 bfa_nw_ioc_debug_memclaim(&ioceth->ioc, kva); in bna_ioceth_init()
1719 bfa_nw_cee_attach(&bna->cee, &ioceth->ioc, bna); in bna_ioceth_init()
1724 bfa_nw_flash_attach(&bna->flash, &ioceth->ioc, bna); in bna_ioceth_init()
1729 bfa_msgq_attach(&bna->msgq, &ioceth->ioc); in bna_ioceth_init()
1735 ioceth->stop_cbfn = NULL; in bna_ioceth_init()
1736 ioceth->stop_cbarg = NULL; in bna_ioceth_init()
1738 bna_attr_init(ioceth); in bna_ioceth_init()
1740 bfa_fsm_set_state(ioceth, bna_ioceth_sm_stopped); in bna_ioceth_init()
1744 bna_ioceth_uninit(struct bna_ioceth *ioceth) in bna_ioceth_uninit() argument
1746 bfa_nw_ioc_detach(&ioceth->ioc); in bna_ioceth_uninit()
1748 ioceth->bna = NULL; in bna_ioceth_uninit()
1752 bna_ioceth_enable(struct bna_ioceth *ioceth) in bna_ioceth_enable() argument
1754 if (ioceth->fsm == bna_ioceth_sm_ready) { in bna_ioceth_enable()
1755 bnad_cb_ioceth_ready(ioceth->bna->bnad); in bna_ioceth_enable()
1759 if (ioceth->fsm == bna_ioceth_sm_stopped) in bna_ioceth_enable()
1760 bfa_fsm_send_event(ioceth, IOCETH_E_ENABLE); in bna_ioceth_enable()
1764 bna_ioceth_disable(struct bna_ioceth *ioceth, enum bna_cleanup_type type) in bna_ioceth_disable() argument
1767 bnad_cb_ioceth_disabled(ioceth->bna->bnad); in bna_ioceth_disable()
1771 ioceth->stop_cbfn = bnad_cb_ioceth_disabled; in bna_ioceth_disable()
1772 ioceth->stop_cbarg = ioceth->bna->bnad; in bna_ioceth_disable()
1774 bfa_fsm_send_event(ioceth, IOCETH_E_DISABLE); in bna_ioceth_disable()
1787 for (i = 0; i < bna->ioceth.attr.num_ucmac; i++) in bna_ucam_mod_init()
1792 for (; i < (bna->ioceth.attr.num_ucmac * 2); i++) in bna_ucam_mod_init()
1814 for (i = 0; i < bna->ioceth.attr.num_mcmac; i++) in bna_mcam_mod_init()
1821 for (i = 0; i < bna->ioceth.attr.num_mcmac; i++) in bna_mcam_mod_init()
1827 for (; i < (bna->ioceth.attr.num_mcmac * 2); i++) in bna_mcam_mod_init()
1898 struct bna_attr *attr = &bna->ioceth.attr; in bna_mod_res_req()
1982 bna_ioceth_init(&bna->ioceth, bna, res_info); in bna_init()
2020 bna_ioceth_uninit(&bna->ioceth); in bna_uninit()
2028 if (bna->ioceth.attr.fw_query_complete && in bna_num_txq_set()
2029 (num_txq <= bna->ioceth.attr.num_txq)) { in bna_num_txq_set()
2030 bna->ioceth.attr.num_txq = num_txq; in bna_num_txq_set()
2040 if (bna->ioceth.attr.fw_query_complete && in bna_num_rxp_set()
2041 (num_rxp <= bna->ioceth.attr.num_rxp)) { in bna_num_rxp_set()
2042 bna->ioceth.attr.num_rxp = num_rxp; in bna_num_rxp_set()