Searched refs:ioceth (Results 1 - 8 of 8) sorted by relevance

/linux-4.4.14/drivers/net/ethernet/brocade/bna/
H A Dbna_enet.c164 bna_bfi_attr_get_rsp(struct bna_ioceth *ioceth, bna_bfi_attr_get_rsp() argument
174 if (!ioceth->attr.fw_query_complete) { bna_bfi_attr_get_rsp()
175 ioceth->attr.num_txq = ntohl(rsp->max_cfg); bna_bfi_attr_get_rsp()
176 ioceth->attr.num_rxp = ntohl(rsp->max_cfg); bna_bfi_attr_get_rsp()
177 ioceth->attr.num_ucmac = ntohl(rsp->max_ucmac); bna_bfi_attr_get_rsp()
178 ioceth->attr.num_mcmac = BFI_ENET_MAX_MCAM; bna_bfi_attr_get_rsp()
179 ioceth->attr.max_rit_size = ntohl(rsp->rit_size); bna_bfi_attr_get_rsp()
180 ioceth->attr.fw_query_complete = true; bna_bfi_attr_get_rsp()
183 bfa_fsm_send_event(ioceth, IOCETH_E_ENET_ATTR_RESP); bna_bfi_attr_get_rsp()
266 bfa_nw_ioc_error_isr(&bna->ioceth.ioc); bna_err_handler()
277 bfa_nw_ioc_mbox_isr(&bna->ioceth.ioc); bna_mbox_handler()
354 bna_bfi_attr_get_rsp(&bna->ioceth, msghdr); bna_msgq_rsp_handler()
1225 struct bna_ioceth *ioceth = (struct bna_ioceth *)arg; bna_ioceth_cb_enet_stopped() local
1227 bfa_fsm_send_event(ioceth, IOCETH_E_ENET_STOPPED); bna_ioceth_cb_enet_stopped()
1234 enet->stop_cbarg = &enet->bna->ioceth; bna_enet_stop()
1317 bfa_nw_ioc_get_mac(&enet->bna->ioceth.ioc, mac); bna_enet_perm_mac_get()
1370 static void bna_bfi_attr_get(struct bna_ioceth *ioceth);
1390 bna_ioceth_sm_stopped_entry(struct bna_ioceth *ioceth) bna_ioceth_sm_stopped_entry() argument
1392 call_ioceth_stop_cbfn(ioceth); bna_ioceth_sm_stopped_entry()
1396 bna_ioceth_sm_stopped(struct bna_ioceth *ioceth, bna_ioceth_sm_stopped() argument
1401 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_ready_wait); bna_ioceth_sm_stopped()
1402 bfa_nw_ioc_enable(&ioceth->ioc); bna_ioceth_sm_stopped()
1406 bfa_fsm_set_state(ioceth, bna_ioceth_sm_stopped); bna_ioceth_sm_stopped()
1410 enable_mbox_intr(ioceth); bna_ioceth_sm_stopped()
1414 disable_mbox_intr(ioceth); bna_ioceth_sm_stopped()
1415 bfa_fsm_set_state(ioceth, bna_ioceth_sm_failed); bna_ioceth_sm_stopped()
1424 bna_ioceth_sm_ioc_ready_wait_entry(struct bna_ioceth *ioceth) bna_ioceth_sm_ioc_ready_wait_entry() argument
1433 bna_ioceth_sm_ioc_ready_wait(struct bna_ioceth *ioceth, bna_ioceth_sm_ioc_ready_wait() argument
1438 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_disable_wait); bna_ioceth_sm_ioc_ready_wait()
1439 bfa_nw_ioc_disable(&ioceth->ioc); bna_ioceth_sm_ioc_ready_wait()
1443 enable_mbox_intr(ioceth); bna_ioceth_sm_ioc_ready_wait()
1447 disable_mbox_intr(ioceth); bna_ioceth_sm_ioc_ready_wait()
1448 bfa_fsm_set_state(ioceth, bna_ioceth_sm_failed); bna_ioceth_sm_ioc_ready_wait()
1452 bfa_fsm_set_state(ioceth, bna_ioceth_sm_enet_attr_wait); bna_ioceth_sm_ioc_ready_wait()
1461 bna_ioceth_sm_enet_attr_wait_entry(struct bna_ioceth *ioceth) bna_ioceth_sm_enet_attr_wait_entry() argument
1463 bna_bfi_attr_get(ioceth); bna_ioceth_sm_enet_attr_wait_entry()
1467 bna_ioceth_sm_enet_attr_wait(struct bna_ioceth *ioceth, bna_ioceth_sm_enet_attr_wait() argument
1472 bfa_fsm_set_state(ioceth, bna_ioceth_sm_last_resp_wait); bna_ioceth_sm_enet_attr_wait()
1476 disable_mbox_intr(ioceth); bna_ioceth_sm_enet_attr_wait()
1477 bfa_fsm_set_state(ioceth, bna_ioceth_sm_failed); bna_ioceth_sm_enet_attr_wait()
1481 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ready); bna_ioceth_sm_enet_attr_wait()
1490 bna_ioceth_sm_ready_entry(struct bna_ioceth *ioceth) bna_ioceth_sm_ready_entry() argument
1492 bna_enet_start(&ioceth->bna->enet); bna_ioceth_sm_ready_entry()
1493 bna_stats_mod_start(&ioceth->bna->stats_mod); bna_ioceth_sm_ready_entry()
1494 bnad_cb_ioceth_ready(ioceth->bna->bnad); bna_ioceth_sm_ready_entry()
1498 bna_ioceth_sm_ready(struct bna_ioceth *ioceth, enum bna_ioceth_event event) bna_ioceth_sm_ready() argument
1502 bfa_fsm_set_state(ioceth, bna_ioceth_sm_enet_stop_wait); bna_ioceth_sm_ready()
1506 disable_mbox_intr(ioceth); bna_ioceth_sm_ready()
1507 bna_enet_fail(&ioceth->bna->enet); bna_ioceth_sm_ready()
1508 bna_stats_mod_fail(&ioceth->bna->stats_mod); bna_ioceth_sm_ready()
1509 bfa_fsm_set_state(ioceth, bna_ioceth_sm_failed); bna_ioceth_sm_ready()
1518 bna_ioceth_sm_last_resp_wait_entry(struct bna_ioceth *ioceth) bna_ioceth_sm_last_resp_wait_entry() argument
1523 bna_ioceth_sm_last_resp_wait(struct bna_ioceth *ioceth, bna_ioceth_sm_last_resp_wait() argument
1528 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_disable_wait); bna_ioceth_sm_last_resp_wait()
1529 disable_mbox_intr(ioceth); bna_ioceth_sm_last_resp_wait()
1530 bfa_nw_ioc_disable(&ioceth->ioc); bna_ioceth_sm_last_resp_wait()
1534 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_disable_wait); bna_ioceth_sm_last_resp_wait()
1535 bfa_nw_ioc_disable(&ioceth->ioc); bna_ioceth_sm_last_resp_wait()
1544 bna_ioceth_sm_enet_stop_wait_entry(struct bna_ioceth *ioceth) bna_ioceth_sm_enet_stop_wait_entry() argument
1546 bna_stats_mod_stop(&ioceth->bna->stats_mod); bna_ioceth_sm_enet_stop_wait_entry()
1547 bna_enet_stop(&ioceth->bna->enet); bna_ioceth_sm_enet_stop_wait_entry()
1551 bna_ioceth_sm_enet_stop_wait(struct bna_ioceth *ioceth, bna_ioceth_sm_enet_stop_wait() argument
1556 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_disable_wait); bna_ioceth_sm_enet_stop_wait()
1557 disable_mbox_intr(ioceth); bna_ioceth_sm_enet_stop_wait()
1558 bna_enet_fail(&ioceth->bna->enet); bna_ioceth_sm_enet_stop_wait()
1559 bna_stats_mod_fail(&ioceth->bna->stats_mod); bna_ioceth_sm_enet_stop_wait()
1560 bfa_nw_ioc_disable(&ioceth->ioc); bna_ioceth_sm_enet_stop_wait()
1564 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_disable_wait); bna_ioceth_sm_enet_stop_wait()
1565 bfa_nw_ioc_disable(&ioceth->ioc); bna_ioceth_sm_enet_stop_wait()
1574 bna_ioceth_sm_ioc_disable_wait_entry(struct bna_ioceth *ioceth) bna_ioceth_sm_ioc_disable_wait_entry() argument
1579 bna_ioceth_sm_ioc_disable_wait(struct bna_ioceth *ioceth, bna_ioceth_sm_ioc_disable_wait() argument
1584 disable_mbox_intr(ioceth); bna_ioceth_sm_ioc_disable_wait()
1585 bfa_fsm_set_state(ioceth, bna_ioceth_sm_stopped); bna_ioceth_sm_ioc_disable_wait()
1599 bna_ioceth_sm_failed_entry(struct bna_ioceth *ioceth) bna_ioceth_sm_failed_entry() argument
1601 bnad_cb_ioceth_failed(ioceth->bna->bnad); bna_ioceth_sm_failed_entry()
1605 bna_ioceth_sm_failed(struct bna_ioceth *ioceth, bna_ioceth_sm_failed() argument
1610 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_disable_wait); bna_ioceth_sm_failed()
1611 bfa_nw_ioc_disable(&ioceth->ioc); bna_ioceth_sm_failed()
1615 enable_mbox_intr(ioceth); bna_ioceth_sm_failed()
1616 bfa_fsm_set_state(ioceth, bna_ioceth_sm_ioc_ready_wait); bna_ioceth_sm_failed()
1628 bna_bfi_attr_get(struct bna_ioceth *ioceth) bna_bfi_attr_get() argument
1630 struct bfi_enet_attr_req *attr_req = &ioceth->attr_req; bna_bfi_attr_get()
1636 bfa_msgq_cmd_set(&ioceth->msgq_cmd, NULL, NULL, bna_bfi_attr_get()
1638 bfa_msgq_cmd_post(&ioceth->bna->msgq, &ioceth->msgq_cmd); bna_bfi_attr_get()
1646 struct bna_ioceth *ioceth = (struct bna_ioceth *)arg; bna_cb_ioceth_enable() local
1649 bfa_fsm_send_event(ioceth, IOCETH_E_IOC_FAILED); bna_cb_ioceth_enable()
1651 bfa_fsm_send_event(ioceth, IOCETH_E_IOC_READY); bna_cb_ioceth_enable()
1657 struct bna_ioceth *ioceth = (struct bna_ioceth *)arg; bna_cb_ioceth_disable() local
1659 bfa_fsm_send_event(ioceth, IOCETH_E_IOC_DISABLED); bna_cb_ioceth_disable()
1665 struct bna_ioceth *ioceth = (struct bna_ioceth *)arg; bna_cb_ioceth_hbfail() local
1667 bfa_fsm_send_event(ioceth, IOCETH_E_IOC_FAILED); bna_cb_ioceth_hbfail()
1673 struct bna_ioceth *ioceth = (struct bna_ioceth *)arg; bna_cb_ioceth_reset() local
1675 bfa_fsm_send_event(ioceth, IOCETH_E_IOC_RESET); bna_cb_ioceth_reset()
1685 static void bna_attr_init(struct bna_ioceth *ioceth) bna_attr_init() argument
1687 ioceth->attr.num_txq = BFI_ENET_DEF_TXQ; bna_attr_init()
1688 ioceth->attr.num_rxp = BFI_ENET_DEF_RXP; bna_attr_init()
1689 ioceth->attr.num_ucmac = BFI_ENET_DEF_UCAM; bna_attr_init()
1690 ioceth->attr.num_mcmac = BFI_ENET_MAX_MCAM; bna_attr_init()
1691 ioceth->attr.max_rit_size = BFI_ENET_DEF_RITSZ; bna_attr_init()
1692 ioceth->attr.fw_query_complete = false; bna_attr_init()
1696 bna_ioceth_init(struct bna_ioceth *ioceth, struct bna *bna, bna_ioceth_init() argument
1702 ioceth->bna = bna; bna_ioceth_init()
1709 bfa_nw_ioc_attach(&ioceth->ioc, ioceth, &bna_ioceth_cbfn); bna_ioceth_init()
1710 bfa_nw_ioc_pci_init(&ioceth->ioc, &bna->pcidev, BFI_PCIFN_CLASS_ETH); bna_ioceth_init()
1715 bfa_nw_ioc_mem_claim(&ioceth->ioc, kva, dma); bna_ioceth_init()
1718 bfa_nw_ioc_debug_memclaim(&ioceth->ioc, kva); bna_ioceth_init()
1727 bfa_nw_cee_attach(&bna->cee, &ioceth->ioc, bna); bna_ioceth_init()
1732 bfa_nw_flash_attach(&bna->flash, &ioceth->ioc, bna); bna_ioceth_init()
1737 bfa_msgq_attach(&bna->msgq, &ioceth->ioc); bna_ioceth_init()
1743 ioceth->stop_cbfn = NULL; bna_ioceth_init()
1744 ioceth->stop_cbarg = NULL; bna_ioceth_init()
1746 bna_attr_init(ioceth); bna_ioceth_init()
1748 bfa_fsm_set_state(ioceth, bna_ioceth_sm_stopped); bna_ioceth_init()
1752 bna_ioceth_uninit(struct bna_ioceth *ioceth) bna_ioceth_uninit() argument
1754 bfa_nw_ioc_detach(&ioceth->ioc); bna_ioceth_uninit()
1756 ioceth->bna = NULL; bna_ioceth_uninit()
1760 bna_ioceth_enable(struct bna_ioceth *ioceth) bna_ioceth_enable() argument
1762 if (ioceth->fsm == (bfa_fsm_t)bna_ioceth_sm_ready) { bna_ioceth_enable()
1763 bnad_cb_ioceth_ready(ioceth->bna->bnad); bna_ioceth_enable()
1767 if (ioceth->fsm == (bfa_fsm_t)bna_ioceth_sm_stopped) bna_ioceth_enable()
1768 bfa_fsm_send_event(ioceth, IOCETH_E_ENABLE); bna_ioceth_enable()
1772 bna_ioceth_disable(struct bna_ioceth *ioceth, enum bna_cleanup_type type) bna_ioceth_disable() argument
1775 bnad_cb_ioceth_disabled(ioceth->bna->bnad); bna_ioceth_disable()
1779 ioceth->stop_cbfn = bnad_cb_ioceth_disabled; bna_ioceth_disable()
1780 ioceth->stop_cbarg = ioceth->bna->bnad; bna_ioceth_disable()
1782 bfa_fsm_send_event(ioceth, IOCETH_E_DISABLE); bna_ioceth_disable()
1795 for (i = 0; i < bna->ioceth.attr.num_ucmac; i++) bna_ucam_mod_init()
1800 for (i = i; i < (bna->ioceth.attr.num_ucmac * 2); i++) bna_ucam_mod_init()
1822 for (i = 0; i < bna->ioceth.attr.num_mcmac; i++) bna_mcam_mod_init()
1829 for (i = 0; i < bna->ioceth.attr.num_mcmac; i++) bna_mcam_mod_init()
1835 for (i = i; i < (bna->ioceth.attr.num_mcmac * 2); i++) bna_mcam_mod_init()
1906 struct bna_attr *attr = &bna->ioceth.attr; bna_mod_res_req()
1990 bna_ioceth_init(&bna->ioceth, bna, res_info); bna_init()
2028 bna_ioceth_uninit(&bna->ioceth); bna_uninit()
2036 if (bna->ioceth.attr.fw_query_complete && bna_num_txq_set()
2037 (num_txq <= bna->ioceth.attr.num_txq)) { bna_num_txq_set()
2038 bna->ioceth.attr.num_txq = num_txq; bna_num_txq_set()
2048 if (bna->ioceth.attr.fw_query_complete && bna_num_rxp_set()
2049 (num_rxp <= bna->ioceth.attr.num_rxp)) { bna_num_rxp_set()
2050 bna->ioceth.attr.num_rxp = num_rxp; bna_num_rxp_set()
H A Dbna_hw_defs.h140 #define bna_port_id_get(_bna) ((_bna)->ioceth.ioc.port_id)
165 init_halt = readl((_bna)->ioceth.ioc.ioc_regs.ll_halt); \
167 writel(init_halt, (_bna)->ioceth.ioc.ioc_regs.ll_halt); \
168 init_halt = readl((_bna)->ioceth.ioc.ioc_regs.ll_halt); \
H A Dbnad_debugfs.c70 rc = bfa_nw_ioc_debug_fwtrc(&bnad->bna.ioceth.ioc, bnad_debugfs_open_fwtrc()
110 rc = bfa_nw_ioc_debug_fwsave(&bnad->bna.ioceth.ioc, bnad_debugfs_open_fwsave()
154 bfa_nw_ioc_get_attr(&bnad->bna.ioceth.ioc, &drvinfo->ioc_attr); bnad_get_debug_drvinfo()
314 struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc; bnad_debugfs_write_regrd()
374 struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc; bnad_debugfs_write_regwr()
H A Dbnad.c1096 * Workaround for first ioceth enable failure & we bnad_cb_tx_resume()
1709 bfa_nw_ioc_timeout(&bnad->bna.ioceth.ioc); bnad_ioc_timeout()
1720 bfa_nw_ioc_hb_check(&bnad->bna.ioceth.ioc); bnad_ioc_hb_check()
1731 bfa_nw_iocpf_timeout(&bnad->bna.ioceth.ioc); bnad_iocpf_timeout()
1742 bfa_nw_iocpf_sem_timeout(&bnad->bna.ioceth.ioc); bnad_iocpf_sem_timeout()
2578 /* Enable / disable ioceth */
2587 bna_ioceth_disable(&bnad->bna.ioceth, BNA_HARD_CLEANUP); bnad_ioceth_disable()
2606 bna_ioceth_enable(&bnad->bna.ioceth); bnad_ioceth_enable()
3556 a) Per ioceth mutes used for serializing configuration
3706 setup_timer(&bnad->bna.ioceth.ioc.ioc_timer, bnad_ioc_timeout, bnad_pci_probe()
3708 setup_timer(&bnad->bna.ioceth.ioc.hb_timer, bnad_ioc_hb_check, bnad_pci_probe()
3710 setup_timer(&bnad->bna.ioceth.ioc.iocpf_timer, bnad_iocpf_timeout, bnad_pci_probe()
3712 setup_timer(&bnad->bna.ioceth.ioc.sem_timer, bnad_iocpf_sem_timeout, bnad_pci_probe()
3780 del_timer_sync(&bnad->bna.ioceth.ioc.ioc_timer); bnad_pci_probe()
3781 del_timer_sync(&bnad->bna.ioceth.ioc.sem_timer); bnad_pci_probe()
3782 del_timer_sync(&bnad->bna.ioceth.ioc.hb_timer); bnad_pci_probe()
3824 del_timer_sync(&bnad->bna.ioceth.ioc.ioc_timer); bnad_pci_remove()
3825 del_timer_sync(&bnad->bna.ioceth.ioc.sem_timer); bnad_pci_remove()
3826 del_timer_sync(&bnad->bna.ioceth.ioc.hb_timer); bnad_pci_remove()
H A Dbna.h256 #define bna_attr(_bna) (&(_bna)->ioceth.attr)
405 void bna_ioceth_enable(struct bna_ioceth *ioceth);
406 void bna_ioceth_disable(struct bna_ioceth *ioceth,
H A Dbna_types.h918 struct bna_ioceth ioceth; member in struct:bna
H A Dbna_tx_rx.c2059 for (index = 0; index < bna->ioceth.attr.num_rxp; index++) { bna_rx_mod_init()
2073 for (index = 0; index < bna->ioceth.attr.num_rxp; index++) { bna_rx_mod_init()
2080 for (index = 0; index < (bna->ioceth.attr.num_rxp * 2); index++) { bna_rx_mod_init()
3603 for (i = 0; i < bna->ioceth.attr.num_txq; i++) { bna_tx_mod_init()
H A Dbnad_ethtool.c309 bfa_nw_ioc_get_attr(&bnad->bna.ioceth.ioc, ioc_attr); bnad_get_drvinfo()

Completed in 169 milliseconds