Lines Matching refs:bp
48 static inline void bnx2x_exe_queue_init(struct bnx2x *bp, in bnx2x_exe_queue_init() argument
79 static inline void bnx2x_exe_queue_free_elem(struct bnx2x *bp, in bnx2x_exe_queue_free_elem() argument
111 static inline int bnx2x_exe_queue_add(struct bnx2x *bp, in bnx2x_exe_queue_add() argument
122 rc = o->optimize(bp, o->owner, elem); in bnx2x_exe_queue_add()
127 rc = o->validate(bp, o->owner, elem); in bnx2x_exe_queue_add()
142 bnx2x_exe_queue_free_elem(bp, elem); in bnx2x_exe_queue_add()
150 struct bnx2x *bp, in __bnx2x_exe_queue_reset_pending() argument
160 bnx2x_exe_queue_free_elem(bp, elem); in __bnx2x_exe_queue_reset_pending()
173 static inline int bnx2x_exe_queue_step(struct bnx2x *bp, in bnx2x_exe_queue_step() argument
191 __bnx2x_exe_queue_reset_pending(bp, o); in bnx2x_exe_queue_step()
223 rc = o->execute(bp, o->owner, &o->pending_comp, ramrod_flags); in bnx2x_exe_queue_step()
233 __bnx2x_exe_queue_reset_pending(bp, o); in bnx2x_exe_queue_step()
249 struct bnx2x *bp) in bnx2x_exe_queue_alloc_elem() argument
283 static inline int bnx2x_state_wait(struct bnx2x *bp, int state, in bnx2x_state_wait() argument
289 if (CHIP_REV_IS_EMUL(bp)) in bnx2x_state_wait()
305 if (bp->panic) in bnx2x_state_wait()
318 static int bnx2x_raw_wait(struct bnx2x *bp, struct bnx2x_raw_obj *raw) in bnx2x_raw_wait() argument
320 return bnx2x_state_wait(bp, raw->state, raw->pstate); in bnx2x_raw_wait()
430 static int __bnx2x_vlan_mac_h_write_trylock(struct bnx2x *bp, in __bnx2x_vlan_mac_h_write_trylock() argument
451 static void __bnx2x_vlan_mac_h_exec_pending(struct bnx2x *bp, in __bnx2x_vlan_mac_h_exec_pending() argument
461 rc = bnx2x_exe_queue_step(bp, &o->exe_queue, &ramrod_flags); in __bnx2x_vlan_mac_h_exec_pending()
480 static void __bnx2x_vlan_mac_h_pend(struct bnx2x *bp, in __bnx2x_vlan_mac_h_pend() argument
500 static void __bnx2x_vlan_mac_h_write_unlock(struct bnx2x *bp, in __bnx2x_vlan_mac_h_write_unlock() argument
508 __bnx2x_vlan_mac_h_exec_pending(bp, o); in __bnx2x_vlan_mac_h_write_unlock()
522 static int __bnx2x_vlan_mac_h_read_lock(struct bnx2x *bp, in __bnx2x_vlan_mac_h_read_lock() argument
541 int bnx2x_vlan_mac_h_read_lock(struct bnx2x *bp, in bnx2x_vlan_mac_h_read_lock() argument
547 rc = __bnx2x_vlan_mac_h_read_lock(bp, o); in bnx2x_vlan_mac_h_read_lock()
563 static void __bnx2x_vlan_mac_h_read_unlock(struct bnx2x *bp, in __bnx2x_vlan_mac_h_read_unlock() argument
584 __bnx2x_vlan_mac_h_write_unlock(bp, o); in __bnx2x_vlan_mac_h_read_unlock()
598 void bnx2x_vlan_mac_h_read_unlock(struct bnx2x *bp, in bnx2x_vlan_mac_h_read_unlock() argument
602 __bnx2x_vlan_mac_h_read_unlock(bp, o); in bnx2x_vlan_mac_h_read_unlock()
606 static int bnx2x_get_n_elements(struct bnx2x *bp, struct bnx2x_vlan_mac_obj *o, in bnx2x_get_n_elements() argument
615 read_lock = bnx2x_vlan_mac_h_read_lock(bp, o); in bnx2x_get_n_elements()
632 bnx2x_vlan_mac_h_read_unlock(bp, o); in bnx2x_get_n_elements()
639 static int bnx2x_check_mac_add(struct bnx2x *bp, in bnx2x_check_mac_add() argument
659 static int bnx2x_check_vlan_add(struct bnx2x *bp, in bnx2x_check_vlan_add() argument
674 static int bnx2x_check_vlan_mac_add(struct bnx2x *bp, in bnx2x_check_vlan_mac_add() argument
696 bnx2x_check_mac_del(struct bnx2x *bp, in bnx2x_check_mac_del() argument
713 bnx2x_check_vlan_del(struct bnx2x *bp, in bnx2x_check_vlan_del() argument
729 bnx2x_check_vlan_mac_del(struct bnx2x *bp, in bnx2x_check_vlan_mac_del() argument
750 static bool bnx2x_check_move(struct bnx2x *bp, in bnx2x_check_move() argument
761 pos = src_o->check_del(bp, src_o, data); in bnx2x_check_move()
764 rc = dst_o->check_add(bp, dst_o, data); in bnx2x_check_move()
776 struct bnx2x *bp, in bnx2x_check_move_always_err() argument
800 static void bnx2x_set_mac_in_nig(struct bnx2x *bp, in bnx2x_set_mac_in_nig() argument
804 u32 reg_offset = BP_PORT(bp) ? NIG_REG_LLH1_FUNC_MEM : in bnx2x_set_mac_in_nig()
807 if (!IS_MF_SI(bp) && !IS_MF_AFEX(bp)) in bnx2x_set_mac_in_nig()
824 REG_WR_DMAE(bp, reg_offset, wb_data, 2); in bnx2x_set_mac_in_nig()
827 REG_WR(bp, (BP_PORT(bp) ? NIG_REG_LLH1_FUNC_MEM_ENABLE : in bnx2x_set_mac_in_nig()
841 static inline void bnx2x_vlan_mac_set_cmd_hdr_e2(struct bnx2x *bp, in bnx2x_vlan_mac_set_cmd_hdr_e2() argument
881 static void bnx2x_set_one_mac_e2(struct bnx2x *bp, in bnx2x_set_one_mac_e2() argument
914 bnx2x_set_mac_in_nig(bp, add, mac, in bnx2x_set_one_mac_e2()
917 bnx2x_set_mac_in_nig(bp, add, mac, in bnx2x_set_one_mac_e2()
926 bnx2x_vlan_mac_set_cmd_hdr_e2(bp, o, add, CLASSIFY_RULE_OPCODE_MAC, in bnx2x_set_one_mac_e2()
945 bnx2x_vlan_mac_set_cmd_hdr_e2(bp, in bnx2x_set_one_mac_e2()
977 static inline void bnx2x_vlan_mac_set_rdata_hdr_e1x(struct bnx2x *bp, in bnx2x_vlan_mac_set_rdata_hdr_e1x() argument
990 static inline void bnx2x_vlan_mac_set_cfg_entry_e1x(struct bnx2x *bp, in bnx2x_vlan_mac_set_cfg_entry_e1x() argument
1016 static inline void bnx2x_vlan_mac_set_rdata_e1x(struct bnx2x *bp, in bnx2x_vlan_mac_set_rdata_e1x() argument
1023 bnx2x_vlan_mac_set_rdata_hdr_e1x(bp, o, type, cam_offset, in bnx2x_vlan_mac_set_rdata_e1x()
1025 bnx2x_vlan_mac_set_cfg_entry_e1x(bp, o, add, opcode, mac, vlan_id, in bnx2x_vlan_mac_set_rdata_e1x()
1042 static void bnx2x_set_one_mac_e1x(struct bnx2x *bp, in bnx2x_set_one_mac_e1x() argument
1059 bnx2x_vlan_mac_set_rdata_e1x(bp, o, raw->state, in bnx2x_set_one_mac_e1x()
1065 static void bnx2x_set_one_vlan_e2(struct bnx2x *bp, in bnx2x_set_one_vlan_e2() argument
1084 bnx2x_vlan_mac_set_cmd_hdr_e2(bp, o, add, CLASSIFY_RULE_OPCODE_VLAN, in bnx2x_set_one_vlan_e2()
1099 bnx2x_vlan_mac_set_cmd_hdr_e2(bp, in bnx2x_set_one_vlan_e2()
1115 static void bnx2x_set_one_vlan_mac_e2(struct bnx2x *bp, in bnx2x_set_one_vlan_mac_e2() argument
1136 bnx2x_vlan_mac_set_cmd_hdr_e2(bp, o, add, CLASSIFY_RULE_OPCODE_PAIR, in bnx2x_set_one_vlan_mac_e2()
1155 bnx2x_vlan_mac_set_cmd_hdr_e2(bp, target_obj, in bnx2x_set_one_vlan_mac_e2()
1181 static void bnx2x_set_one_vlan_mac_e1h(struct bnx2x *bp, in bnx2x_set_one_vlan_mac_e1h() argument
1198 bnx2x_vlan_mac_set_rdata_e1x(bp, o, BNX2X_FILTER_VLAN_MAC_PENDING, in bnx2x_set_one_vlan_mac_e1h()
1224 static int bnx2x_vlan_mac_restore(struct bnx2x *bp, in bnx2x_vlan_mac_restore() argument
1263 return bnx2x_config_vlan_mac(bp, p); in bnx2x_vlan_mac_restore()
1336 static inline int bnx2x_validate_vlan_mac_add(struct bnx2x *bp, in bnx2x_validate_vlan_mac_add() argument
1345 rc = o->check_add(bp, o, &elem->cmd_data.vlan_mac.u); in bnx2x_validate_vlan_mac_add()
1384 static inline int bnx2x_validate_vlan_mac_del(struct bnx2x *bp, in bnx2x_validate_vlan_mac_del() argument
1396 pos = o->check_del(bp, o, &elem->cmd_data.vlan_mac.u); in bnx2x_validate_vlan_mac_del()
1443 static inline int bnx2x_validate_vlan_mac_move(struct bnx2x *bp, in bnx2x_validate_vlan_mac_move() argument
1456 if (!src_o->check_move(bp, src_o, dest_o, in bnx2x_validate_vlan_mac_move()
1505 static int bnx2x_validate_vlan_mac(struct bnx2x *bp, in bnx2x_validate_vlan_mac() argument
1511 return bnx2x_validate_vlan_mac_add(bp, qo, elem); in bnx2x_validate_vlan_mac()
1513 return bnx2x_validate_vlan_mac_del(bp, qo, elem); in bnx2x_validate_vlan_mac()
1515 return bnx2x_validate_vlan_mac_move(bp, qo, elem); in bnx2x_validate_vlan_mac()
1521 static int bnx2x_remove_vlan_mac(struct bnx2x *bp, in bnx2x_remove_vlan_mac() argument
1557 static int bnx2x_wait_vlan_mac(struct bnx2x *bp, in bnx2x_wait_vlan_mac() argument
1566 rc = raw->wait_comp(bp, raw); in bnx2x_wait_vlan_mac()
1580 static int __bnx2x_vlan_mac_execute_step(struct bnx2x *bp, in __bnx2x_vlan_mac_execute_step() argument
1589 rc = __bnx2x_vlan_mac_h_write_trylock(bp, o); in __bnx2x_vlan_mac_execute_step()
1592 __bnx2x_vlan_mac_h_pend(bp, o, *ramrod_flags); in __bnx2x_vlan_mac_execute_step()
1599 rc = bnx2x_exe_queue_step(bp, &o->exe_queue, ramrod_flags); in __bnx2x_vlan_mac_execute_step()
1615 static int bnx2x_complete_vlan_mac(struct bnx2x *bp, in bnx2x_complete_vlan_mac() argument
1629 __bnx2x_exe_queue_reset_pending(bp, &o->exe_queue); in bnx2x_complete_vlan_mac()
1642 rc = __bnx2x_vlan_mac_execute_step(bp, o, ramrod_flags); in bnx2x_complete_vlan_mac()
1662 static int bnx2x_optimize_vlan_mac(struct bnx2x *bp, in bnx2x_optimize_vlan_mac() argument
1706 bnx2x_exe_queue_free_elem(bp, pos); in bnx2x_optimize_vlan_mac()
1725 struct bnx2x *bp, in bnx2x_vlan_mac_get_registry_elem() argument
1761 reg_elem = o->check_del(bp, o, &elem->cmd_data.vlan_mac.u); in bnx2x_vlan_mac_get_registry_elem()
1777 static int bnx2x_execute_vlan_mac(struct bnx2x *bp, in bnx2x_execute_vlan_mac() argument
1811 rc = bnx2x_vlan_mac_get_registry_elem(bp, cam_obj, in bnx2x_execute_vlan_mac()
1826 o->set_one_rule(bp, o, elem, idx, in bnx2x_execute_vlan_mac()
1843 rc = bnx2x_sp_post(bp, o->ramrod_cmd, r->cid, in bnx2x_execute_vlan_mac()
1856 reg_elem = o->check_del(bp, o, in bnx2x_execute_vlan_mac()
1888 reg_elem = o->check_del(bp, cam_obj, in bnx2x_execute_vlan_mac()
1901 struct bnx2x *bp, in bnx2x_vlan_mac_push_new_cmd() argument
1909 elem = bnx2x_exe_queue_alloc_elem(bp); in bnx2x_vlan_mac_push_new_cmd()
1926 return bnx2x_exe_queue_add(bp, &o->exe_queue, elem, restore); in bnx2x_vlan_mac_push_new_cmd()
1936 int bnx2x_config_vlan_mac(struct bnx2x *bp, in bnx2x_config_vlan_mac() argument
1949 rc = bnx2x_vlan_mac_push_new_cmd(bp, p); in bnx2x_config_vlan_mac()
1968 rc = __bnx2x_vlan_mac_execute_step(bp, p->vlan_mac_obj, in bnx2x_config_vlan_mac()
1987 rc = raw->wait_comp(bp, raw); in bnx2x_config_vlan_mac()
1992 rc = __bnx2x_vlan_mac_execute_step(bp, in bnx2x_config_vlan_mac()
2018 static int bnx2x_vlan_mac_del_all(struct bnx2x *bp, in bnx2x_vlan_mac_del_all() argument
2039 rc = exeq->remove(bp, exeq->owner, exeq_pos); in bnx2x_vlan_mac_del_all()
2046 bnx2x_exe_queue_free_elem(bp, exeq_pos); in bnx2x_vlan_mac_del_all()
2066 read_lock = bnx2x_vlan_mac_h_read_lock(bp, o); in bnx2x_vlan_mac_del_all()
2076 rc = bnx2x_config_vlan_mac(bp, &p); in bnx2x_vlan_mac_del_all()
2079 bnx2x_vlan_mac_h_read_unlock(bp, o); in bnx2x_vlan_mac_del_all()
2086 bnx2x_vlan_mac_h_read_unlock(bp, o); in bnx2x_vlan_mac_del_all()
2091 return bnx2x_config_vlan_mac(bp, &p); in bnx2x_vlan_mac_del_all()
2135 void bnx2x_init_mac_obj(struct bnx2x *bp, in bnx2x_init_mac_obj() argument
2154 if (CHIP_IS_E1x(bp)) { in bnx2x_init_mac_obj()
2162 bnx2x_exe_queue_init(bp, in bnx2x_init_mac_obj()
2179 bnx2x_exe_queue_init(bp, in bnx2x_init_mac_obj()
2189 void bnx2x_init_vlan_obj(struct bnx2x *bp, in bnx2x_init_vlan_obj() argument
2207 if (CHIP_IS_E1x(bp)) { in bnx2x_init_vlan_obj()
2220 bnx2x_exe_queue_init(bp, in bnx2x_init_vlan_obj()
2230 void bnx2x_init_vlan_mac_obj(struct bnx2x *bp, in bnx2x_init_vlan_mac_obj() argument
2255 if (CHIP_IS_E1(bp)) { in bnx2x_init_vlan_mac_obj()
2258 } else if (CHIP_IS_E1H(bp)) { in bnx2x_init_vlan_mac_obj()
2266 bnx2x_exe_queue_init(bp, in bnx2x_init_vlan_mac_obj()
2282 bnx2x_exe_queue_init(bp, in bnx2x_init_vlan_mac_obj()
2293 static inline void __storm_memset_mac_filters(struct bnx2x *bp, in __storm_memset_mac_filters() argument
2302 __storm_memset_struct(bp, addr, size, (u32 *)mac_filters); in __storm_memset_mac_filters()
2305 static int bnx2x_set_rx_mode_e1x(struct bnx2x *bp, in bnx2x_set_rx_mode_e1x() argument
2377 __storm_memset_mac_filters(bp, mac_filters, p->func_id); in bnx2x_set_rx_mode_e1x()
2395 static inline void bnx2x_rx_mode_set_cmd_state_e2(struct bnx2x *bp, in bnx2x_rx_mode_set_cmd_state_e2() argument
2444 static int bnx2x_set_rx_mode_e2(struct bnx2x *bp, in bnx2x_set_rx_mode_e2() argument
2464 bnx2x_rx_mode_set_cmd_state_e2(bp, &p->tx_accept_flags, in bnx2x_set_rx_mode_e2()
2477 bnx2x_rx_mode_set_cmd_state_e2(bp, &p->rx_accept_flags, in bnx2x_set_rx_mode_e2()
2491 data->rules[rule_idx].client_id = bnx2x_fcoe(bp, cl_id); in bnx2x_set_rx_mode_e2()
2497 bnx2x_rx_mode_set_cmd_state_e2(bp, &p->tx_accept_flags, in bnx2x_set_rx_mode_e2()
2505 data->rules[rule_idx].client_id = bnx2x_fcoe(bp, cl_id); in bnx2x_set_rx_mode_e2()
2511 bnx2x_rx_mode_set_cmd_state_e2(bp, &p->rx_accept_flags, in bnx2x_set_rx_mode_e2()
2535 rc = bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_FILTER_RULES, p->cid, in bnx2x_set_rx_mode_e2()
2546 static int bnx2x_wait_rx_mode_comp_e2(struct bnx2x *bp, in bnx2x_wait_rx_mode_comp_e2() argument
2549 return bnx2x_state_wait(bp, p->state, p->pstate); in bnx2x_wait_rx_mode_comp_e2()
2552 static int bnx2x_empty_rx_mode_wait(struct bnx2x *bp, in bnx2x_empty_rx_mode_wait() argument
2559 int bnx2x_config_rx_mode(struct bnx2x *bp, in bnx2x_config_rx_mode() argument
2565 rc = p->rx_mode_obj->config_rx_mode(bp, p); in bnx2x_config_rx_mode()
2571 rc = p->rx_mode_obj->wait_comp(bp, p); in bnx2x_config_rx_mode()
2579 void bnx2x_init_rx_mode_obj(struct bnx2x *bp, in bnx2x_init_rx_mode_obj() argument
2582 if (CHIP_IS_E1x(bp)) { in bnx2x_init_rx_mode_obj()
2620 static int bnx2x_mcast_wait(struct bnx2x *bp, in bnx2x_mcast_wait() argument
2623 if (bnx2x_state_wait(bp, o->sched_state, o->raw.pstate) || in bnx2x_mcast_wait()
2624 o->raw.wait_comp(bp, &o->raw)) in bnx2x_mcast_wait()
2630 static int bnx2x_mcast_enqueue_cmd(struct bnx2x *bp, in bnx2x_mcast_enqueue_cmd() argument
2762 static void bnx2x_mcast_set_one_rule_e2(struct bnx2x *bp, in bnx2x_mcast_set_one_rule_e2() argument
2825 struct bnx2x *bp, struct bnx2x_mcast_obj *o , int start_bin, in bnx2x_mcast_handle_restore_cmd_e2() argument
2836 o->set_one_rule(bp, o, cnt, &cfg_data, in bnx2x_mcast_handle_restore_cmd_e2()
2855 static inline void bnx2x_mcast_hdl_pending_add_e2(struct bnx2x *bp, in bnx2x_mcast_hdl_pending_add_e2() argument
2867 o->set_one_rule(bp, o, cnt, &cfg_data, cmd_pos->type); in bnx2x_mcast_hdl_pending_add_e2()
2890 static inline void bnx2x_mcast_hdl_pending_del_e2(struct bnx2x *bp, in bnx2x_mcast_hdl_pending_del_e2() argument
2897 o->set_one_rule(bp, o, cnt, NULL, cmd_pos->type); in bnx2x_mcast_hdl_pending_del_e2()
2920 static inline void bnx2x_mcast_hdl_pending_restore_e2(struct bnx2x *bp, in bnx2x_mcast_hdl_pending_restore_e2() argument
2924 cmd_pos->data.next_bin = o->hdl_restore(bp, o, cmd_pos->data.next_bin, in bnx2x_mcast_hdl_pending_restore_e2()
2935 static inline int bnx2x_mcast_handle_pending_cmds_e2(struct bnx2x *bp, in bnx2x_mcast_handle_pending_cmds_e2() argument
2946 bnx2x_mcast_hdl_pending_add_e2(bp, o, cmd_pos, &cnt); in bnx2x_mcast_handle_pending_cmds_e2()
2950 bnx2x_mcast_hdl_pending_del_e2(bp, o, cmd_pos, &cnt); in bnx2x_mcast_handle_pending_cmds_e2()
2954 bnx2x_mcast_hdl_pending_restore_e2(bp, o, cmd_pos, in bnx2x_mcast_handle_pending_cmds_e2()
2979 static inline void bnx2x_mcast_hdl_add(struct bnx2x *bp, in bnx2x_mcast_hdl_add() argument
2989 o->set_one_rule(bp, o, cnt, &cfg_data, BNX2X_MCAST_CMD_ADD); in bnx2x_mcast_hdl_add()
3000 static inline void bnx2x_mcast_hdl_del(struct bnx2x *bp, in bnx2x_mcast_hdl_del() argument
3007 o->set_one_rule(bp, o, cnt, NULL, BNX2X_MCAST_CMD_DEL); in bnx2x_mcast_hdl_del()
3030 static inline int bnx2x_mcast_handle_current_cmd(struct bnx2x *bp, in bnx2x_mcast_handle_current_cmd() argument
3042 bnx2x_mcast_hdl_add(bp, o, p, &cnt); in bnx2x_mcast_handle_current_cmd()
3046 bnx2x_mcast_hdl_del(bp, o, p, &cnt); in bnx2x_mcast_handle_current_cmd()
3050 o->hdl_restore(bp, o, 0, &cnt); in bnx2x_mcast_handle_current_cmd()
3064 static int bnx2x_mcast_validate_e2(struct bnx2x *bp, in bnx2x_mcast_validate_e2() argument
3109 static void bnx2x_mcast_revert_e2(struct bnx2x *bp, in bnx2x_mcast_revert_e2() argument
3126 static inline void bnx2x_mcast_set_rdata_hdr_e2(struct bnx2x *bp, in bnx2x_mcast_set_rdata_hdr_e2() argument
3151 static inline int bnx2x_mcast_refresh_registry_e2(struct bnx2x *bp, in bnx2x_mcast_refresh_registry_e2() argument
3168 static int bnx2x_mcast_setup_e2(struct bnx2x *bp, in bnx2x_mcast_setup_e2() argument
3181 cnt = bnx2x_mcast_handle_pending_cmds_e2(bp, p); in bnx2x_mcast_setup_e2()
3194 cnt = bnx2x_mcast_handle_current_cmd(bp, p, cmd, cnt); in bnx2x_mcast_setup_e2()
3205 bnx2x_mcast_set_rdata_hdr_e2(bp, p, (u8)cnt); in bnx2x_mcast_setup_e2()
3223 bnx2x_mcast_refresh_registry_e2(bp, o); in bnx2x_mcast_setup_e2()
3240 rc = bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_MULTICAST_RULES, in bnx2x_mcast_setup_e2()
3252 static int bnx2x_mcast_validate_e1h(struct bnx2x *bp, in bnx2x_mcast_validate_e1h() argument
3263 static void bnx2x_mcast_revert_e1h(struct bnx2x *bp, in bnx2x_mcast_revert_e1h() argument
3275 static inline void bnx2x_mcast_hdl_add_e1h(struct bnx2x *bp, in bnx2x_mcast_hdl_add_e1h() argument
3296 static inline void bnx2x_mcast_hdl_restore_e1h(struct bnx2x *bp, in bnx2x_mcast_hdl_restore_e1h() argument
3314 static int bnx2x_mcast_setup_e1h(struct bnx2x *bp, in bnx2x_mcast_setup_e1h() argument
3333 bnx2x_mcast_hdl_add_e1h(bp, o, p, mc_filter); in bnx2x_mcast_setup_e1h()
3346 bnx2x_mcast_hdl_restore_e1h(bp, o, p, mc_filter); in bnx2x_mcast_setup_e1h()
3356 REG_WR(bp, MC_HASH_OFFSET(bp, i), mc_filter[i]); in bnx2x_mcast_setup_e1h()
3368 static int bnx2x_mcast_validate_e1(struct bnx2x *bp, in bnx2x_mcast_validate_e1() argument
3423 static void bnx2x_mcast_revert_e1(struct bnx2x *bp, in bnx2x_mcast_revert_e1() argument
3439 static void bnx2x_mcast_set_one_rule_e1(struct bnx2x *bp, in bnx2x_mcast_set_one_rule_e1() argument
3473 static inline void bnx2x_mcast_set_rdata_hdr_e1(struct bnx2x *bp, in bnx2x_mcast_set_rdata_hdr_e1() argument
3481 u8 offset = (CHIP_REV_IS_SLOW(bp) ? in bnx2x_mcast_set_rdata_hdr_e1()
3507 struct bnx2x *bp, struct bnx2x_mcast_obj *o , int start_idx, in bnx2x_mcast_handle_restore_cmd_e1() argument
3517 o->set_one_rule(bp, o, i, &cfg_data, BNX2X_MCAST_CMD_RESTORE); in bnx2x_mcast_handle_restore_cmd_e1()
3531 struct bnx2x *bp, struct bnx2x_mcast_ramrod_params *p) in bnx2x_mcast_handle_pending_cmds_e1() argument
3551 o->set_one_rule(bp, o, cnt, &cfg_data, cmd_pos->type); in bnx2x_mcast_handle_pending_cmds_e1()
3566 o->hdl_restore(bp, o, 0, &cnt); in bnx2x_mcast_handle_pending_cmds_e1()
3610 static inline int bnx2x_mcast_refresh_registry_e1(struct bnx2x *bp, in bnx2x_mcast_refresh_registry_e1() argument
3657 static int bnx2x_mcast_setup_e1(struct bnx2x *bp, in bnx2x_mcast_setup_e1() argument
3677 cnt = bnx2x_mcast_handle_pending_cmds_e1(bp, p); in bnx2x_mcast_setup_e1()
3685 cnt = bnx2x_mcast_handle_current_cmd(bp, p, cmd, 0); in bnx2x_mcast_setup_e1()
3697 bnx2x_mcast_set_rdata_hdr_e1(bp, p, (u8)cnt); in bnx2x_mcast_setup_e1()
3705 rc = bnx2x_mcast_refresh_registry_e1(bp, o); in bnx2x_mcast_setup_e1()
3724 rc = bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_SET_MAC, raw->cid, in bnx2x_mcast_setup_e1()
3758 int bnx2x_config_mcast(struct bnx2x *bp, in bnx2x_config_mcast() argument
3772 rc = o->validate(bp, p, cmd); in bnx2x_config_mcast()
3788 rc = o->enqueue_cmd(bp, p->mcast_obj, p, cmd); in bnx2x_config_mcast()
3804 rc = o->config_mcast(bp, p, cmd); in bnx2x_config_mcast()
3810 rc = o->wait_comp(bp, o); in bnx2x_config_mcast()
3819 o->revert(bp, p, old_reg_size); in bnx2x_config_mcast()
3848 void bnx2x_init_mcast_obj(struct bnx2x *bp, in bnx2x_init_mcast_obj() argument
3868 if (CHIP_IS_E1(bp)) { in bnx2x_init_mcast_obj()
3875 if (CHIP_REV_IS_SLOW(bp)) in bnx2x_init_mcast_obj()
3894 } else if (CHIP_IS_E1H(bp)) { in bnx2x_init_mcast_obj()
4146 void bnx2x_init_mac_credit_pool(struct bnx2x *bp, in bnx2x_init_mac_credit_pool() argument
4155 if (CHIP_IS_E1(bp)) { in bnx2x_init_mac_credit_pool()
4157 if (!CHIP_REV_IS_SLOW(bp)) in bnx2x_init_mac_credit_pool()
4164 } else if (CHIP_IS_E1H(bp)) { in bnx2x_init_mac_credit_pool()
4169 if (!CHIP_REV_IS_SLOW(bp)) in bnx2x_init_mac_credit_pool()
4185 if (!CHIP_REV_IS_SLOW(bp)) in bnx2x_init_mac_credit_pool()
4186 cam_sz = PF_MAC_CREDIT_E2(bp, func_num); in bnx2x_init_mac_credit_pool()
4201 void bnx2x_init_vlan_credit_pool(struct bnx2x *bp, in bnx2x_init_vlan_credit_pool() argument
4206 if (CHIP_IS_E1x(bp)) { in bnx2x_init_vlan_credit_pool()
4216 int credit = PF_VLAN_CREDIT_E2(bp, func_num); in bnx2x_init_vlan_credit_pool()
4234 static inline void bnx2x_debug_print_ind_table(struct bnx2x *bp, in bnx2x_debug_print_ind_table() argument
4263 static int bnx2x_setup_rss(struct bnx2x *bp, in bnx2x_setup_rss() argument
4353 if (netif_msg_ifup(bp)) in bnx2x_setup_rss()
4354 bnx2x_debug_print_ind_table(bp, p); in bnx2x_setup_rss()
4364 rc = bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_RSS_UPDATE, r->cid, in bnx2x_setup_rss()
4381 int bnx2x_config_rss(struct bnx2x *bp, in bnx2x_config_rss() argument
4397 rc = o->config_rss(bp, p); in bnx2x_config_rss()
4404 rc = r->wait_comp(bp, r); in bnx2x_config_rss()
4409 void bnx2x_init_rss_config_obj(struct bnx2x *bp, in bnx2x_init_rss_config_obj() argument
4437 int bnx2x_queue_state_change(struct bnx2x *bp, in bnx2x_queue_state_change() argument
4445 rc = o->check_transition(bp, o, params); in bnx2x_queue_state_change()
4458 o->complete_cmd(bp, o, pending_bit); in bnx2x_queue_state_change()
4461 rc = o->send_cmd(bp, params); in bnx2x_queue_state_change()
4470 rc = o->wait_comp(bp, o, pending_bit); in bnx2x_queue_state_change()
4499 static int bnx2x_queue_wait_comp(struct bnx2x *bp, in bnx2x_queue_wait_comp() argument
4503 return bnx2x_state_wait(bp, cmd, &o->pending); in bnx2x_queue_wait_comp()
4515 static int bnx2x_queue_comp_cmd(struct bnx2x *bp, in bnx2x_queue_comp_cmd() argument
4558 static void bnx2x_q_fill_setup_data_e2(struct bnx2x *bp, in bnx2x_q_fill_setup_data_e2() argument
4571 static void bnx2x_q_fill_init_general_data(struct bnx2x *bp, in bnx2x_q_fill_init_general_data() argument
4727 static void bnx2x_q_fill_setup_data_cmn(struct bnx2x *bp, in bnx2x_q_fill_setup_data_cmn() argument
4731 bnx2x_q_fill_init_general_data(bp, cmd_params->q_obj, in bnx2x_q_fill_setup_data_cmn()
4752 static void bnx2x_q_fill_setup_tx_only(struct bnx2x *bp, in bnx2x_q_fill_setup_tx_only() argument
4756 bnx2x_q_fill_init_general_data(bp, cmd_params->q_obj, in bnx2x_q_fill_setup_tx_only()
4783 static inline int bnx2x_q_init(struct bnx2x *bp, in bnx2x_q_init() argument
4796 bnx2x_update_coalesce_sb_index(bp, init->tx.fw_sb_id, in bnx2x_q_init()
4807 bnx2x_update_coalesce_sb_index(bp, init->rx.fw_sb_id, in bnx2x_q_init()
4818 bnx2x_set_ctx_validation(bp, init->cxts[cos], o->cids[cos]); in bnx2x_q_init()
4822 o->complete_cmd(bp, o, BNX2X_Q_CMD_INIT); in bnx2x_q_init()
4830 static inline int bnx2x_q_send_setup_e1x(struct bnx2x *bp, in bnx2x_q_send_setup_e1x() argument
4843 bnx2x_q_fill_setup_data_cmn(bp, params, rdata); in bnx2x_q_send_setup_e1x()
4851 return bnx2x_sp_post(bp, ramrod, o->cids[BNX2X_PRIMARY_CID_INDEX], in bnx2x_q_send_setup_e1x()
4856 static inline int bnx2x_q_send_setup_e2(struct bnx2x *bp, in bnx2x_q_send_setup_e2() argument
4869 bnx2x_q_fill_setup_data_cmn(bp, params, rdata); in bnx2x_q_send_setup_e2()
4870 bnx2x_q_fill_setup_data_e2(bp, params, rdata); in bnx2x_q_send_setup_e2()
4878 return bnx2x_sp_post(bp, ramrod, o->cids[BNX2X_PRIMARY_CID_INDEX], in bnx2x_q_send_setup_e2()
4883 static inline int bnx2x_q_send_setup_tx_only(struct bnx2x *bp, in bnx2x_q_send_setup_tx_only() argument
4909 bnx2x_q_fill_setup_tx_only(bp, params, rdata); in bnx2x_q_send_setup_tx_only()
4921 return bnx2x_sp_post(bp, ramrod, o->cids[cid_index], in bnx2x_q_send_setup_tx_only()
4926 static void bnx2x_q_fill_update_data(struct bnx2x *bp, in bnx2x_q_fill_update_data() argument
4998 static inline int bnx2x_q_send_update(struct bnx2x *bp, in bnx2x_q_send_update() argument
5019 bnx2x_q_fill_update_data(bp, o, update_params, rdata); in bnx2x_q_send_update()
5027 return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_CLIENT_UPDATE, in bnx2x_q_send_update()
5040 static inline int bnx2x_q_send_deactivate(struct bnx2x *bp, in bnx2x_q_send_deactivate() argument
5049 return bnx2x_q_send_update(bp, params); in bnx2x_q_send_deactivate()
5060 static inline int bnx2x_q_send_activate(struct bnx2x *bp, in bnx2x_q_send_activate() argument
5070 return bnx2x_q_send_update(bp, params); in bnx2x_q_send_activate()
5073 static void bnx2x_q_fill_update_tpa_data(struct bnx2x *bp, in bnx2x_q_fill_update_tpa_data() argument
5095 static inline int bnx2x_q_send_update_tpa(struct bnx2x *bp, in bnx2x_q_send_update_tpa() argument
5110 bnx2x_q_fill_update_tpa_data(bp, o, update_tpa_params, rdata); in bnx2x_q_send_update_tpa()
5125 return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_TPA_UPDATE, in bnx2x_q_send_update_tpa()
5131 static inline int bnx2x_q_send_halt(struct bnx2x *bp, in bnx2x_q_send_halt() argument
5136 return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_HALT, in bnx2x_q_send_halt()
5141 static inline int bnx2x_q_send_cfc_del(struct bnx2x *bp, in bnx2x_q_send_cfc_del() argument
5153 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_CFC_DEL, in bnx2x_q_send_cfc_del()
5157 static inline int bnx2x_q_send_terminate(struct bnx2x *bp, in bnx2x_q_send_terminate() argument
5169 return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_TERMINATE, in bnx2x_q_send_terminate()
5173 static inline int bnx2x_q_send_empty(struct bnx2x *bp, in bnx2x_q_send_empty() argument
5178 return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_EMPTY, in bnx2x_q_send_empty()
5183 static inline int bnx2x_queue_send_cmd_cmn(struct bnx2x *bp, in bnx2x_queue_send_cmd_cmn() argument
5188 return bnx2x_q_init(bp, params); in bnx2x_queue_send_cmd_cmn()
5190 return bnx2x_q_send_setup_tx_only(bp, params); in bnx2x_queue_send_cmd_cmn()
5192 return bnx2x_q_send_deactivate(bp, params); in bnx2x_queue_send_cmd_cmn()
5194 return bnx2x_q_send_activate(bp, params); in bnx2x_queue_send_cmd_cmn()
5196 return bnx2x_q_send_update(bp, params); in bnx2x_queue_send_cmd_cmn()
5198 return bnx2x_q_send_update_tpa(bp, params); in bnx2x_queue_send_cmd_cmn()
5200 return bnx2x_q_send_halt(bp, params); in bnx2x_queue_send_cmd_cmn()
5202 return bnx2x_q_send_cfc_del(bp, params); in bnx2x_queue_send_cmd_cmn()
5204 return bnx2x_q_send_terminate(bp, params); in bnx2x_queue_send_cmd_cmn()
5206 return bnx2x_q_send_empty(bp, params); in bnx2x_queue_send_cmd_cmn()
5213 static int bnx2x_queue_send_cmd_e1x(struct bnx2x *bp, in bnx2x_queue_send_cmd_e1x() argument
5218 return bnx2x_q_send_setup_e1x(bp, params); in bnx2x_queue_send_cmd_e1x()
5229 return bnx2x_queue_send_cmd_cmn(bp, params); in bnx2x_queue_send_cmd_e1x()
5236 static int bnx2x_queue_send_cmd_e2(struct bnx2x *bp, in bnx2x_queue_send_cmd_e2() argument
5241 return bnx2x_q_send_setup_e2(bp, params); in bnx2x_queue_send_cmd_e2()
5252 return bnx2x_queue_send_cmd_cmn(bp, params); in bnx2x_queue_send_cmd_e2()
5275 static int bnx2x_queue_chk_transition(struct bnx2x *bp, in bnx2x_queue_chk_transition() argument
5441 void bnx2x_init_queue_obj(struct bnx2x *bp, in bnx2x_init_queue_obj() argument
5461 if (CHIP_IS_E1x(bp)) in bnx2x_init_queue_obj()
5474 int bnx2x_get_q_logical_state(struct bnx2x *bp, in bnx2x_get_q_logical_state() argument
5495 enum bnx2x_func_state bnx2x_func_get_state(struct bnx2x *bp, in bnx2x_func_get_state() argument
5510 static int bnx2x_func_wait_comp(struct bnx2x *bp, in bnx2x_func_wait_comp() argument
5514 return bnx2x_state_wait(bp, cmd, &o->pending); in bnx2x_func_wait_comp()
5527 static inline int bnx2x_func_state_change_comp(struct bnx2x *bp, in bnx2x_func_state_change_comp() argument
5535 cmd, BP_FUNC(bp), o->state, in bnx2x_func_state_change_comp()
5542 cmd, BP_FUNC(bp), o->next_state); in bnx2x_func_state_change_comp()
5567 static int bnx2x_func_comp_cmd(struct bnx2x *bp, in bnx2x_func_comp_cmd() argument
5574 int rc = bnx2x_func_state_change_comp(bp, o, cmd); in bnx2x_func_comp_cmd()
5593 static int bnx2x_func_chk_transition(struct bnx2x *bp, in bnx2x_func_chk_transition() argument
5699 static inline int bnx2x_func_init_func(struct bnx2x *bp, in bnx2x_func_init_func() argument
5702 return drv->init_hw_func(bp); in bnx2x_func_init_func()
5716 static inline int bnx2x_func_init_port(struct bnx2x *bp, in bnx2x_func_init_port() argument
5719 int rc = drv->init_hw_port(bp); in bnx2x_func_init_port()
5723 return bnx2x_func_init_func(bp, drv); in bnx2x_func_init_port()
5736 static inline int bnx2x_func_init_cmn_chip(struct bnx2x *bp, in bnx2x_func_init_cmn_chip() argument
5739 int rc = drv->init_hw_cmn_chip(bp); in bnx2x_func_init_cmn_chip()
5743 return bnx2x_func_init_port(bp, drv); in bnx2x_func_init_cmn_chip()
5756 static inline int bnx2x_func_init_cmn(struct bnx2x *bp, in bnx2x_func_init_cmn() argument
5759 int rc = drv->init_hw_cmn(bp); in bnx2x_func_init_cmn()
5763 return bnx2x_func_init_port(bp, drv); in bnx2x_func_init_cmn()
5766 static int bnx2x_func_hw_init(struct bnx2x *bp, in bnx2x_func_hw_init() argument
5775 BP_ABS_FUNC(bp), load_code); in bnx2x_func_hw_init()
5778 rc = drv->gunzip_init(bp); in bnx2x_func_hw_init()
5783 rc = drv->init_fw(bp); in bnx2x_func_hw_init()
5792 rc = bnx2x_func_init_cmn_chip(bp, drv); in bnx2x_func_hw_init()
5798 rc = bnx2x_func_init_cmn(bp, drv); in bnx2x_func_hw_init()
5804 rc = bnx2x_func_init_port(bp, drv); in bnx2x_func_hw_init()
5810 rc = bnx2x_func_init_func(bp, drv); in bnx2x_func_hw_init()
5821 drv->gunzip_end(bp); in bnx2x_func_hw_init()
5827 o->complete_cmd(bp, o, BNX2X_F_CMD_HW_INIT); in bnx2x_func_hw_init()
5841 static inline void bnx2x_func_reset_func(struct bnx2x *bp, in bnx2x_func_reset_func() argument
5844 drv->reset_hw_func(bp); in bnx2x_func_reset_func()
5862 static inline void bnx2x_func_reset_port(struct bnx2x *bp, in bnx2x_func_reset_port() argument
5865 drv->reset_hw_port(bp); in bnx2x_func_reset_port()
5866 bnx2x_func_reset_func(bp, drv); in bnx2x_func_reset_port()
5879 static inline void bnx2x_func_reset_cmn(struct bnx2x *bp, in bnx2x_func_reset_cmn() argument
5882 bnx2x_func_reset_port(bp, drv); in bnx2x_func_reset_cmn()
5883 drv->reset_hw_cmn(bp); in bnx2x_func_reset_cmn()
5886 static inline int bnx2x_func_hw_reset(struct bnx2x *bp, in bnx2x_func_hw_reset() argument
5893 DP(BNX2X_MSG_SP, "function %d reset_phase %x\n", BP_ABS_FUNC(bp), in bnx2x_func_hw_reset()
5898 bnx2x_func_reset_cmn(bp, drv); in bnx2x_func_hw_reset()
5901 bnx2x_func_reset_port(bp, drv); in bnx2x_func_hw_reset()
5904 bnx2x_func_reset_func(bp, drv); in bnx2x_func_hw_reset()
5913 o->complete_cmd(bp, o, BNX2X_F_CMD_HW_RESET); in bnx2x_func_hw_reset()
5918 static inline int bnx2x_func_send_start(struct bnx2x *bp, in bnx2x_func_send_start() argument
5932 rdata->path_id = BP_PATH(bp); in bnx2x_func_send_start()
5974 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_FUNCTION_START, 0, in bnx2x_func_send_start()
5979 static inline int bnx2x_func_send_switch_update(struct bnx2x *bp, in bnx2x_func_send_switch_update() argument
6053 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_FUNCTION_UPDATE, 0, in bnx2x_func_send_switch_update()
6058 static inline int bnx2x_func_send_afex_update(struct bnx2x *bp, in bnx2x_func_send_afex_update() argument
6091 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_FUNCTION_UPDATE, 0, in bnx2x_func_send_afex_update()
6097 inline int bnx2x_func_send_afex_viflists(struct bnx2x *bp, in bnx2x_func_send_afex_viflists() argument
6130 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_AFEX_VIF_LISTS, 0, in bnx2x_func_send_afex_viflists()
6135 static inline int bnx2x_func_send_stop(struct bnx2x *bp, in bnx2x_func_send_stop() argument
6138 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_FUNCTION_STOP, 0, 0, 0, in bnx2x_func_send_stop()
6142 static inline int bnx2x_func_send_tx_stop(struct bnx2x *bp, in bnx2x_func_send_tx_stop() argument
6145 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_STOP_TRAFFIC, 0, 0, 0, in bnx2x_func_send_tx_stop()
6148 static inline int bnx2x_func_send_tx_start(struct bnx2x *bp, in bnx2x_func_send_tx_start() argument
6177 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_START_TRAFFIC, 0, in bnx2x_func_send_tx_start()
6183 int bnx2x_func_send_set_timesync(struct bnx2x *bp, in bnx2x_func_send_set_timesync() argument
6213 return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_SET_TIMESYNC, 0, in bnx2x_func_send_set_timesync()
6218 static int bnx2x_func_send_cmd(struct bnx2x *bp, in bnx2x_func_send_cmd() argument
6223 return bnx2x_func_hw_init(bp, params); in bnx2x_func_send_cmd()
6225 return bnx2x_func_send_start(bp, params); in bnx2x_func_send_cmd()
6227 return bnx2x_func_send_stop(bp, params); in bnx2x_func_send_cmd()
6229 return bnx2x_func_hw_reset(bp, params); in bnx2x_func_send_cmd()
6231 return bnx2x_func_send_afex_update(bp, params); in bnx2x_func_send_cmd()
6233 return bnx2x_func_send_afex_viflists(bp, params); in bnx2x_func_send_cmd()
6235 return bnx2x_func_send_tx_stop(bp, params); in bnx2x_func_send_cmd()
6237 return bnx2x_func_send_tx_start(bp, params); in bnx2x_func_send_cmd()
6239 return bnx2x_func_send_switch_update(bp, params); in bnx2x_func_send_cmd()
6241 return bnx2x_func_send_set_timesync(bp, params); in bnx2x_func_send_cmd()
6248 void bnx2x_init_func_obj(struct bnx2x *bp, in bnx2x_init_func_obj() argument
6283 int bnx2x_func_state_change(struct bnx2x *bp, in bnx2x_func_state_change() argument
6294 rc = o->check_transition(bp, o, params); in bnx2x_func_state_change()
6301 rc = o->check_transition(bp, o, params); in bnx2x_func_state_change()
6318 bnx2x_func_state_change_comp(bp, o, cmd); in bnx2x_func_state_change()
6322 rc = o->send_cmd(bp, params); in bnx2x_func_state_change()
6334 rc = o->wait_comp(bp, o, cmd); in bnx2x_func_state_change()