Lines Matching refs:bnxt
308 static void bnxt_db_nq(struct bnxt *bp, struct bnxt_db_info *db, u32 idx) in bnxt_db_nq()
316 static void bnxt_db_nq_arm(struct bnxt *bp, struct bnxt_db_info *db, u32 idx) in bnxt_db_nq_arm()
324 static void bnxt_db_cq(struct bnxt *bp, struct bnxt_db_info *db, u32 idx) in bnxt_db_cq()
365 static void bnxt_txr_db_kick(struct bnxt *bp, struct bnxt_tx_ring_info *txr, in bnxt_txr_db_kick()
372 static bool bnxt_txr_netif_try_stop_queue(struct bnxt *bp, in bnxt_txr_netif_try_stop_queue()
394 struct bnxt *bp = netdev_priv(dev); in bnxt_start_xmit()
664 static void bnxt_tx_int(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts) in bnxt_tx_int()
725 static struct page *__bnxt_alloc_rx_page(struct bnxt *bp, dma_addr_t *mapping, in __bnxt_alloc_rx_page()
746 static inline u8 *__bnxt_alloc_rx_data(struct bnxt *bp, dma_addr_t *mapping, in __bnxt_alloc_rx_data()
767 int bnxt_alloc_rx_data(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, in bnxt_alloc_rx_data()
828 static inline int bnxt_alloc_rx_page(struct bnxt *bp, in bnxt_alloc_rx_page()
885 static struct rx_agg_cmp *bnxt_get_agg(struct bnxt *bp, in bnxt_get_agg()
897 static struct rx_agg_cmp *bnxt_get_tpa_agg_p5(struct bnxt *bp, in bnxt_get_tpa_agg_p5()
910 struct bnxt *bp = bnapi->bp; in bnxt_reuse_rx_agg_bufs()
963 static struct sk_buff *bnxt_rx_page_skb(struct bnxt *bp, in bnxt_rx_page_skb()
1010 static struct sk_buff *bnxt_rx_skb(struct bnxt *bp, in bnxt_rx_skb()
1039 static struct sk_buff *bnxt_rx_pages(struct bnxt *bp, in bnxt_rx_pages()
1116 static int bnxt_agg_bufs_valid(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_agg_bufs_valid()
1133 struct bnxt *bp = bnapi->bp; in bnxt_copy_skb()
1154 static int bnxt_discard_rx(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_discard_rx()
1184 static void bnxt_queue_fw_reset_work(struct bnxt *bp, unsigned long delay) in bnxt_queue_fw_reset_work()
1195 static void bnxt_queue_sp_work(struct bnxt *bp) in bnxt_queue_sp_work()
1203 static void bnxt_sched_reset(struct bnxt *bp, struct bnxt_rx_ring_info *rxr) in bnxt_sched_reset()
1243 static void bnxt_tpa_start(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, in bnxt_tpa_start()
1498 static inline struct sk_buff *bnxt_gro_skb(struct bnxt *bp, in bnxt_gro_skb()
1530 static struct net_device *bnxt_get_pkt_dev(struct bnxt *bp, u16 cfa_code) in bnxt_get_pkt_dev()
1538 static inline struct sk_buff *bnxt_tpa_end(struct bnxt *bp, in bnxt_tpa_end()
1682 static void bnxt_tpa_agg(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, in bnxt_tpa_agg()
1694 static void bnxt_deliver_skb(struct bnxt *bp, struct bnxt_napi *bnapi, in bnxt_deliver_skb()
1713 static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_rx_pkt()
1935 static int bnxt_force_rx_discard(struct bnxt *bp, in bnxt_force_rx_discard()
1975 u32 bnxt_fw_health_readl(struct bnxt *bp, int reg_idx) in bnxt_fw_health_readl()
2002 static u16 bnxt_agg_ring_id_to_grp_idx(struct bnxt *bp, u16 ring_id) in bnxt_agg_ring_id_to_grp_idx()
2029 static int bnxt_async_event_process(struct bnxt *bp, in bnxt_async_event_process()
2180 static int bnxt_hwrm_handler(struct bnxt *bp, struct tx_cmp *txcmp) in bnxt_hwrm_handler()
2225 struct bnxt *bp = bnapi->bp; in bnxt_msix()
2235 static inline int bnxt_has_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr) in bnxt_has_work()
2249 struct bnxt *bp = bnapi->bp; in bnxt_inta()
2274 static int __bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in __bnxt_poll_work()
2362 static void __bnxt_poll_work_done(struct bnxt *bp, struct bnxt_napi *bnapi) in __bnxt_poll_work_done()
2379 static int bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_poll_work()
2400 struct bnxt *bp = bnapi->bp; in bnxt_poll_nitroa0()
2471 struct bnxt *bp = bnapi->bp; in bnxt_poll()
2502 static int __bnxt_poll_cqs(struct bnxt *bp, struct bnxt_napi *bnapi, int budget) in __bnxt_poll_cqs()
2519 static void __bnxt_poll_cqs_done(struct bnxt *bp, struct bnxt_napi *bnapi, in __bnxt_poll_cqs_done()
2544 struct bnxt *bp = bnapi->bp; in bnxt_poll_p5()
2599 static void bnxt_free_tx_skbs(struct bnxt *bp) in bnxt_free_tx_skbs()
2670 static void bnxt_free_one_rx_ring_skbs(struct bnxt *bp, int ring_nr) in bnxt_free_one_rx_ring_skbs()
2756 static void bnxt_free_rx_skbs(struct bnxt *bp) in bnxt_free_rx_skbs()
2767 static void bnxt_free_skbs(struct bnxt *bp) in bnxt_free_skbs()
2773 static void bnxt_free_ring(struct bnxt *bp, struct bnxt_ring_mem_info *rmem) in bnxt_free_ring()
2802 static int bnxt_alloc_ring(struct bnxt *bp, struct bnxt_ring_mem_info *rmem) in bnxt_alloc_ring()
2855 static void bnxt_free_tpa_info(struct bnxt *bp) in bnxt_free_tpa_info()
2873 static int bnxt_alloc_tpa_info(struct bnxt *bp) in bnxt_alloc_tpa_info()
2910 static void bnxt_free_rx_rings(struct bnxt *bp) in bnxt_free_rx_rings()
2942 static int bnxt_alloc_rx_page_pool(struct bnxt *bp, in bnxt_alloc_rx_page_pool()
2962 static int bnxt_alloc_rx_rings(struct bnxt *bp) in bnxt_alloc_rx_rings()
3020 static void bnxt_free_tx_rings(struct bnxt *bp) in bnxt_free_tx_rings()
3044 static int bnxt_alloc_tx_rings(struct bnxt *bp) in bnxt_alloc_tx_rings()
3104 static void bnxt_free_cp_rings(struct bnxt *bp) in bnxt_free_cp_rings()
3138 static struct bnxt_cp_ring_info *bnxt_alloc_cp_sub_ring(struct bnxt *bp) in bnxt_alloc_cp_sub_ring()
3165 static int bnxt_alloc_cp_rings(struct bnxt *bp) in bnxt_alloc_cp_rings()
3219 static void bnxt_init_ring_struct(struct bnxt *bp) in bnxt_init_ring_struct()
3303 static int bnxt_alloc_one_rx_ring(struct bnxt *bp, int ring_nr) in bnxt_alloc_one_rx_ring()
3352 static int bnxt_init_one_rx_ring(struct bnxt *bp, int ring_nr) in bnxt_init_one_rx_ring()
3387 static void bnxt_init_cp_rings(struct bnxt *bp) in bnxt_init_cp_rings()
3412 static int bnxt_init_rx_rings(struct bnxt *bp) in bnxt_init_rx_rings()
3433 static int bnxt_init_tx_rings(struct bnxt *bp) in bnxt_init_tx_rings()
3450 static void bnxt_free_ring_grps(struct bnxt *bp) in bnxt_free_ring_grps()
3456 static int bnxt_init_ring_grps(struct bnxt *bp, bool irq_re_init) in bnxt_init_ring_grps()
3478 static void bnxt_free_vnics(struct bnxt *bp) in bnxt_free_vnics()
3485 static int bnxt_alloc_vnics(struct bnxt *bp) in bnxt_alloc_vnics()
3506 static void bnxt_init_vnics(struct bnxt *bp) in bnxt_init_vnics()
3549 void bnxt_set_tpa_flags(struct bnxt *bp) in bnxt_set_tpa_flags()
3563 void bnxt_set_ring_params(struct bnxt *bp) in bnxt_set_ring_params()
3646 int bnxt_set_rx_skb_mode(struct bnxt *bp, bool page_mode) in bnxt_set_rx_skb_mode()
3668 static void bnxt_free_vnic_attributes(struct bnxt *bp) in bnxt_free_vnic_attributes()
3704 static int bnxt_alloc_vnic_attributes(struct bnxt *bp) in bnxt_alloc_vnic_attributes()
3781 static void bnxt_free_hwrm_resources(struct bnxt *bp) in bnxt_free_hwrm_resources()
3799 static int bnxt_alloc_kong_hwrm_resources(struct bnxt *bp) in bnxt_alloc_kong_hwrm_resources()
3816 static int bnxt_alloc_hwrm_resources(struct bnxt *bp) in bnxt_alloc_hwrm_resources()
3829 static void bnxt_free_hwrm_short_cmd_req(struct bnxt *bp) in bnxt_free_hwrm_short_cmd_req()
3841 static int bnxt_alloc_hwrm_short_cmd_req(struct bnxt *bp) in bnxt_alloc_hwrm_short_cmd_req()
3858 static void bnxt_free_stats_mem(struct bnxt *bp, struct bnxt_stats_mem *stats) in bnxt_free_stats_mem()
3871 static int bnxt_alloc_stats_mem(struct bnxt *bp, struct bnxt_stats_mem *stats, in bnxt_alloc_stats_mem()
3911 static int bnxt_hwrm_func_qstat_ext(struct bnxt *bp, in bnxt_hwrm_func_qstat_ext()
3939 static int bnxt_hwrm_port_qstats(struct bnxt *bp, u8 flags);
3940 static int bnxt_hwrm_port_qstats_ext(struct bnxt *bp, u8 flags);
3942 static void bnxt_init_stats(struct bnxt *bp) in bnxt_init_stats()
4013 static void bnxt_free_port_stats(struct bnxt *bp) in bnxt_free_port_stats()
4023 static void bnxt_free_ring_stats(struct bnxt *bp) in bnxt_free_ring_stats()
4038 static int bnxt_alloc_stats(struct bnxt *bp) in bnxt_alloc_stats()
4101 static void bnxt_clear_ring_indices(struct bnxt *bp) in bnxt_clear_ring_indices()
4136 static void bnxt_free_ntp_fltrs(struct bnxt *bp, bool irq_reinit) in bnxt_free_ntp_fltrs()
4163 static int bnxt_alloc_ntp_fltrs(struct bnxt *bp) in bnxt_alloc_ntp_fltrs()
4188 static void bnxt_free_mem(struct bnxt *bp, bool irq_re_init) in bnxt_free_mem()
4215 static int bnxt_alloc_mem(struct bnxt *bp, bool irq_re_init) in bnxt_alloc_mem()
4340 static void bnxt_disable_int(struct bnxt *bp) in bnxt_disable_int()
4357 static int bnxt_cp_num_to_irq_num(struct bnxt *bp, int n) in bnxt_cp_num_to_irq_num()
4366 static void bnxt_disable_int_sync(struct bnxt *bp) in bnxt_disable_int_sync()
4380 static void bnxt_enable_int(struct bnxt *bp) in bnxt_enable_int()
4393 void bnxt_hwrm_cmd_hdr_init(struct bnxt *bp, void *request, u16 req_type, in bnxt_hwrm_cmd_hdr_init()
4436 static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len, in bnxt_hwrm_do_send_msg()
4628 int _hwrm_send_message(struct bnxt *bp, void *msg, u32 msg_len, int timeout) in _hwrm_send_message()
4633 int _hwrm_send_message_silent(struct bnxt *bp, void *msg, u32 msg_len, in _hwrm_send_message_silent()
4639 int hwrm_send_message(struct bnxt *bp, void *msg, u32 msg_len, int timeout) in hwrm_send_message()
4649 int hwrm_send_message_silent(struct bnxt *bp, void *msg, u32 msg_len, in hwrm_send_message_silent()
4660 int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp, unsigned long *bmap, int bmap_size, in bnxt_hwrm_func_drv_rgtr()
4751 static int bnxt_hwrm_func_drv_unrgtr(struct bnxt *bp) in bnxt_hwrm_func_drv_unrgtr()
4762 static int bnxt_hwrm_tunnel_dst_port_free(struct bnxt *bp, u8 tunnel_type) in bnxt_hwrm_tunnel_dst_port_free()
4790 static int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, __be16 port, in bnxt_hwrm_tunnel_dst_port_alloc()
4827 static int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, u16 vnic_id) in bnxt_hwrm_cfa_l2_set_rx_mask()
4842 static int bnxt_hwrm_cfa_ntuple_filter_free(struct bnxt *bp, in bnxt_hwrm_cfa_ntuple_filter_free()
4871 static int bnxt_hwrm_cfa_ntuple_filter_alloc(struct bnxt *bp, in bnxt_hwrm_cfa_ntuple_filter_alloc()
4941 static int bnxt_hwrm_set_vnic_filter(struct bnxt *bp, u16 vnic_id, u16 idx, in bnxt_hwrm_set_vnic_filter()
4975 static int bnxt_hwrm_clear_vnic_filter(struct bnxt *bp) in bnxt_hwrm_clear_vnic_filter()
5003 static int bnxt_hwrm_vnic_set_tpa(struct bnxt *bp, u16 vnic_id, u32 tpa_flags) in bnxt_hwrm_vnic_set_tpa()
5062 static u16 bnxt_cp_ring_from_grp(struct bnxt *bp, struct bnxt_ring_struct *ring) in bnxt_cp_ring_from_grp()
5070 static u16 bnxt_cp_ring_for_rx(struct bnxt *bp, struct bnxt_rx_ring_info *rxr) in bnxt_cp_ring_for_rx()
5083 static u16 bnxt_cp_ring_for_tx(struct bnxt *bp, struct bnxt_tx_ring_info *txr) in bnxt_cp_ring_for_tx()
5096 static int bnxt_alloc_rss_indir_tbl(struct bnxt *bp) in bnxt_alloc_rss_indir_tbl()
5113 static void bnxt_set_dflt_rss_indir_tbl(struct bnxt *bp) in bnxt_set_dflt_rss_indir_tbl()
5135 static u16 bnxt_get_max_rss_ring(struct bnxt *bp) in bnxt_get_max_rss_ring()
5148 int bnxt_get_nr_rss_ctxs(struct bnxt *bp, int rx_rings) in bnxt_get_nr_rss_ctxs()
5157 static void __bnxt_fill_hw_rss_tbl(struct bnxt *bp, struct bnxt_vnic_info *vnic) in __bnxt_fill_hw_rss_tbl()
5170 static void __bnxt_fill_hw_rss_tbl_p5(struct bnxt *bp, in __bnxt_fill_hw_rss_tbl_p5()
5192 static void bnxt_fill_hw_rss_tbl(struct bnxt *bp, struct bnxt_vnic_info *vnic) in bnxt_fill_hw_rss_tbl()
5200 static int bnxt_hwrm_vnic_set_rss(struct bnxt *bp, u16 vnic_id, bool set_rss) in bnxt_hwrm_vnic_set_rss()
5222 static int bnxt_hwrm_vnic_set_rss_p5(struct bnxt *bp, u16 vnic_id, bool set_rss) in bnxt_hwrm_vnic_set_rss_p5()
5254 static int bnxt_hwrm_vnic_set_hds(struct bnxt *bp, u16 vnic_id) in bnxt_hwrm_vnic_set_hds()
5273 static void bnxt_hwrm_vnic_ctx_free_one(struct bnxt *bp, u16 vnic_id, in bnxt_hwrm_vnic_ctx_free_one()
5286 static void bnxt_hwrm_vnic_ctx_free(struct bnxt *bp) in bnxt_hwrm_vnic_ctx_free()
5301 static int bnxt_hwrm_vnic_ctx_alloc(struct bnxt *bp, u16 vnic_id, u16 ctx_idx) in bnxt_hwrm_vnic_ctx_alloc()
5321 static u32 bnxt_get_roce_vnic_mode(struct bnxt *bp) in bnxt_get_roce_vnic_mode()
5328 int bnxt_hwrm_vnic_cfg(struct bnxt *bp, u16 vnic_id) in bnxt_hwrm_vnic_cfg()
5399 static void bnxt_hwrm_vnic_free_one(struct bnxt *bp, u16 vnic_id) in bnxt_hwrm_vnic_free_one()
5413 static void bnxt_hwrm_vnic_free(struct bnxt *bp) in bnxt_hwrm_vnic_free()
5421 static int bnxt_hwrm_vnic_alloc(struct bnxt *bp, u16 vnic_id, in bnxt_hwrm_vnic_alloc()
5461 static int bnxt_hwrm_vnic_qcaps(struct bnxt *bp) in bnxt_hwrm_vnic_qcaps()
5504 static int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp) in bnxt_hwrm_ring_grp_alloc()
5538 static void bnxt_hwrm_ring_grp_free(struct bnxt *bp) in bnxt_hwrm_ring_grp_free()
5561 static int hwrm_ring_alloc_send_msg(struct bnxt *bp, in hwrm_ring_alloc_send_msg()
5676 static int bnxt_hwrm_set_async_event_cr(struct bnxt *bp, int idx) in bnxt_hwrm_set_async_event_cr()
5700 static void bnxt_set_db(struct bnxt *bp, struct bnxt_db_info *db, u32 ring_type, in bnxt_set_db()
5741 static int bnxt_hwrm_ring_alloc(struct bnxt *bp) in bnxt_hwrm_ring_alloc()
5864 static int hwrm_ring_free_send_msg(struct bnxt *bp, in hwrm_ring_free_send_msg()
5893 static void bnxt_hwrm_ring_free(struct bnxt *bp, bool close_path) in bnxt_hwrm_ring_free()
5994 static int bnxt_trim_rings(struct bnxt *bp, int *rx, int *tx, int max,
5997 static int bnxt_hwrm_get_rings(struct bnxt *bp) in bnxt_hwrm_get_rings()
6051 int __bnxt_hwrm_get_tx_rings(struct bnxt *bp, u16 fid, int *tx_rings) in __bnxt_hwrm_get_tx_rings()
6069 static bool bnxt_rfs_supported(struct bnxt *bp);
6072 __bnxt_hwrm_reserve_pf_rings(struct bnxt *bp, struct hwrm_func_cfg_input *req, in __bnxt_hwrm_reserve_pf_rings()
6122 __bnxt_hwrm_reserve_vf_rings(struct bnxt *bp, in __bnxt_hwrm_reserve_vf_rings()
6164 bnxt_hwrm_reserve_pf_rings(struct bnxt *bp, int tx_rings, int rx_rings, in bnxt_hwrm_reserve_pf_rings()
6186 bnxt_hwrm_reserve_vf_rings(struct bnxt *bp, int tx_rings, int rx_rings, in bnxt_hwrm_reserve_vf_rings()
6206 static int bnxt_hwrm_reserve_rings(struct bnxt *bp, int tx, int rx, int grp, in bnxt_hwrm_reserve_rings()
6217 int bnxt_nq_rings_in_use(struct bnxt *bp) in bnxt_nq_rings_in_use()
6232 static int bnxt_cp_rings_in_use(struct bnxt *bp) in bnxt_cp_rings_in_use()
6243 static int bnxt_get_func_stat_ctxs(struct bnxt *bp) in bnxt_get_func_stat_ctxs()
6260 static void bnxt_check_rss_tbl_no_rmgr(struct bnxt *bp) in bnxt_check_rss_tbl_no_rmgr()
6272 static bool bnxt_need_reserve_rings(struct bnxt *bp) in bnxt_need_reserve_rings()
6309 static int __bnxt_reserve_rings(struct bnxt *bp) in __bnxt_reserve_rings()
6396 static int bnxt_hwrm_check_vf_rings(struct bnxt *bp, int tx_rings, int rx_rings, in bnxt_hwrm_check_vf_rings()
6422 static int bnxt_hwrm_check_pf_rings(struct bnxt *bp, int tx_rings, int rx_rings, in bnxt_hwrm_check_pf_rings()
6449 static int bnxt_hwrm_check_rings(struct bnxt *bp, int tx_rings, int rx_rings, in bnxt_hwrm_check_rings()
6465 static void bnxt_hwrm_coal_params_qcaps(struct bnxt *bp) in bnxt_hwrm_coal_params_qcaps()
6510 static u16 bnxt_usec_to_coal_tmr(struct bnxt *bp, u16 usec) in bnxt_usec_to_coal_tmr()
6517 static void bnxt_hwrm_set_coal_params(struct bnxt *bp, in bnxt_hwrm_set_coal_params()
6576 static int __bnxt_hwrm_set_coal_nq(struct bnxt *bp, struct bnxt_napi *bnapi, in __bnxt_hwrm_set_coal_nq()
6601 int bnxt_hwrm_set_ring_coal(struct bnxt *bp, struct bnxt_napi *bnapi) in bnxt_hwrm_set_ring_coal()
6629 int bnxt_hwrm_set_coal(struct bnxt *bp) in bnxt_hwrm_set_coal()
6685 static void bnxt_hwrm_stat_ctx_free(struct bnxt *bp) in bnxt_hwrm_stat_ctx_free()
6721 static int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp) in bnxt_hwrm_stat_ctx_alloc()
6755 static int bnxt_hwrm_func_qcfg(struct bnxt *bp) in bnxt_hwrm_func_qcfg()
6830 static int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp) in bnxt_hwrm_func_backing_store_qcaps()
6931 static int bnxt_hwrm_func_backing_store_cfg(struct bnxt *bp, u32 enables) in bnxt_hwrm_func_backing_store_cfg()
7032 static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp, in bnxt_alloc_ctx_mem_blk()
7046 static int bnxt_alloc_ctx_pg_tbls(struct bnxt *bp, in bnxt_alloc_ctx_pg_tbls()
7109 static void bnxt_free_ctx_pg_tbls(struct bnxt *bp, in bnxt_free_ctx_pg_tbls()
7138 static void bnxt_free_ctx_mem(struct bnxt *bp) in bnxt_free_ctx_mem()
7163 static int bnxt_alloc_ctx_mem(struct bnxt *bp) in bnxt_alloc_ctx_mem()
7285 int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp, bool all) in bnxt_hwrm_func_resc_qcaps()
7342 static int __bnxt_hwrm_func_qcaps(struct bnxt *bp) in __bnxt_hwrm_func_qcaps()
7427 static int bnxt_hwrm_queue_qportcfg(struct bnxt *bp);
7429 static int bnxt_hwrm_func_qcaps(struct bnxt *bp) in bnxt_hwrm_func_qcaps()
7452 static int bnxt_hwrm_cfa_adv_flow_mgnt_qcaps(struct bnxt *bp) in bnxt_hwrm_cfa_adv_flow_mgnt_qcaps()
7480 static int __bnxt_alloc_fw_health(struct bnxt *bp) in __bnxt_alloc_fw_health()
7492 static int bnxt_alloc_fw_health(struct bnxt *bp) in bnxt_alloc_fw_health()
7510 static void __bnxt_map_fw_health_reg(struct bnxt *bp, u32 reg) in __bnxt_map_fw_health_reg()
7517 static void bnxt_try_map_fw_health_reg(struct bnxt *bp) in bnxt_try_map_fw_health_reg()
7551 static int bnxt_map_fw_health_regs(struct bnxt *bp) in bnxt_map_fw_health_regs()
7576 static int bnxt_hwrm_error_recovery_qcfg(struct bnxt *bp) in bnxt_hwrm_error_recovery_qcfg()
7638 static int bnxt_hwrm_func_reset(struct bnxt *bp) in bnxt_hwrm_func_reset()
7648 static void bnxt_nvm_cfg_ver_get(struct bnxt *bp) in bnxt_nvm_cfg_ver_get()
7658 static int bnxt_hwrm_queue_qportcfg(struct bnxt *bp) in bnxt_hwrm_queue_qportcfg()
7707 static int __bnxt_hwrm_ver_get(struct bnxt *bp, bool silent) in __bnxt_hwrm_ver_get()
7722 static int bnxt_hwrm_ver_get(struct bnxt *bp) in bnxt_hwrm_ver_get()
7827 int bnxt_hwrm_fw_set_time(struct bnxt *bp) in bnxt_hwrm_fw_set_time()
7886 static void bnxt_accumulate_all_stats(struct bnxt *bp) in bnxt_accumulate_all_stats()
7931 static int bnxt_hwrm_port_qstats(struct bnxt *bp, u8 flags) in bnxt_hwrm_port_qstats()
7951 static int bnxt_hwrm_port_qstats_ext(struct bnxt *bp, u8 flags) in bnxt_hwrm_port_qstats_ext()
8028 static void bnxt_hwrm_free_tunnel_ports(struct bnxt *bp) in bnxt_hwrm_free_tunnel_ports()
8038 static int bnxt_set_tpa(struct bnxt *bp, bool set_tpa) in bnxt_set_tpa()
8058 static void bnxt_hwrm_clear_vnic_rss(struct bnxt *bp) in bnxt_hwrm_clear_vnic_rss()
8066 static void bnxt_clear_vnic(struct bnxt *bp) in bnxt_clear_vnic()
8085 static void bnxt_hwrm_resource_free(struct bnxt *bp, bool close_path, in bnxt_hwrm_resource_free()
8097 static int bnxt_hwrm_set_br_mode(struct bnxt *bp, u16 br_mode) in bnxt_hwrm_set_br_mode()
8113 static int bnxt_hwrm_set_cache_line_size(struct bnxt *bp, int size) in bnxt_hwrm_set_cache_line_size()
8130 static int __bnxt_setup_vnic(struct bnxt *bp, u16 vnic_id) in __bnxt_setup_vnic()
8186 static int __bnxt_setup_vnic_p5(struct bnxt *bp, u16 vnic_id) in __bnxt_setup_vnic_p5()
8225 static int bnxt_setup_vnic(struct bnxt *bp, u16 vnic_id) in bnxt_setup_vnic()
8233 static int bnxt_alloc_rfs_vnics(struct bnxt *bp) in bnxt_alloc_rfs_vnics()
8270 static bool bnxt_promisc_ok(struct bnxt *bp) in bnxt_promisc_ok()
8279 static int bnxt_setup_nitroa0_vnic(struct bnxt *bp) in bnxt_setup_nitroa0_vnic()
8299 static int bnxt_cfg_rx_mode(struct bnxt *);
8300 static bool bnxt_mc_list_updated(struct bnxt *, u32 *);
8302 static int bnxt_init_chip(struct bnxt *bp, bool irq_re_init) in bnxt_init_chip()
8412 static int bnxt_shutdown_nic(struct bnxt *bp, bool irq_re_init) in bnxt_shutdown_nic()
8418 static int bnxt_init_nic(struct bnxt *bp, bool irq_re_init) in bnxt_init_nic()
8429 static int bnxt_set_real_num_queues(struct bnxt *bp) in bnxt_set_real_num_queues()
8451 static int bnxt_trim_rings(struct bnxt *bp, int *rx, int *tx, int max, in bnxt_trim_rings()
8475 static void bnxt_setup_msix(struct bnxt *bp) in bnxt_setup_msix()
8509 static void bnxt_setup_inta(struct bnxt *bp) in bnxt_setup_inta()
8521 static int bnxt_init_int_mode(struct bnxt *bp);
8523 static int bnxt_setup_int_mode(struct bnxt *bp) in bnxt_setup_int_mode()
8543 static unsigned int bnxt_get_max_func_rss_ctxs(struct bnxt *bp) in bnxt_get_max_func_rss_ctxs()
8548 static unsigned int bnxt_get_max_func_vnics(struct bnxt *bp) in bnxt_get_max_func_vnics()
8554 unsigned int bnxt_get_max_func_stat_ctxs(struct bnxt *bp) in bnxt_get_max_func_stat_ctxs()
8559 unsigned int bnxt_get_max_func_cp_rings(struct bnxt *bp) in bnxt_get_max_func_cp_rings()
8564 static unsigned int bnxt_get_max_func_cp_rings_for_en(struct bnxt *bp) in bnxt_get_max_func_cp_rings_for_en()
8574 static unsigned int bnxt_get_max_func_irqs(struct bnxt *bp) in bnxt_get_max_func_irqs()
8584 static void bnxt_set_max_func_irqs(struct bnxt *bp, unsigned int max_irqs) in bnxt_set_max_func_irqs()
8589 unsigned int bnxt_get_avail_cp_rings_for_en(struct bnxt *bp) in bnxt_get_avail_cp_rings_for_en()
8600 unsigned int bnxt_get_avail_stat_ctxs_for_en(struct bnxt *bp) in bnxt_get_avail_stat_ctxs_for_en()
8605 int bnxt_get_avail_msix(struct bnxt *bp, int num) in bnxt_get_avail_msix()
8627 static int bnxt_get_num_msix(struct bnxt *bp) in bnxt_get_num_msix()
8635 static int bnxt_init_msix(struct bnxt *bp) in bnxt_init_msix()
8700 static int bnxt_init_inta(struct bnxt *bp) in bnxt_init_inta()
8715 static int bnxt_init_int_mode(struct bnxt *bp) in bnxt_init_int_mode()
8729 static void bnxt_clear_int_mode(struct bnxt *bp) in bnxt_clear_int_mode()
8739 int bnxt_reserve_rings(struct bnxt *bp, bool irq_re_init) in bnxt_reserve_rings()
8773 static void bnxt_free_irq(struct bnxt *bp) in bnxt_free_irq()
8802 static int bnxt_request_irq(struct bnxt *bp) in bnxt_request_irq()
8860 static void bnxt_del_napi(struct bnxt *bp) in bnxt_del_napi()
8878 static void bnxt_init_napi(struct bnxt *bp) in bnxt_init_napi()
8906 static void bnxt_disable_napi(struct bnxt *bp) in bnxt_disable_napi()
8922 static void bnxt_enable_napi(struct bnxt *bp) in bnxt_enable_napi()
8943 void bnxt_tx_disable(struct bnxt *bp) in bnxt_tx_disable()
8962 void bnxt_tx_enable(struct bnxt *bp) in bnxt_tx_enable()
9002 static void bnxt_report_link(struct bnxt *bp) in bnxt_report_link()
9055 static int bnxt_hwrm_phy_qcaps(struct bnxt *bp) in bnxt_hwrm_phy_qcaps()
9135 int bnxt_update_link(struct bnxt *bp, bool chng_link_state) in bnxt_update_link()
9267 static void bnxt_get_port_module_status(struct bnxt *bp) in bnxt_get_port_module_status()
9295 bnxt_hwrm_set_pause_common(struct bnxt *bp, struct hwrm_port_phy_cfg_input *req) in bnxt_hwrm_set_pause_common()
9322 static void bnxt_hwrm_set_link_common(struct bnxt *bp, struct hwrm_port_phy_cfg_input *req) in bnxt_hwrm_set_link_common()
9352 int bnxt_hwrm_set_pause(struct bnxt *bp) in bnxt_hwrm_set_pause()
9382 static void bnxt_hwrm_set_eee(struct bnxt *bp, in bnxt_hwrm_set_eee()
9405 int bnxt_hwrm_set_link_setting(struct bnxt *bp, bool set_pause, bool set_eee) in bnxt_hwrm_set_link_setting()
9420 static int bnxt_hwrm_shutdown_link(struct bnxt *bp) in bnxt_hwrm_shutdown_link()
9435 static int bnxt_fw_init_one(struct bnxt *bp);
9437 static int bnxt_hwrm_if_change(struct bnxt *bp, bool up) in bnxt_hwrm_if_change()
9514 static int bnxt_hwrm_port_led_qcaps(struct bnxt *bp) in bnxt_hwrm_port_led_qcaps()
9554 int bnxt_hwrm_alloc_wol_fltr(struct bnxt *bp) in bnxt_hwrm_alloc_wol_fltr()
9573 int bnxt_hwrm_free_wol_fltr(struct bnxt *bp) in bnxt_hwrm_free_wol_fltr()
9584 static u16 bnxt_hwrm_get_wol_fltrs(struct bnxt *bp, u16 handle) in bnxt_hwrm_get_wol_fltrs()
9610 static void bnxt_get_wol_settings(struct bnxt *bp) in bnxt_get_wol_settings()
9629 struct bnxt *bp = dev_get_drvdata(dev); in bnxt_show_temp()
9650 ATTRIBUTE_GROUPS(bnxt);
9652 static void bnxt_hwmon_close(struct bnxt *bp) in bnxt_hwmon_close()
9660 static void bnxt_hwmon_open(struct bnxt *bp) in bnxt_hwmon_open()
9685 static void bnxt_hwmon_close(struct bnxt *bp) in bnxt_hwmon_close()
9689 static void bnxt_hwmon_open(struct bnxt *bp) in bnxt_hwmon_open()
9694 static bool bnxt_eee_config_ok(struct bnxt *bp) in bnxt_eee_config_ok()
9718 static int bnxt_update_phy_setting(struct bnxt *bp) in bnxt_update_phy_setting()
9788 static void bnxt_preset_reg_win(struct bnxt *bp) in bnxt_preset_reg_win()
9797 static int bnxt_init_dflt_ring_mode(struct bnxt *bp);
9799 static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init) in __bnxt_open_nic()
9888 int bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init) in bnxt_open_nic()
9907 int bnxt_half_open_nic(struct bnxt *bp) in bnxt_half_open_nic()
9939 void bnxt_half_close_nic(struct bnxt *bp) in bnxt_half_close_nic()
9946 static void bnxt_reenable_sriov(struct bnxt *bp) in bnxt_reenable_sriov()
9959 struct bnxt *bp = netdev_priv(dev); in bnxt_open()
9986 static bool bnxt_drv_busy(struct bnxt *bp) in bnxt_drv_busy()
9992 static void bnxt_get_ring_stats(struct bnxt *bp,
9995 static void __bnxt_close_nic(struct bnxt *bp, bool irq_re_init, in __bnxt_close_nic()
10030 int bnxt_close_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init) in bnxt_close_nic()
10061 struct bnxt *bp = netdev_priv(dev); in bnxt_close()
10070 static int bnxt_hwrm_port_phy_read(struct bnxt *bp, u16 phy_addr, u16 reg, in bnxt_hwrm_port_phy_read()
10099 static int bnxt_hwrm_port_phy_write(struct bnxt *bp, u16 phy_addr, u16 reg, in bnxt_hwrm_port_phy_write()
10126 struct bnxt *bp = netdev_priv(dev); in bnxt_ioctl()
10160 static void bnxt_get_ring_stats(struct bnxt *bp, in bnxt_get_ring_stats()
10195 static void bnxt_add_prev_stats(struct bnxt *bp, in bnxt_add_prev_stats()
10212 struct bnxt *bp = netdev_priv(dev); in bnxt_get_stats64()
10253 static bool bnxt_mc_list_updated(struct bnxt *bp, u32 *rx_mask) in bnxt_mc_list_updated()
10287 static bool bnxt_uc_list_updated(struct bnxt *bp) in bnxt_uc_list_updated()
10308 struct bnxt *bp = netdev_priv(dev); in bnxt_set_rx_mode()
10346 static int bnxt_cfg_rx_mode(struct bnxt *bp) in bnxt_cfg_rx_mode()
10415 static bool bnxt_can_reserve_rings(struct bnxt *bp) in bnxt_can_reserve_rings()
10435 static bool bnxt_rfs_supported(struct bnxt *bp) in bnxt_rfs_supported()
10453 static bool bnxt_rfs_capable(struct bnxt *bp) in bnxt_rfs_capable()
10499 struct bnxt *bp = netdev_priv(dev); in bnxt_fix_features()
10533 struct bnxt *bp = netdev_priv(dev); in bnxt_set_features()
10597 int bnxt_dbg_hwrm_rd_reg(struct bnxt *bp, u32 reg_off, u16 num_words, in bnxt_dbg_hwrm_rd_reg()
10629 static int bnxt_dbg_hwrm_ring_info_get(struct bnxt *bp, u8 ring_type, in bnxt_dbg_hwrm_ring_info_get()
10685 static void bnxt_dbg_dump_states(struct bnxt *bp) in bnxt_dbg_dump_states()
10700 static int bnxt_hwrm_rx_ring_reset(struct bnxt *bp, int ring_nr) in bnxt_hwrm_rx_ring_reset()
10717 static void bnxt_reset_task(struct bnxt *bp, bool silent) in bnxt_reset_task()
10738 struct bnxt *bp = netdev_priv(dev); in bnxt_tx_timeout()
10745 static void bnxt_fw_health_check(struct bnxt *bp) in bnxt_fw_health_check()
10780 struct bnxt *bp = from_timer(bp, t, timer); in bnxt_timer()
10828 static void bnxt_rtnl_lock_sp(struct bnxt *bp) in bnxt_rtnl_lock_sp()
10839 static void bnxt_rtnl_unlock_sp(struct bnxt *bp) in bnxt_rtnl_unlock_sp()
10846 static void bnxt_reset(struct bnxt *bp, bool silent) in bnxt_reset()
10855 static void bnxt_rx_ring_reset(struct bnxt *bp) in bnxt_rx_ring_reset()
10903 static void bnxt_fw_reset_close(struct bnxt *bp) in bnxt_fw_reset_close()
10921 static bool is_bnxt_fw_ok(struct bnxt *bp) in is_bnxt_fw_ok()
10942 static void bnxt_force_fw_reset(struct bnxt *bp) in bnxt_force_fw_reset()
10969 void bnxt_fw_exception(struct bnxt *bp) in bnxt_fw_exception()
10981 static int bnxt_get_registered_vfs(struct bnxt *bp) in bnxt_get_registered_vfs()
11002 void bnxt_fw_reset(struct bnxt *bp) in bnxt_fw_reset()
11043 static void bnxt_chk_missed_irq(struct bnxt *bp) in bnxt_chk_missed_irq()
11081 static void bnxt_cfg_ntp_filters(struct bnxt *);
11083 static void bnxt_init_ethtool_link_settings(struct bnxt *bp) in bnxt_init_ethtool_link_settings()
11117 struct bnxt *bp = container_of(work, struct bnxt, sp_task); in bnxt_sp_task()
11208 int bnxt_check_rings(struct bnxt *bp, int tx, int rx, bool sh, int tcs, in bnxt_check_rings()
11246 static void bnxt_unmap_bars(struct bnxt *bp, struct pci_dev *pdev) in bnxt_unmap_bars()
11264 static void bnxt_cleanup_pci(struct bnxt *bp) in bnxt_cleanup_pci()
11272 static void bnxt_init_dflt_coal(struct bnxt *bp) in bnxt_init_dflt_coal()
11298 static int bnxt_fw_reset_via_optee(struct bnxt *bp) in bnxt_fw_reset_via_optee()
11313 static int bnxt_fw_init_one_p1(struct bnxt *bp) in bnxt_fw_init_one_p1()
11360 static int bnxt_fw_init_one_p2(struct bnxt *bp) in bnxt_fw_init_one_p2()
11398 static void bnxt_set_dflt_rss_hash_type(struct bnxt *bp) in bnxt_set_dflt_rss_hash_type()
11412 static void bnxt_set_dflt_rfs(struct bnxt *bp) in bnxt_set_dflt_rfs()
11428 static void bnxt_fw_init_one_p3(struct bnxt *bp) in bnxt_fw_init_one_p3()
11445 static int bnxt_probe_phy(struct bnxt *bp, bool fw_dflt);
11447 static int bnxt_fw_init_one(struct bnxt *bp) in bnxt_fw_init_one()
11477 static void bnxt_fw_reset_writel(struct bnxt *bp, int reg_idx) in bnxt_fw_reset_writel()
11509 static void bnxt_reset_all(struct bnxt *bp) in bnxt_reset_all()
11540 struct bnxt *bp = container_of(work, struct bnxt, fw_reset_task.work); in bnxt_fw_reset_task()
11698 struct bnxt *bp = netdev_priv(dev); in bnxt_init_board()
11790 struct bnxt *bp = netdev_priv(dev); in bnxt_change_mac_addr()
11815 struct bnxt *bp = netdev_priv(dev); in bnxt_change_mtu()
11831 struct bnxt *bp = netdev_priv(dev); in bnxt_setup_mq_tc()
11876 struct bnxt *bp = cb_priv; in bnxt_setup_tc_block_cb()
11895 struct bnxt *bp = netdev_priv(dev); in bnxt_setup_tc()
11950 struct bnxt *bp = netdev_priv(dev); in bnxt_rx_flow_steer()
12045 static void bnxt_cfg_ntp_filters(struct bnxt *bp) in bnxt_cfg_ntp_filters()
12093 static void bnxt_cfg_ntp_filters(struct bnxt *bp) in bnxt_cfg_ntp_filters()
12101 struct bnxt *bp = netdev_priv(netdev); in bnxt_udp_tunnel_sync()
12131 struct bnxt *bp = netdev_priv(dev); in bnxt_bridge_getlink()
12140 struct bnxt *bp = netdev_priv(dev); in bnxt_bridge_setlink()
12175 struct bnxt *bp = netdev_priv(dev); in bnxt_get_port_parent_id()
12192 struct bnxt *bp = netdev_priv(dev); in bnxt_get_devlink_port()
12235 struct bnxt *bp = netdev_priv(dev); in bnxt_remove_one()
12274 static int bnxt_probe_phy(struct bnxt *bp, bool fw_dflt) in bnxt_probe_phy()
12316 static void _bnxt_get_max_rings(struct bnxt *bp, int *max_rx, int *max_tx, in _bnxt_get_max_rings()
12345 int bnxt_get_max_rings(struct bnxt *bp, int *max_rx, int *max_tx, bool shared) in bnxt_get_max_rings()
12358 static int bnxt_get_dflt_rings(struct bnxt *bp, int *max_rx, int *max_tx, in bnxt_get_dflt_rings()
12406 static void bnxt_trim_dflt_sh_rings(struct bnxt *bp) in bnxt_trim_dflt_sh_rings()
12414 static int bnxt_set_dflt_rings(struct bnxt *bp, bool sh) in bnxt_set_dflt_rings()
12469 static int bnxt_init_dflt_ring_mode(struct bnxt *bp) in bnxt_init_dflt_ring_mode()
12496 int bnxt_restore_pf_fw_resources(struct bnxt *bp) in bnxt_restore_pf_fw_resources()
12521 static int bnxt_init_mac_addr(struct bnxt *bp) in bnxt_init_mac_addr()
12549 static void bnxt_vpd_read_info(struct bnxt *bp) in bnxt_vpd_read_info()
12607 static int bnxt_pcie_dsn_get(struct bnxt *bp, u8 dsn[]) in bnxt_pcie_dsn_get()
12624 static int bnxt_map_db_bar(struct bnxt *bp) in bnxt_map_db_bar()
12637 struct bnxt *bp; in bnxt_init_one()
12864 struct bnxt *bp; in bnxt_shutdown()
12894 struct bnxt *bp = netdev_priv(dev); in bnxt_suspend()
12915 struct bnxt *bp = netdev_priv(dev); in bnxt_resume()
12981 struct bnxt *bp = netdev_priv(netdev); in bnxt_io_error_detected()
13025 struct bnxt *bp = netdev_priv(netdev); in bnxt_io_slot_reset()
13074 struct bnxt *bp = netdev_priv(netdev); in bnxt_io_resume()