• Home
  • Raw
  • Download

Lines Matching refs:bp

46 static inline void bnx2x_exe_queue_init(struct bnx2x *bp,  in bnx2x_exe_queue_init()  argument
77 static inline void bnx2x_exe_queue_free_elem(struct bnx2x *bp, in bnx2x_exe_queue_free_elem() argument
109 static inline int bnx2x_exe_queue_add(struct bnx2x *bp, in bnx2x_exe_queue_add() argument
120 rc = o->optimize(bp, o->owner, elem); in bnx2x_exe_queue_add()
125 rc = o->validate(bp, o->owner, elem); in bnx2x_exe_queue_add()
140 bnx2x_exe_queue_free_elem(bp, elem); in bnx2x_exe_queue_add()
148 struct bnx2x *bp, in __bnx2x_exe_queue_reset_pending() argument
158 bnx2x_exe_queue_free_elem(bp, elem); in __bnx2x_exe_queue_reset_pending()
171 static inline int bnx2x_exe_queue_step(struct bnx2x *bp, in bnx2x_exe_queue_step() argument
189 __bnx2x_exe_queue_reset_pending(bp, o); in bnx2x_exe_queue_step()
221 rc = o->execute(bp, o->owner, &o->pending_comp, ramrod_flags); in bnx2x_exe_queue_step()
231 __bnx2x_exe_queue_reset_pending(bp, o); in bnx2x_exe_queue_step()
247 struct bnx2x *bp) in bnx2x_exe_queue_alloc_elem() argument
281 static inline int bnx2x_state_wait(struct bnx2x *bp, int state, in bnx2x_state_wait() argument
287 if (CHIP_REV_IS_EMUL(bp)) in bnx2x_state_wait()
303 if (bp->panic) in bnx2x_state_wait()
316 static int bnx2x_raw_wait(struct bnx2x *bp, struct bnx2x_raw_obj *raw) in bnx2x_raw_wait() argument
318 return bnx2x_state_wait(bp, raw->state, raw->pstate); in bnx2x_raw_wait()
395 static int __bnx2x_vlan_mac_h_write_trylock(struct bnx2x *bp, in __bnx2x_vlan_mac_h_write_trylock() argument
416 static void __bnx2x_vlan_mac_h_exec_pending(struct bnx2x *bp, in __bnx2x_vlan_mac_h_exec_pending() argument
426 rc = bnx2x_exe_queue_step(bp, &o->exe_queue, &ramrod_flags); in __bnx2x_vlan_mac_h_exec_pending()
445 static void __bnx2x_vlan_mac_h_pend(struct bnx2x *bp, in __bnx2x_vlan_mac_h_pend() argument
465 static void __bnx2x_vlan_mac_h_write_unlock(struct bnx2x *bp, in __bnx2x_vlan_mac_h_write_unlock() argument
473 __bnx2x_vlan_mac_h_exec_pending(bp, o); in __bnx2x_vlan_mac_h_write_unlock()
487 static int __bnx2x_vlan_mac_h_read_lock(struct bnx2x *bp, in __bnx2x_vlan_mac_h_read_lock() argument
506 int bnx2x_vlan_mac_h_read_lock(struct bnx2x *bp, in bnx2x_vlan_mac_h_read_lock() argument
512 rc = __bnx2x_vlan_mac_h_read_lock(bp, o); in bnx2x_vlan_mac_h_read_lock()
528 static void __bnx2x_vlan_mac_h_read_unlock(struct bnx2x *bp, in __bnx2x_vlan_mac_h_read_unlock() argument
549 __bnx2x_vlan_mac_h_write_unlock(bp, o); in __bnx2x_vlan_mac_h_read_unlock()
563 void bnx2x_vlan_mac_h_read_unlock(struct bnx2x *bp, in bnx2x_vlan_mac_h_read_unlock() argument
567 __bnx2x_vlan_mac_h_read_unlock(bp, o); in bnx2x_vlan_mac_h_read_unlock()
571 static int bnx2x_get_n_elements(struct bnx2x *bp, struct bnx2x_vlan_mac_obj *o, in bnx2x_get_n_elements() argument
580 read_lock = bnx2x_vlan_mac_h_read_lock(bp, o); in bnx2x_get_n_elements()
597 bnx2x_vlan_mac_h_read_unlock(bp, o); in bnx2x_get_n_elements()
604 static int bnx2x_check_mac_add(struct bnx2x *bp, in bnx2x_check_mac_add() argument
624 static int bnx2x_check_vlan_add(struct bnx2x *bp, in bnx2x_check_vlan_add() argument
641 bnx2x_check_mac_del(struct bnx2x *bp, in bnx2x_check_mac_del() argument
658 bnx2x_check_vlan_del(struct bnx2x *bp, in bnx2x_check_vlan_del() argument
674 static bool bnx2x_check_move(struct bnx2x *bp, in bnx2x_check_move() argument
685 pos = src_o->check_del(bp, src_o, data); in bnx2x_check_move()
688 rc = dst_o->check_add(bp, dst_o, data); in bnx2x_check_move()
700 struct bnx2x *bp, in bnx2x_check_move_always_err() argument
724 static void bnx2x_set_mac_in_nig(struct bnx2x *bp, in bnx2x_set_mac_in_nig() argument
728 u32 reg_offset = BP_PORT(bp) ? NIG_REG_LLH1_FUNC_MEM : in bnx2x_set_mac_in_nig()
731 if (!IS_MF_SI(bp) && !IS_MF_AFEX(bp)) in bnx2x_set_mac_in_nig()
748 REG_WR_DMAE(bp, reg_offset, wb_data, 2); in bnx2x_set_mac_in_nig()
751 REG_WR(bp, (BP_PORT(bp) ? NIG_REG_LLH1_FUNC_MEM_ENABLE : in bnx2x_set_mac_in_nig()
765 static inline void bnx2x_vlan_mac_set_cmd_hdr_e2(struct bnx2x *bp, in bnx2x_vlan_mac_set_cmd_hdr_e2() argument
805 static void bnx2x_set_one_mac_e2(struct bnx2x *bp, in bnx2x_set_one_mac_e2() argument
838 bnx2x_set_mac_in_nig(bp, add, mac, in bnx2x_set_one_mac_e2()
841 bnx2x_set_mac_in_nig(bp, add, mac, in bnx2x_set_one_mac_e2()
850 bnx2x_vlan_mac_set_cmd_hdr_e2(bp, o, add, CLASSIFY_RULE_OPCODE_MAC, in bnx2x_set_one_mac_e2()
869 bnx2x_vlan_mac_set_cmd_hdr_e2(bp, in bnx2x_set_one_mac_e2()
901 static inline void bnx2x_vlan_mac_set_rdata_hdr_e1x(struct bnx2x *bp, in bnx2x_vlan_mac_set_rdata_hdr_e1x() argument
914 static inline void bnx2x_vlan_mac_set_cfg_entry_e1x(struct bnx2x *bp, in bnx2x_vlan_mac_set_cfg_entry_e1x() argument
940 static inline void bnx2x_vlan_mac_set_rdata_e1x(struct bnx2x *bp, in bnx2x_vlan_mac_set_rdata_e1x() argument
947 bnx2x_vlan_mac_set_rdata_hdr_e1x(bp, o, type, cam_offset, in bnx2x_vlan_mac_set_rdata_e1x()
949 bnx2x_vlan_mac_set_cfg_entry_e1x(bp, o, add, opcode, mac, vlan_id, in bnx2x_vlan_mac_set_rdata_e1x()
966 static void bnx2x_set_one_mac_e1x(struct bnx2x *bp, in bnx2x_set_one_mac_e1x() argument
983 bnx2x_vlan_mac_set_rdata_e1x(bp, o, raw->state, in bnx2x_set_one_mac_e1x()
989 static void bnx2x_set_one_vlan_e2(struct bnx2x *bp, in bnx2x_set_one_vlan_e2() argument
1008 bnx2x_vlan_mac_set_cmd_hdr_e2(bp, o, add, CLASSIFY_RULE_OPCODE_VLAN, in bnx2x_set_one_vlan_e2()
1023 bnx2x_vlan_mac_set_cmd_hdr_e2(bp, in bnx2x_set_one_vlan_e2()
1058 static int bnx2x_vlan_mac_restore(struct bnx2x *bp, in bnx2x_vlan_mac_restore() argument
1097 return bnx2x_config_vlan_mac(bp, p); in bnx2x_vlan_mac_restore()
1151 static inline int bnx2x_validate_vlan_mac_add(struct bnx2x *bp, in bnx2x_validate_vlan_mac_add() argument
1160 rc = o->check_add(bp, o, &elem->cmd_data.vlan_mac.u); in bnx2x_validate_vlan_mac_add()
1199 static inline int bnx2x_validate_vlan_mac_del(struct bnx2x *bp, in bnx2x_validate_vlan_mac_del() argument
1211 pos = o->check_del(bp, o, &elem->cmd_data.vlan_mac.u); in bnx2x_validate_vlan_mac_del()
1258 static inline int bnx2x_validate_vlan_mac_move(struct bnx2x *bp, in bnx2x_validate_vlan_mac_move() argument
1271 if (!src_o->check_move(bp, src_o, dest_o, in bnx2x_validate_vlan_mac_move()
1320 static int bnx2x_validate_vlan_mac(struct bnx2x *bp, in bnx2x_validate_vlan_mac() argument
1326 return bnx2x_validate_vlan_mac_add(bp, qo, elem); in bnx2x_validate_vlan_mac()
1328 return bnx2x_validate_vlan_mac_del(bp, qo, elem); in bnx2x_validate_vlan_mac()
1330 return bnx2x_validate_vlan_mac_move(bp, qo, elem); in bnx2x_validate_vlan_mac()
1336 static int bnx2x_remove_vlan_mac(struct bnx2x *bp, in bnx2x_remove_vlan_mac() argument
1372 static int bnx2x_wait_vlan_mac(struct bnx2x *bp, in bnx2x_wait_vlan_mac() argument
1381 rc = raw->wait_comp(bp, raw); in bnx2x_wait_vlan_mac()
1395 static int __bnx2x_vlan_mac_execute_step(struct bnx2x *bp, in __bnx2x_vlan_mac_execute_step() argument
1404 rc = __bnx2x_vlan_mac_h_write_trylock(bp, o); in __bnx2x_vlan_mac_execute_step()
1407 __bnx2x_vlan_mac_h_pend(bp, o, *ramrod_flags); in __bnx2x_vlan_mac_execute_step()
1414 rc = bnx2x_exe_queue_step(bp, &o->exe_queue, ramrod_flags); in __bnx2x_vlan_mac_execute_step()
1430 static int bnx2x_complete_vlan_mac(struct bnx2x *bp, in bnx2x_complete_vlan_mac() argument
1444 __bnx2x_exe_queue_reset_pending(bp, &o->exe_queue); in bnx2x_complete_vlan_mac()
1457 rc = __bnx2x_vlan_mac_execute_step(bp, o, ramrod_flags); in bnx2x_complete_vlan_mac()
1477 static int bnx2x_optimize_vlan_mac(struct bnx2x *bp, in bnx2x_optimize_vlan_mac() argument
1521 bnx2x_exe_queue_free_elem(bp, pos); in bnx2x_optimize_vlan_mac()
1540 struct bnx2x *bp, in bnx2x_vlan_mac_get_registry_elem() argument
1576 reg_elem = o->check_del(bp, o, &elem->cmd_data.vlan_mac.u); in bnx2x_vlan_mac_get_registry_elem()
1592 static int bnx2x_execute_vlan_mac(struct bnx2x *bp, in bnx2x_execute_vlan_mac() argument
1626 rc = bnx2x_vlan_mac_get_registry_elem(bp, cam_obj, in bnx2x_execute_vlan_mac()
1641 o->set_one_rule(bp, o, elem, idx, in bnx2x_execute_vlan_mac()
1658 rc = bnx2x_sp_post(bp, o->ramrod_cmd, r->cid, in bnx2x_execute_vlan_mac()
1671 reg_elem = o->check_del(bp, o, in bnx2x_execute_vlan_mac()
1703 reg_elem = o->check_del(bp, cam_obj, in bnx2x_execute_vlan_mac()
1716 struct bnx2x *bp, in bnx2x_vlan_mac_push_new_cmd() argument
1724 elem = bnx2x_exe_queue_alloc_elem(bp); in bnx2x_vlan_mac_push_new_cmd()
1741 return bnx2x_exe_queue_add(bp, &o->exe_queue, elem, restore); in bnx2x_vlan_mac_push_new_cmd()
1751 int bnx2x_config_vlan_mac(struct bnx2x *bp, in bnx2x_config_vlan_mac() argument
1764 rc = bnx2x_vlan_mac_push_new_cmd(bp, p); in bnx2x_config_vlan_mac()
1783 rc = __bnx2x_vlan_mac_execute_step(bp, p->vlan_mac_obj, in bnx2x_config_vlan_mac()
1802 rc = raw->wait_comp(bp, raw); in bnx2x_config_vlan_mac()
1807 rc = __bnx2x_vlan_mac_execute_step(bp, in bnx2x_config_vlan_mac()
1833 static int bnx2x_vlan_mac_del_all(struct bnx2x *bp, in bnx2x_vlan_mac_del_all() argument
1854 rc = exeq->remove(bp, exeq->owner, exeq_pos); in bnx2x_vlan_mac_del_all()
1861 bnx2x_exe_queue_free_elem(bp, exeq_pos); in bnx2x_vlan_mac_del_all()
1881 read_lock = bnx2x_vlan_mac_h_read_lock(bp, o); in bnx2x_vlan_mac_del_all()
1891 rc = bnx2x_config_vlan_mac(bp, &p); in bnx2x_vlan_mac_del_all()
1894 bnx2x_vlan_mac_h_read_unlock(bp, o); in bnx2x_vlan_mac_del_all()
1901 bnx2x_vlan_mac_h_read_unlock(bp, o); in bnx2x_vlan_mac_del_all()
1906 return bnx2x_config_vlan_mac(bp, &p); in bnx2x_vlan_mac_del_all()
1950 void bnx2x_init_mac_obj(struct bnx2x *bp, in bnx2x_init_mac_obj() argument
1969 if (CHIP_IS_E1x(bp)) { in bnx2x_init_mac_obj()
1977 bnx2x_exe_queue_init(bp, in bnx2x_init_mac_obj()
1994 bnx2x_exe_queue_init(bp, in bnx2x_init_mac_obj()
2004 void bnx2x_init_vlan_obj(struct bnx2x *bp, in bnx2x_init_vlan_obj() argument
2022 if (CHIP_IS_E1x(bp)) { in bnx2x_init_vlan_obj()
2035 bnx2x_exe_queue_init(bp, in bnx2x_init_vlan_obj()
2046 static inline void __storm_memset_mac_filters(struct bnx2x *bp, in __storm_memset_mac_filters() argument
2055 __storm_memset_struct(bp, addr, size, (u32 *)mac_filters); in __storm_memset_mac_filters()
2058 static int bnx2x_set_rx_mode_e1x(struct bnx2x *bp, in bnx2x_set_rx_mode_e1x() argument
2130 __storm_memset_mac_filters(bp, mac_filters, p->func_id); in bnx2x_set_rx_mode_e1x()
2148 static inline void bnx2x_rx_mode_set_cmd_state_e2(struct bnx2x *bp, in bnx2x_rx_mode_set_cmd_state_e2() argument
2197 static int bnx2x_set_rx_mode_e2(struct bnx2x *bp, in bnx2x_set_rx_mode_e2() argument
2217 bnx2x_rx_mode_set_cmd_state_e2(bp, &p->tx_accept_flags, in bnx2x_set_rx_mode_e2()
2230 bnx2x_rx_mode_set_cmd_state_e2(bp, &p->rx_accept_flags, in bnx2x_set_rx_mode_e2()
2244 data->rules[rule_idx].client_id = bnx2x_fcoe(bp, cl_id); in bnx2x_set_rx_mode_e2()
2250 bnx2x_rx_mode_set_cmd_state_e2(bp, &p->tx_accept_flags, in bnx2x_set_rx_mode_e2()
2258 data->rules[rule_idx].client_id = bnx2x_fcoe(bp, cl_id); in bnx2x_set_rx_mode_e2()
2264 bnx2x_rx_mode_set_cmd_state_e2(bp, &p->rx_accept_flags, in bnx2x_set_rx_mode_e2()
2288 rc = bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_FILTER_RULES, p->cid, in bnx2x_set_rx_mode_e2()
2299 static int bnx2x_wait_rx_mode_comp_e2(struct bnx2x *bp, in bnx2x_wait_rx_mode_comp_e2() argument
2302 return bnx2x_state_wait(bp, p->state, p->pstate); in bnx2x_wait_rx_mode_comp_e2()
2305 static int bnx2x_empty_rx_mode_wait(struct bnx2x *bp, in bnx2x_empty_rx_mode_wait() argument
2312 int bnx2x_config_rx_mode(struct bnx2x *bp, in bnx2x_config_rx_mode() argument
2318 rc = p->rx_mode_obj->config_rx_mode(bp, p); in bnx2x_config_rx_mode()
2324 rc = p->rx_mode_obj->wait_comp(bp, p); in bnx2x_config_rx_mode()
2332 void bnx2x_init_rx_mode_obj(struct bnx2x *bp, in bnx2x_init_rx_mode_obj() argument
2335 if (CHIP_IS_E1x(bp)) { in bnx2x_init_rx_mode_obj()
2373 static int bnx2x_mcast_wait(struct bnx2x *bp, in bnx2x_mcast_wait() argument
2376 if (bnx2x_state_wait(bp, o->sched_state, o->raw.pstate) || in bnx2x_mcast_wait()
2377 o->raw.wait_comp(bp, &o->raw)) in bnx2x_mcast_wait()
2383 static int bnx2x_mcast_enqueue_cmd(struct bnx2x *bp, in bnx2x_mcast_enqueue_cmd() argument
2515 static void bnx2x_mcast_set_one_rule_e2(struct bnx2x *bp, in bnx2x_mcast_set_one_rule_e2() argument
2578 struct bnx2x *bp, struct bnx2x_mcast_obj *o , int start_bin, in bnx2x_mcast_handle_restore_cmd_e2() argument
2589 o->set_one_rule(bp, o, cnt, &cfg_data, in bnx2x_mcast_handle_restore_cmd_e2()
2608 static inline void bnx2x_mcast_hdl_pending_add_e2(struct bnx2x *bp, in bnx2x_mcast_hdl_pending_add_e2() argument
2620 o->set_one_rule(bp, o, cnt, &cfg_data, cmd_pos->type); in bnx2x_mcast_hdl_pending_add_e2()
2643 static inline void bnx2x_mcast_hdl_pending_del_e2(struct bnx2x *bp, in bnx2x_mcast_hdl_pending_del_e2() argument
2650 o->set_one_rule(bp, o, cnt, NULL, cmd_pos->type); in bnx2x_mcast_hdl_pending_del_e2()
2673 static inline void bnx2x_mcast_hdl_pending_restore_e2(struct bnx2x *bp, in bnx2x_mcast_hdl_pending_restore_e2() argument
2677 cmd_pos->data.next_bin = o->hdl_restore(bp, o, cmd_pos->data.next_bin, in bnx2x_mcast_hdl_pending_restore_e2()
2688 static inline int bnx2x_mcast_handle_pending_cmds_e2(struct bnx2x *bp, in bnx2x_mcast_handle_pending_cmds_e2() argument
2699 bnx2x_mcast_hdl_pending_add_e2(bp, o, cmd_pos, &cnt); in bnx2x_mcast_handle_pending_cmds_e2()
2703 bnx2x_mcast_hdl_pending_del_e2(bp, o, cmd_pos, &cnt); in bnx2x_mcast_handle_pending_cmds_e2()
2707 bnx2x_mcast_hdl_pending_restore_e2(bp, o, cmd_pos, in bnx2x_mcast_handle_pending_cmds_e2()
2732 static inline void bnx2x_mcast_hdl_add(struct bnx2x *bp, in bnx2x_mcast_hdl_add() argument
2742 o->set_one_rule(bp, o, cnt, &cfg_data, BNX2X_MCAST_CMD_ADD); in bnx2x_mcast_hdl_add()
2753 static inline void bnx2x_mcast_hdl_del(struct bnx2x *bp, in bnx2x_mcast_hdl_del() argument
2760 o->set_one_rule(bp, o, cnt, NULL, BNX2X_MCAST_CMD_DEL); in bnx2x_mcast_hdl_del()
2783 static inline int bnx2x_mcast_handle_current_cmd(struct bnx2x *bp, in bnx2x_mcast_handle_current_cmd() argument
2795 bnx2x_mcast_hdl_add(bp, o, p, &cnt); in bnx2x_mcast_handle_current_cmd()
2799 bnx2x_mcast_hdl_del(bp, o, p, &cnt); in bnx2x_mcast_handle_current_cmd()
2803 o->hdl_restore(bp, o, 0, &cnt); in bnx2x_mcast_handle_current_cmd()
2817 static int bnx2x_mcast_validate_e2(struct bnx2x *bp, in bnx2x_mcast_validate_e2() argument
2862 static void bnx2x_mcast_revert_e2(struct bnx2x *bp, in bnx2x_mcast_revert_e2() argument
2879 static inline void bnx2x_mcast_set_rdata_hdr_e2(struct bnx2x *bp, in bnx2x_mcast_set_rdata_hdr_e2() argument
2904 static inline int bnx2x_mcast_refresh_registry_e2(struct bnx2x *bp, in bnx2x_mcast_refresh_registry_e2() argument
2921 static int bnx2x_mcast_setup_e2(struct bnx2x *bp, in bnx2x_mcast_setup_e2() argument
2934 cnt = bnx2x_mcast_handle_pending_cmds_e2(bp, p); in bnx2x_mcast_setup_e2()
2947 cnt = bnx2x_mcast_handle_current_cmd(bp, p, cmd, cnt); in bnx2x_mcast_setup_e2()
2958 bnx2x_mcast_set_rdata_hdr_e2(bp, p, (u8)cnt); in bnx2x_mcast_setup_e2()
2976 bnx2x_mcast_refresh_registry_e2(bp, o); in bnx2x_mcast_setup_e2()
2993 rc = bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_MULTICAST_RULES, in bnx2x_mcast_setup_e2()
3005 static int bnx2x_mcast_validate_e1h(struct bnx2x *bp, in bnx2x_mcast_validate_e1h() argument
3016 static void bnx2x_mcast_revert_e1h(struct bnx2x *bp, in bnx2x_mcast_revert_e1h() argument
3028 static inline void bnx2x_mcast_hdl_add_e1h(struct bnx2x *bp, in bnx2x_mcast_hdl_add_e1h() argument
3049 static inline void bnx2x_mcast_hdl_restore_e1h(struct bnx2x *bp, in bnx2x_mcast_hdl_restore_e1h() argument
3067 static int bnx2x_mcast_setup_e1h(struct bnx2x *bp, in bnx2x_mcast_setup_e1h() argument
3086 bnx2x_mcast_hdl_add_e1h(bp, o, p, mc_filter); in bnx2x_mcast_setup_e1h()
3099 bnx2x_mcast_hdl_restore_e1h(bp, o, p, mc_filter); in bnx2x_mcast_setup_e1h()
3109 REG_WR(bp, MC_HASH_OFFSET(bp, i), mc_filter[i]); in bnx2x_mcast_setup_e1h()
3121 static int bnx2x_mcast_validate_e1(struct bnx2x *bp, in bnx2x_mcast_validate_e1() argument
3176 static void bnx2x_mcast_revert_e1(struct bnx2x *bp, in bnx2x_mcast_revert_e1() argument
3192 static void bnx2x_mcast_set_one_rule_e1(struct bnx2x *bp, in bnx2x_mcast_set_one_rule_e1() argument
3226 static inline void bnx2x_mcast_set_rdata_hdr_e1(struct bnx2x *bp, in bnx2x_mcast_set_rdata_hdr_e1() argument
3234 u8 offset = (CHIP_REV_IS_SLOW(bp) ? in bnx2x_mcast_set_rdata_hdr_e1()
3260 struct bnx2x *bp, struct bnx2x_mcast_obj *o , int start_idx, in bnx2x_mcast_handle_restore_cmd_e1() argument
3270 o->set_one_rule(bp, o, i, &cfg_data, BNX2X_MCAST_CMD_RESTORE); in bnx2x_mcast_handle_restore_cmd_e1()
3284 struct bnx2x *bp, struct bnx2x_mcast_ramrod_params *p) in bnx2x_mcast_handle_pending_cmds_e1() argument
3304 o->set_one_rule(bp, o, cnt, &cfg_data, cmd_pos->type); in bnx2x_mcast_handle_pending_cmds_e1()
3319 o->hdl_restore(bp, o, 0, &cnt); in bnx2x_mcast_handle_pending_cmds_e1()
3363 static inline int bnx2x_mcast_refresh_registry_e1(struct bnx2x *bp, in bnx2x_mcast_refresh_registry_e1() argument
3410 static int bnx2x_mcast_setup_e1(struct bnx2x *bp, in bnx2x_mcast_setup_e1() argument
3430 cnt = bnx2x_mcast_handle_pending_cmds_e1(bp, p); in bnx2x_mcast_setup_e1()
3438 cnt = bnx2x_mcast_handle_current_cmd(bp, p, cmd, 0); in bnx2x_mcast_setup_e1()
3450 bnx2x_mcast_set_rdata_hdr_e1(bp, p, (u8)cnt); in bnx2x_mcast_setup_e1()
3458 rc = bnx2x_mcast_refresh_registry_e1(bp, o); in bnx2x_mcast_setup_e1()
3477 rc = bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_SET_MAC, raw->cid, in bnx2x_mcast_setup_e1()
3511 int bnx2x_config_mcast(struct bnx2x *bp, in bnx2x_config_mcast() argument
3525 rc = o->validate(bp, p, cmd); in bnx2x_config_mcast()
3541 rc = o->enqueue_cmd(bp, p->mcast_obj, p, cmd); in bnx2x_config_mcast()
3557 rc = o->config_mcast(bp, p, cmd); in bnx2x_config_mcast()
3563 rc = o->wait_comp(bp, o); in bnx2x_config_mcast()
3572 o->revert(bp, p, old_reg_size); in bnx2x_config_mcast()
3601 void bnx2x_init_mcast_obj(struct bnx2x *bp, in bnx2x_init_mcast_obj() argument
3621 if (CHIP_IS_E1(bp)) { in bnx2x_init_mcast_obj()
3628 if (CHIP_REV_IS_SLOW(bp)) in bnx2x_init_mcast_obj()
3647 } else if (CHIP_IS_E1H(bp)) { in bnx2x_init_mcast_obj()
3899 void bnx2x_init_mac_credit_pool(struct bnx2x *bp, in bnx2x_init_mac_credit_pool() argument
3908 if (CHIP_IS_E1(bp)) { in bnx2x_init_mac_credit_pool()
3910 if (!CHIP_REV_IS_SLOW(bp)) in bnx2x_init_mac_credit_pool()
3917 } else if (CHIP_IS_E1H(bp)) { in bnx2x_init_mac_credit_pool()
3922 if (!CHIP_REV_IS_SLOW(bp)) in bnx2x_init_mac_credit_pool()
3938 if (!CHIP_REV_IS_SLOW(bp)) in bnx2x_init_mac_credit_pool()
3954 void bnx2x_init_vlan_credit_pool(struct bnx2x *bp, in bnx2x_init_vlan_credit_pool() argument
3959 if (CHIP_IS_E1x(bp)) { in bnx2x_init_vlan_credit_pool()
3986 static inline void bnx2x_debug_print_ind_table(struct bnx2x *bp, in bnx2x_debug_print_ind_table() argument
4015 static int bnx2x_setup_rss(struct bnx2x *bp, in bnx2x_setup_rss() argument
4091 if (netif_msg_ifup(bp)) in bnx2x_setup_rss()
4092 bnx2x_debug_print_ind_table(bp, p); in bnx2x_setup_rss()
4102 rc = bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_RSS_UPDATE, r->cid, in bnx2x_setup_rss()
4119 int bnx2x_config_rss(struct bnx2x *bp, in bnx2x_config_rss() argument
4135 rc = o->config_rss(bp, p); in bnx2x_config_rss()
4142 rc = r->wait_comp(bp, r); in bnx2x_config_rss()
4147 void bnx2x_init_rss_config_obj(struct bnx2x *bp, in bnx2x_init_rss_config_obj() argument
4175 int bnx2x_queue_state_change(struct bnx2x *bp, in bnx2x_queue_state_change() argument
4183 rc = o->check_transition(bp, o, params); in bnx2x_queue_state_change()
4196 o->complete_cmd(bp, o, pending_bit); in bnx2x_queue_state_change()
4199 rc = o->send_cmd(bp, params); in bnx2x_queue_state_change()
4208 rc = o->wait_comp(bp, o, pending_bit); in bnx2x_queue_state_change()
4237 static int bnx2x_queue_wait_comp(struct bnx2x *bp, in bnx2x_queue_wait_comp() argument
4241 return bnx2x_state_wait(bp, cmd, &o->pending); in bnx2x_queue_wait_comp()
4253 static int bnx2x_queue_comp_cmd(struct bnx2x *bp, in bnx2x_queue_comp_cmd() argument
4296 static void bnx2x_q_fill_setup_data_e2(struct bnx2x *bp, in bnx2x_q_fill_setup_data_e2() argument
4309 static void bnx2x_q_fill_init_general_data(struct bnx2x *bp, in bnx2x_q_fill_init_general_data() argument
4465 static void bnx2x_q_fill_setup_data_cmn(struct bnx2x *bp, in bnx2x_q_fill_setup_data_cmn() argument
4469 bnx2x_q_fill_init_general_data(bp, cmd_params->q_obj, in bnx2x_q_fill_setup_data_cmn()
4490 static void bnx2x_q_fill_setup_tx_only(struct bnx2x *bp, in bnx2x_q_fill_setup_tx_only() argument
4494 bnx2x_q_fill_init_general_data(bp, cmd_params->q_obj, in bnx2x_q_fill_setup_tx_only()
4521 static inline int bnx2x_q_init(struct bnx2x *bp, in bnx2x_q_init() argument
4534 bnx2x_update_coalesce_sb_index(bp, init->tx.fw_sb_id, in bnx2x_q_init()
4545 bnx2x_update_coalesce_sb_index(bp, init->rx.fw_sb_id, in bnx2x_q_init()
4556 bnx2x_set_ctx_validation(bp, init->cxts[cos], o->cids[cos]); in bnx2x_q_init()
4560 o->complete_cmd(bp, o, BNX2X_Q_CMD_INIT); in bnx2x_q_init()
4568 static inline int bnx2x_q_send_setup_e1x(struct bnx2x *bp, in bnx2x_q_send_setup_e1x() argument
4581 bnx2x_q_fill_setup_data_cmn(bp, params, rdata); in bnx2x_q_send_setup_e1x()
4589 return bnx2x_sp_post(bp, ramrod, o->cids[BNX2X_PRIMARY_CID_INDEX], in bnx2x_q_send_setup_e1x()
4594 static inline int bnx2x_q_send_setup_e2(struct bnx2x *bp, in bnx2x_q_send_setup_e2() argument
4607 bnx2x_q_fill_setup_data_cmn(bp, params, rdata); in bnx2x_q_send_setup_e2()
4608 bnx2x_q_fill_setup_data_e2(bp, params, rdata); in bnx2x_q_send_setup_e2()
4616 return bnx2x_sp_post(bp, ramrod, o->cids[BNX2X_PRIMARY_CID_INDEX], in bnx2x_q_send_setup_e2()
4621 static inline int bnx2x_q_send_setup_tx_only(struct bnx2x *bp, in bnx2x_q_send_setup_tx_only() argument
4647 bnx2x_q_fill_setup_tx_only(bp, params, rdata); in bnx2x_q_send_setup_tx_only()
4659 return bnx2x_sp_post(bp, ramrod, o->cids[cid_index], in bnx2x_q_send_setup_tx_only()
4664 static void bnx2x_q_fill_update_data(struct bnx2x *bp, in bnx2x_q_fill_update_data() argument
4736 static inline int bnx2x_q_send_update(struct bnx2x *bp, in bnx2x_q_send_update() argument
4757 bnx2x_q_fill_update_data(bp, o, update_params, rdata); in bnx2x_q_send_update()
4765 return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_CLIENT_UPDATE, in bnx2x_q_send_update()
4778 static inline int bnx2x_q_send_deactivate(struct bnx2x *bp, in bnx2x_q_send_deactivate() argument
4787 return bnx2x_q_send_update(bp, params); in bnx2x_q_send_deactivate()
4798 static inline int bnx2x_q_send_activate(struct bnx2x *bp, in bnx2x_q_send_activate() argument
4808 return bnx2x_q_send_update(bp, params); in bnx2x_q_send_activate()
4811 static void bnx2x_q_fill_update_tpa_data(struct bnx2x *bp, in bnx2x_q_fill_update_tpa_data() argument
4833 static inline int bnx2x_q_send_update_tpa(struct bnx2x *bp, in bnx2x_q_send_update_tpa() argument
4848 bnx2x_q_fill_update_tpa_data(bp, o, update_tpa_params, rdata); in bnx2x_q_send_update_tpa()
4863 return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_TPA_UPDATE, in bnx2x_q_send_update_tpa()
4869 static inline int bnx2x_q_send_halt(struct bnx2x *bp, in bnx2x_q_send_halt() argument
4874 return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_HALT, in bnx2x_q_send_halt()
4879 static inline int bnx2x_q_send_cfc_del(struct bnx2x *bp, in bnx2x_q_send_cfc_del() argument
4891 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_CFC_DEL, in bnx2x_q_send_cfc_del()
4895 static inline int bnx2x_q_send_terminate(struct bnx2x *bp, in bnx2x_q_send_terminate() argument
4907 return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_TERMINATE, in bnx2x_q_send_terminate()
4911 static inline int bnx2x_q_send_empty(struct bnx2x *bp, in bnx2x_q_send_empty() argument
4916 return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_EMPTY, in bnx2x_q_send_empty()
4921 static inline int bnx2x_queue_send_cmd_cmn(struct bnx2x *bp, in bnx2x_queue_send_cmd_cmn() argument
4926 return bnx2x_q_init(bp, params); in bnx2x_queue_send_cmd_cmn()
4928 return bnx2x_q_send_setup_tx_only(bp, params); in bnx2x_queue_send_cmd_cmn()
4930 return bnx2x_q_send_deactivate(bp, params); in bnx2x_queue_send_cmd_cmn()
4932 return bnx2x_q_send_activate(bp, params); in bnx2x_queue_send_cmd_cmn()
4934 return bnx2x_q_send_update(bp, params); in bnx2x_queue_send_cmd_cmn()
4936 return bnx2x_q_send_update_tpa(bp, params); in bnx2x_queue_send_cmd_cmn()
4938 return bnx2x_q_send_halt(bp, params); in bnx2x_queue_send_cmd_cmn()
4940 return bnx2x_q_send_cfc_del(bp, params); in bnx2x_queue_send_cmd_cmn()
4942 return bnx2x_q_send_terminate(bp, params); in bnx2x_queue_send_cmd_cmn()
4944 return bnx2x_q_send_empty(bp, params); in bnx2x_queue_send_cmd_cmn()
4951 static int bnx2x_queue_send_cmd_e1x(struct bnx2x *bp, in bnx2x_queue_send_cmd_e1x() argument
4956 return bnx2x_q_send_setup_e1x(bp, params); in bnx2x_queue_send_cmd_e1x()
4967 return bnx2x_queue_send_cmd_cmn(bp, params); in bnx2x_queue_send_cmd_e1x()
4974 static int bnx2x_queue_send_cmd_e2(struct bnx2x *bp, in bnx2x_queue_send_cmd_e2() argument
4979 return bnx2x_q_send_setup_e2(bp, params); in bnx2x_queue_send_cmd_e2()
4990 return bnx2x_queue_send_cmd_cmn(bp, params); in bnx2x_queue_send_cmd_e2()
5013 static int bnx2x_queue_chk_transition(struct bnx2x *bp, in bnx2x_queue_chk_transition() argument
5179 void bnx2x_init_queue_obj(struct bnx2x *bp, in bnx2x_init_queue_obj() argument
5199 if (CHIP_IS_E1x(bp)) in bnx2x_init_queue_obj()
5212 int bnx2x_get_q_logical_state(struct bnx2x *bp, in bnx2x_get_q_logical_state() argument
5233 enum bnx2x_func_state bnx2x_func_get_state(struct bnx2x *bp, in bnx2x_func_get_state() argument
5248 static int bnx2x_func_wait_comp(struct bnx2x *bp, in bnx2x_func_wait_comp() argument
5252 return bnx2x_state_wait(bp, cmd, &o->pending); in bnx2x_func_wait_comp()
5265 static inline int bnx2x_func_state_change_comp(struct bnx2x *bp, in bnx2x_func_state_change_comp() argument
5273 cmd, BP_FUNC(bp), o->state, in bnx2x_func_state_change_comp()
5280 cmd, BP_FUNC(bp), o->next_state); in bnx2x_func_state_change_comp()
5305 static int bnx2x_func_comp_cmd(struct bnx2x *bp, in bnx2x_func_comp_cmd() argument
5312 int rc = bnx2x_func_state_change_comp(bp, o, cmd); in bnx2x_func_comp_cmd()
5331 static int bnx2x_func_chk_transition(struct bnx2x *bp, in bnx2x_func_chk_transition() argument
5437 static inline int bnx2x_func_init_func(struct bnx2x *bp, in bnx2x_func_init_func() argument
5440 return drv->init_hw_func(bp); in bnx2x_func_init_func()
5454 static inline int bnx2x_func_init_port(struct bnx2x *bp, in bnx2x_func_init_port() argument
5457 int rc = drv->init_hw_port(bp); in bnx2x_func_init_port()
5461 return bnx2x_func_init_func(bp, drv); in bnx2x_func_init_port()
5474 static inline int bnx2x_func_init_cmn_chip(struct bnx2x *bp, in bnx2x_func_init_cmn_chip() argument
5477 int rc = drv->init_hw_cmn_chip(bp); in bnx2x_func_init_cmn_chip()
5481 return bnx2x_func_init_port(bp, drv); in bnx2x_func_init_cmn_chip()
5494 static inline int bnx2x_func_init_cmn(struct bnx2x *bp, in bnx2x_func_init_cmn() argument
5497 int rc = drv->init_hw_cmn(bp); in bnx2x_func_init_cmn()
5501 return bnx2x_func_init_port(bp, drv); in bnx2x_func_init_cmn()
5504 static int bnx2x_func_hw_init(struct bnx2x *bp, in bnx2x_func_hw_init() argument
5513 BP_ABS_FUNC(bp), load_code); in bnx2x_func_hw_init()
5516 rc = drv->gunzip_init(bp); in bnx2x_func_hw_init()
5521 rc = drv->init_fw(bp); in bnx2x_func_hw_init()
5530 rc = bnx2x_func_init_cmn_chip(bp, drv); in bnx2x_func_hw_init()
5536 rc = bnx2x_func_init_cmn(bp, drv); in bnx2x_func_hw_init()
5542 rc = bnx2x_func_init_port(bp, drv); in bnx2x_func_hw_init()
5548 rc = bnx2x_func_init_func(bp, drv); in bnx2x_func_hw_init()
5559 drv->gunzip_end(bp); in bnx2x_func_hw_init()
5565 o->complete_cmd(bp, o, BNX2X_F_CMD_HW_INIT); in bnx2x_func_hw_init()
5579 static inline void bnx2x_func_reset_func(struct bnx2x *bp, in bnx2x_func_reset_func() argument
5582 drv->reset_hw_func(bp); in bnx2x_func_reset_func()
5600 static inline void bnx2x_func_reset_port(struct bnx2x *bp, in bnx2x_func_reset_port() argument
5603 drv->reset_hw_port(bp); in bnx2x_func_reset_port()
5604 bnx2x_func_reset_func(bp, drv); in bnx2x_func_reset_port()
5617 static inline void bnx2x_func_reset_cmn(struct bnx2x *bp, in bnx2x_func_reset_cmn() argument
5620 bnx2x_func_reset_port(bp, drv); in bnx2x_func_reset_cmn()
5621 drv->reset_hw_cmn(bp); in bnx2x_func_reset_cmn()
5624 static inline int bnx2x_func_hw_reset(struct bnx2x *bp, in bnx2x_func_hw_reset() argument
5631 DP(BNX2X_MSG_SP, "function %d reset_phase %x\n", BP_ABS_FUNC(bp), in bnx2x_func_hw_reset()
5636 bnx2x_func_reset_cmn(bp, drv); in bnx2x_func_hw_reset()
5639 bnx2x_func_reset_port(bp, drv); in bnx2x_func_hw_reset()
5642 bnx2x_func_reset_func(bp, drv); in bnx2x_func_hw_reset()
5651 o->complete_cmd(bp, o, BNX2X_F_CMD_HW_RESET); in bnx2x_func_hw_reset()
5656 static inline int bnx2x_func_send_start(struct bnx2x *bp, in bnx2x_func_send_start() argument
5670 rdata->path_id = BP_PATH(bp); in bnx2x_func_send_start()
5700 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_FUNCTION_START, 0, in bnx2x_func_send_start()
5705 static inline int bnx2x_func_send_switch_update(struct bnx2x *bp, in bnx2x_func_send_switch_update() argument
5772 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_FUNCTION_UPDATE, 0, in bnx2x_func_send_switch_update()
5777 static inline int bnx2x_func_send_afex_update(struct bnx2x *bp, in bnx2x_func_send_afex_update() argument
5810 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_FUNCTION_UPDATE, 0, in bnx2x_func_send_afex_update()
5816 inline int bnx2x_func_send_afex_viflists(struct bnx2x *bp, in bnx2x_func_send_afex_viflists() argument
5849 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_AFEX_VIF_LISTS, 0, in bnx2x_func_send_afex_viflists()
5854 static inline int bnx2x_func_send_stop(struct bnx2x *bp, in bnx2x_func_send_stop() argument
5857 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_FUNCTION_STOP, 0, 0, 0, in bnx2x_func_send_stop()
5861 static inline int bnx2x_func_send_tx_stop(struct bnx2x *bp, in bnx2x_func_send_tx_stop() argument
5864 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_STOP_TRAFFIC, 0, 0, 0, in bnx2x_func_send_tx_stop()
5867 static inline int bnx2x_func_send_tx_start(struct bnx2x *bp, in bnx2x_func_send_tx_start() argument
5894 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_START_TRAFFIC, 0, in bnx2x_func_send_tx_start()
5900 int bnx2x_func_send_set_timesync(struct bnx2x *bp, in bnx2x_func_send_set_timesync() argument
5930 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_SET_TIMESYNC, 0, in bnx2x_func_send_set_timesync()
5935 static int bnx2x_func_send_cmd(struct bnx2x *bp, in bnx2x_func_send_cmd() argument
5940 return bnx2x_func_hw_init(bp, params); in bnx2x_func_send_cmd()
5942 return bnx2x_func_send_start(bp, params); in bnx2x_func_send_cmd()
5944 return bnx2x_func_send_stop(bp, params); in bnx2x_func_send_cmd()
5946 return bnx2x_func_hw_reset(bp, params); in bnx2x_func_send_cmd()
5948 return bnx2x_func_send_afex_update(bp, params); in bnx2x_func_send_cmd()
5950 return bnx2x_func_send_afex_viflists(bp, params); in bnx2x_func_send_cmd()
5952 return bnx2x_func_send_tx_stop(bp, params); in bnx2x_func_send_cmd()
5954 return bnx2x_func_send_tx_start(bp, params); in bnx2x_func_send_cmd()
5956 return bnx2x_func_send_switch_update(bp, params); in bnx2x_func_send_cmd()
5958 return bnx2x_func_send_set_timesync(bp, params); in bnx2x_func_send_cmd()
5965 void bnx2x_init_func_obj(struct bnx2x *bp, in bnx2x_init_func_obj() argument
6000 int bnx2x_func_state_change(struct bnx2x *bp, in bnx2x_func_state_change() argument
6011 rc = o->check_transition(bp, o, params); in bnx2x_func_state_change()
6018 rc = o->check_transition(bp, o, params); in bnx2x_func_state_change()
6035 bnx2x_func_state_change_comp(bp, o, cmd); in bnx2x_func_state_change()
6039 rc = o->send_cmd(bp, params); in bnx2x_func_state_change()
6051 rc = o->wait_comp(bp, o, cmd); in bnx2x_func_state_change()