Lines Matching refs:bnxt

271 static void bnxt_db_nq(struct bnxt *bp, struct bnxt_db_info *db, u32 idx)  in bnxt_db_nq()
279 static void bnxt_db_nq_arm(struct bnxt *bp, struct bnxt_db_info *db, u32 idx) in bnxt_db_nq_arm()
287 static void bnxt_db_cq(struct bnxt *bp, struct bnxt_db_info *db, u32 idx) in bnxt_db_cq()
328 static void bnxt_txr_db_kick(struct bnxt *bp, struct bnxt_tx_ring_info *txr, in bnxt_txr_db_kick()
335 static bool bnxt_txr_netif_try_stop_queue(struct bnxt *bp, in bnxt_txr_netif_try_stop_queue()
357 struct bnxt *bp = netdev_priv(dev); in bnxt_start_xmit()
651 static void bnxt_tx_int(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts) in bnxt_tx_int()
722 static struct page *__bnxt_alloc_rx_page(struct bnxt *bp, dma_addr_t *mapping, in __bnxt_alloc_rx_page()
742 static inline u8 *__bnxt_alloc_rx_frag(struct bnxt *bp, dma_addr_t *mapping, in __bnxt_alloc_rx_frag()
766 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()
893 static struct rx_agg_cmp *bnxt_get_agg(struct bnxt *bp, in bnxt_get_agg()
905 static struct rx_agg_cmp *bnxt_get_tpa_agg_p5(struct bnxt *bp, in bnxt_get_tpa_agg_p5()
918 struct bnxt *bp = bnapi->bp; in bnxt_reuse_rx_agg_bufs()
971 static struct sk_buff *bnxt_rx_multi_page_skb(struct bnxt *bp, in bnxt_rx_multi_page_skb()
1004 static struct sk_buff *bnxt_rx_page_skb(struct bnxt *bp, in bnxt_rx_page_skb()
1051 static struct sk_buff *bnxt_rx_skb(struct bnxt *bp, in bnxt_rx_skb()
1080 static u32 __bnxt_rx_agg_pages(struct bnxt *bp, in __bnxt_rx_agg_pages()
1156 static struct sk_buff *bnxt_rx_agg_pages_skb(struct bnxt *bp, in bnxt_rx_agg_pages_skb()
1177 static u32 bnxt_rx_agg_pages_xdp(struct bnxt *bp, in bnxt_rx_agg_pages_xdp()
1198 static int bnxt_agg_bufs_valid(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_agg_bufs_valid()
1215 struct bnxt *bp = bnapi->bp; in bnxt_copy_skb()
1236 static int bnxt_discard_rx(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_discard_rx()
1266 static void bnxt_queue_fw_reset_work(struct bnxt *bp, unsigned long delay) in bnxt_queue_fw_reset_work()
1277 static void bnxt_queue_sp_work(struct bnxt *bp) in bnxt_queue_sp_work()
1285 static void bnxt_sched_reset(struct bnxt *bp, struct bnxt_rx_ring_info *rxr) in bnxt_sched_reset()
1325 static void bnxt_tpa_start(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, in bnxt_tpa_start()
1580 static inline struct sk_buff *bnxt_gro_skb(struct bnxt *bp, in bnxt_gro_skb()
1612 static struct net_device *bnxt_get_pkt_dev(struct bnxt *bp, u16 cfa_code) in bnxt_get_pkt_dev()
1620 static inline struct sk_buff *bnxt_tpa_end(struct bnxt *bp, in bnxt_tpa_end()
1768 static void bnxt_tpa_agg(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, in bnxt_tpa_agg()
1780 static void bnxt_deliver_skb(struct bnxt *bp, struct bnxt_napi *bnapi, in bnxt_deliver_skb()
1799 static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_rx_pkt()
2077 static int bnxt_force_rx_discard(struct bnxt *bp, in bnxt_force_rx_discard()
2121 u32 bnxt_fw_health_readl(struct bnxt *bp, int reg_idx) in bnxt_fw_health_readl()
2148 static u16 bnxt_agg_ring_id_to_grp_idx(struct bnxt *bp, u16 ring_id) in bnxt_agg_ring_id_to_grp_idx()
2163 static void bnxt_event_error_report(struct bnxt *bp, u32 data1, u32 data2) in bnxt_event_error_report()
2207 static int bnxt_async_event_process(struct bnxt *bp, in bnxt_async_event_process()
2419 static int bnxt_hwrm_handler(struct bnxt *bp, struct tx_cmp *txcmp) in bnxt_hwrm_handler()
2462 struct bnxt *bp = bnapi->bp; in bnxt_msix()
2472 static inline int bnxt_has_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr) in bnxt_has_work()
2486 struct bnxt *bp = bnapi->bp; in bnxt_inta()
2511 static int __bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in __bnxt_poll_work()
2599 static void __bnxt_poll_work_done(struct bnxt *bp, struct bnxt_napi *bnapi) in __bnxt_poll_work_done()
2619 static int bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_poll_work()
2640 struct bnxt *bp = bnapi->bp; in bnxt_poll_nitroa0()
2711 struct bnxt *bp = bnapi->bp; in bnxt_poll()
2746 static int __bnxt_poll_cqs(struct bnxt *bp, struct bnxt_napi *bnapi, int budget) in __bnxt_poll_cqs()
2763 static void __bnxt_poll_cqs_done(struct bnxt *bp, struct bnxt_napi *bnapi, in __bnxt_poll_cqs_done()
2789 struct bnxt *bp = bnapi->bp; in bnxt_poll_p5()
2859 static void bnxt_free_tx_skbs(struct bnxt *bp) in bnxt_free_tx_skbs()
2930 static void bnxt_free_one_rx_ring_skbs(struct bnxt *bp, int ring_nr) in bnxt_free_one_rx_ring_skbs()
3025 static void bnxt_free_rx_skbs(struct bnxt *bp) in bnxt_free_rx_skbs()
3036 static void bnxt_free_skbs(struct bnxt *bp) in bnxt_free_skbs()
3059 static void bnxt_free_ring(struct bnxt *bp, struct bnxt_ring_mem_info *rmem) in bnxt_free_ring()
3092 static int bnxt_alloc_ring(struct bnxt *bp, struct bnxt_ring_mem_info *rmem) in bnxt_alloc_ring()
3145 static void bnxt_free_tpa_info(struct bnxt *bp) in bnxt_free_tpa_info()
3163 static int bnxt_alloc_tpa_info(struct bnxt *bp) in bnxt_alloc_tpa_info()
3200 static void bnxt_free_rx_rings(struct bnxt *bp) in bnxt_free_rx_rings()
3232 static int bnxt_alloc_rx_page_pool(struct bnxt *bp, in bnxt_alloc_rx_page_pool()
3252 static int bnxt_alloc_rx_rings(struct bnxt *bp) in bnxt_alloc_rx_rings()
3310 static void bnxt_free_tx_rings(struct bnxt *bp) in bnxt_free_tx_rings()
3334 static int bnxt_alloc_tx_rings(struct bnxt *bp) in bnxt_alloc_tx_rings()
3419 static void bnxt_free_all_cp_arrays(struct bnxt *bp) in bnxt_free_all_cp_arrays()
3434 static int bnxt_alloc_all_cp_arrays(struct bnxt *bp) in bnxt_alloc_all_cp_arrays()
3451 static void bnxt_free_cp_rings(struct bnxt *bp) in bnxt_free_cp_rings()
3486 static struct bnxt_cp_ring_info *bnxt_alloc_cp_sub_ring(struct bnxt *bp) in bnxt_alloc_cp_sub_ring()
3520 static int bnxt_alloc_cp_rings(struct bnxt *bp) in bnxt_alloc_cp_rings()
3574 static void bnxt_init_ring_struct(struct bnxt *bp) in bnxt_init_ring_struct()
3658 static int bnxt_alloc_one_rx_ring(struct bnxt *bp, int ring_nr) in bnxt_alloc_one_rx_ring()
3707 static int bnxt_init_one_rx_ring(struct bnxt *bp, int ring_nr) in bnxt_init_one_rx_ring()
3742 static void bnxt_init_cp_rings(struct bnxt *bp) in bnxt_init_cp_rings()
3767 static int bnxt_init_rx_rings(struct bnxt *bp) in bnxt_init_rx_rings()
3788 static int bnxt_init_tx_rings(struct bnxt *bp) in bnxt_init_tx_rings()
3805 static void bnxt_free_ring_grps(struct bnxt *bp) in bnxt_free_ring_grps()
3811 static int bnxt_init_ring_grps(struct bnxt *bp, bool irq_re_init) in bnxt_init_ring_grps()
3833 static void bnxt_free_vnics(struct bnxt *bp) in bnxt_free_vnics()
3840 static int bnxt_alloc_vnics(struct bnxt *bp) in bnxt_alloc_vnics()
3861 static void bnxt_init_vnics(struct bnxt *bp) in bnxt_init_vnics()
3904 void bnxt_set_tpa_flags(struct bnxt *bp) in bnxt_set_tpa_flags()
3918 void bnxt_set_ring_params(struct bnxt *bp) in bnxt_set_ring_params()
4013 int bnxt_set_rx_skb_mode(struct bnxt *bp, bool page_mode) in bnxt_set_rx_skb_mode()
4042 static void bnxt_free_vnic_attributes(struct bnxt *bp) in bnxt_free_vnic_attributes()
4078 static int bnxt_alloc_vnic_attributes(struct bnxt *bp) in bnxt_alloc_vnic_attributes()
4155 static void bnxt_free_hwrm_resources(struct bnxt *bp) in bnxt_free_hwrm_resources()
4168 static int bnxt_alloc_hwrm_resources(struct bnxt *bp) in bnxt_alloc_hwrm_resources()
4181 static void bnxt_free_stats_mem(struct bnxt *bp, struct bnxt_stats_mem *stats) in bnxt_free_stats_mem()
4194 static int bnxt_alloc_stats_mem(struct bnxt *bp, struct bnxt_stats_mem *stats, in bnxt_alloc_stats_mem()
4234 static int bnxt_hwrm_func_qstat_ext(struct bnxt *bp, in bnxt_hwrm_func_qstat_ext()
4263 static int bnxt_hwrm_port_qstats(struct bnxt *bp, u8 flags);
4264 static int bnxt_hwrm_port_qstats_ext(struct bnxt *bp, u8 flags);
4266 static void bnxt_init_stats(struct bnxt *bp) in bnxt_init_stats()
4337 static void bnxt_free_port_stats(struct bnxt *bp) in bnxt_free_port_stats()
4347 static void bnxt_free_ring_stats(struct bnxt *bp) in bnxt_free_ring_stats()
4362 static int bnxt_alloc_stats(struct bnxt *bp) in bnxt_alloc_stats()
4425 static void bnxt_clear_ring_indices(struct bnxt *bp) in bnxt_clear_ring_indices()
4460 static void bnxt_free_ntp_fltrs(struct bnxt *bp, bool irq_reinit) in bnxt_free_ntp_fltrs()
4487 static int bnxt_alloc_ntp_fltrs(struct bnxt *bp) in bnxt_alloc_ntp_fltrs()
4510 static void bnxt_free_mem(struct bnxt *bp, bool irq_re_init) in bnxt_free_mem()
4538 static int bnxt_alloc_mem(struct bnxt *bp, bool irq_re_init) in bnxt_alloc_mem()
4667 static void bnxt_disable_int(struct bnxt *bp) in bnxt_disable_int()
4684 static int bnxt_cp_num_to_irq_num(struct bnxt *bp, int n) in bnxt_cp_num_to_irq_num()
4693 static void bnxt_disable_int_sync(struct bnxt *bp) in bnxt_disable_int_sync()
4710 static void bnxt_enable_int(struct bnxt *bp) in bnxt_enable_int()
4723 int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp, unsigned long *bmap, int bmap_size, in bnxt_hwrm_func_drv_rgtr()
4815 int bnxt_hwrm_func_drv_unrgtr(struct bnxt *bp) in bnxt_hwrm_func_drv_unrgtr()
4829 static int bnxt_hwrm_tunnel_dst_port_free(struct bnxt *bp, u8 tunnel_type) in bnxt_hwrm_tunnel_dst_port_free()
4869 static int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, __be16 port, in bnxt_hwrm_tunnel_dst_port_alloc()
4910 static int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, u16 vnic_id) in bnxt_hwrm_cfa_l2_set_rx_mask()
4930 static int bnxt_hwrm_cfa_ntuple_filter_free(struct bnxt *bp, in bnxt_hwrm_cfa_ntuple_filter_free()
4963 static int bnxt_hwrm_cfa_ntuple_filter_alloc(struct bnxt *bp, in bnxt_hwrm_cfa_ntuple_filter_alloc()
5034 static int bnxt_hwrm_set_vnic_filter(struct bnxt *bp, u16 vnic_id, u16 idx, in bnxt_hwrm_set_vnic_filter()
5071 static int bnxt_hwrm_clear_vnic_filter(struct bnxt *bp) in bnxt_hwrm_clear_vnic_filter()
5096 static int bnxt_hwrm_vnic_set_tpa(struct bnxt *bp, u16 vnic_id, u32 tpa_flags) in bnxt_hwrm_vnic_set_tpa()
5158 static u16 bnxt_cp_ring_from_grp(struct bnxt *bp, struct bnxt_ring_struct *ring) in bnxt_cp_ring_from_grp()
5166 static u16 bnxt_cp_ring_for_rx(struct bnxt *bp, struct bnxt_rx_ring_info *rxr) in bnxt_cp_ring_for_rx()
5179 static u16 bnxt_cp_ring_for_tx(struct bnxt *bp, struct bnxt_tx_ring_info *txr) in bnxt_cp_ring_for_tx()
5192 static int bnxt_alloc_rss_indir_tbl(struct bnxt *bp) in bnxt_alloc_rss_indir_tbl()
5209 static void bnxt_set_dflt_rss_indir_tbl(struct bnxt *bp) in bnxt_set_dflt_rss_indir_tbl()
5231 static u16 bnxt_get_max_rss_ring(struct bnxt *bp) in bnxt_get_max_rss_ring()
5244 int bnxt_get_nr_rss_ctxs(struct bnxt *bp, int rx_rings) in bnxt_get_nr_rss_ctxs()
5253 static void __bnxt_fill_hw_rss_tbl(struct bnxt *bp, struct bnxt_vnic_info *vnic) in __bnxt_fill_hw_rss_tbl()
5266 static void __bnxt_fill_hw_rss_tbl_p5(struct bnxt *bp, in __bnxt_fill_hw_rss_tbl_p5()
5288 static void bnxt_fill_hw_rss_tbl(struct bnxt *bp, struct bnxt_vnic_info *vnic) in bnxt_fill_hw_rss_tbl()
5296 static int bnxt_hwrm_vnic_set_rss(struct bnxt *bp, u16 vnic_id, bool set_rss) in bnxt_hwrm_vnic_set_rss()
5322 static int bnxt_hwrm_vnic_set_rss_p5(struct bnxt *bp, u16 vnic_id, bool set_rss) in bnxt_hwrm_vnic_set_rss_p5()
5360 static int bnxt_hwrm_vnic_set_hds(struct bnxt *bp, u16 vnic_id) in bnxt_hwrm_vnic_set_hds()
5386 static void bnxt_hwrm_vnic_ctx_free_one(struct bnxt *bp, u16 vnic_id, in bnxt_hwrm_vnic_ctx_free_one()
5401 static void bnxt_hwrm_vnic_ctx_free(struct bnxt *bp) in bnxt_hwrm_vnic_ctx_free()
5416 static int bnxt_hwrm_vnic_ctx_alloc(struct bnxt *bp, u16 vnic_id, u16 ctx_idx) in bnxt_hwrm_vnic_ctx_alloc()
5436 static u32 bnxt_get_roce_vnic_mode(struct bnxt *bp) in bnxt_get_roce_vnic_mode()
5443 int bnxt_hwrm_vnic_cfg(struct bnxt *bp, u16 vnic_id) in bnxt_hwrm_vnic_cfg()
5517 static void bnxt_hwrm_vnic_free_one(struct bnxt *bp, u16 vnic_id) in bnxt_hwrm_vnic_free_one()
5533 static void bnxt_hwrm_vnic_free(struct bnxt *bp) in bnxt_hwrm_vnic_free()
5541 static int bnxt_hwrm_vnic_alloc(struct bnxt *bp, u16 vnic_id, in bnxt_hwrm_vnic_alloc()
5583 static int bnxt_hwrm_vnic_qcaps(struct bnxt *bp) in bnxt_hwrm_vnic_qcaps()
5629 static int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp) in bnxt_hwrm_ring_grp_alloc()
5664 static void bnxt_hwrm_ring_grp_free(struct bnxt *bp) in bnxt_hwrm_ring_grp_free()
5688 static int hwrm_ring_alloc_send_msg(struct bnxt *bp, in hwrm_ring_alloc_send_msg()
5806 static int bnxt_hwrm_set_async_event_cr(struct bnxt *bp, int idx) in bnxt_hwrm_set_async_event_cr()
5835 static void bnxt_set_db(struct bnxt *bp, struct bnxt_db_info *db, u32 ring_type, in bnxt_set_db()
5876 static int bnxt_hwrm_ring_alloc(struct bnxt *bp) in bnxt_hwrm_ring_alloc()
5999 static int hwrm_ring_free_send_msg(struct bnxt *bp, in hwrm_ring_free_send_msg()
6032 static void bnxt_hwrm_ring_free(struct bnxt *bp, bool close_path) in bnxt_hwrm_ring_free()
6133 static int bnxt_trim_rings(struct bnxt *bp, int *rx, int *tx, int max,
6136 static int bnxt_hwrm_get_rings(struct bnxt *bp) in bnxt_hwrm_get_rings()
6192 int __bnxt_hwrm_get_tx_rings(struct bnxt *bp, u16 fid, int *tx_rings) in __bnxt_hwrm_get_tx_rings()
6215 static bool bnxt_rfs_supported(struct bnxt *bp);
6218 __bnxt_hwrm_reserve_pf_rings(struct bnxt *bp, int tx_rings, int rx_rings, in __bnxt_hwrm_reserve_pf_rings()
6271 __bnxt_hwrm_reserve_vf_rings(struct bnxt *bp, int tx_rings, int rx_rings, in __bnxt_hwrm_reserve_vf_rings()
6315 bnxt_hwrm_reserve_pf_rings(struct bnxt *bp, int tx_rings, int rx_rings, in bnxt_hwrm_reserve_pf_rings()
6342 bnxt_hwrm_reserve_vf_rings(struct bnxt *bp, int tx_rings, int rx_rings, in bnxt_hwrm_reserve_vf_rings()
6365 static int bnxt_hwrm_reserve_rings(struct bnxt *bp, int tx, int rx, int grp, in bnxt_hwrm_reserve_rings()
6376 int bnxt_nq_rings_in_use(struct bnxt *bp) in bnxt_nq_rings_in_use()
6391 static int bnxt_cp_rings_in_use(struct bnxt *bp) in bnxt_cp_rings_in_use()
6402 static int bnxt_get_func_stat_ctxs(struct bnxt *bp) in bnxt_get_func_stat_ctxs()
6419 static void bnxt_check_rss_tbl_no_rmgr(struct bnxt *bp) in bnxt_check_rss_tbl_no_rmgr()
6431 static bool bnxt_need_reserve_rings(struct bnxt *bp) in bnxt_need_reserve_rings()
6468 static int __bnxt_reserve_rings(struct bnxt *bp) in __bnxt_reserve_rings()
6555 static int bnxt_hwrm_check_vf_rings(struct bnxt *bp, int tx_rings, int rx_rings, in bnxt_hwrm_check_vf_rings()
6580 static int bnxt_hwrm_check_pf_rings(struct bnxt *bp, int tx_rings, int rx_rings, in bnxt_hwrm_check_pf_rings()
6606 static int bnxt_hwrm_check_rings(struct bnxt *bp, int tx_rings, int rx_rings, in bnxt_hwrm_check_rings()
6622 static void bnxt_hwrm_coal_params_qcaps(struct bnxt *bp) in bnxt_hwrm_coal_params_qcaps()
6669 static u16 bnxt_usec_to_coal_tmr(struct bnxt *bp, u16 usec) in bnxt_usec_to_coal_tmr()
6676 static void bnxt_hwrm_set_coal_params(struct bnxt *bp, in bnxt_hwrm_set_coal_params()
6732 static int __bnxt_hwrm_set_coal_nq(struct bnxt *bp, struct bnxt_napi *bnapi, in __bnxt_hwrm_set_coal_nq()
6760 int bnxt_hwrm_set_ring_coal(struct bnxt *bp, struct bnxt_napi *bnapi) in bnxt_hwrm_set_ring_coal()
6789 int bnxt_hwrm_set_coal(struct bnxt *bp) in bnxt_hwrm_set_coal()
6850 static void bnxt_hwrm_stat_ctx_free(struct bnxt *bp) in bnxt_hwrm_stat_ctx_free()
6892 static int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp) in bnxt_hwrm_stat_ctx_alloc()
6927 static int bnxt_hwrm_func_qcfg(struct bnxt *bp) in bnxt_hwrm_func_qcfg()
7038 static int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp) in bnxt_hwrm_func_backing_store_qcaps()
7146 static int bnxt_hwrm_func_backing_store_cfg(struct bnxt *bp, u32 enables) in bnxt_hwrm_func_backing_store_cfg()
7255 static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp, in bnxt_alloc_ctx_mem_blk()
7269 static int bnxt_alloc_ctx_pg_tbls(struct bnxt *bp, in bnxt_alloc_ctx_pg_tbls()
7330 static void bnxt_free_ctx_pg_tbls(struct bnxt *bp, in bnxt_free_ctx_pg_tbls()
7359 void bnxt_free_ctx_mem(struct bnxt *bp) in bnxt_free_ctx_mem()
7384 static int bnxt_alloc_ctx_mem(struct bnxt *bp) in bnxt_alloc_ctx_mem()
7530 int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp, bool all) in bnxt_hwrm_func_resc_qcaps()
7588 static int __bnxt_hwrm_ptp_qcfg(struct bnxt *bp) in __bnxt_hwrm_ptp_qcfg()
7652 static int __bnxt_hwrm_func_qcaps(struct bnxt *bp) in __bnxt_hwrm_func_qcaps()
7760 static void bnxt_hwrm_dbg_qcaps(struct bnxt *bp) in bnxt_hwrm_dbg_qcaps()
7786 static int bnxt_hwrm_queue_qportcfg(struct bnxt *bp);
7788 int bnxt_hwrm_func_qcaps(struct bnxt *bp) in bnxt_hwrm_func_qcaps()
7814 static int bnxt_hwrm_cfa_adv_flow_mgnt_qcaps(struct bnxt *bp) in bnxt_hwrm_cfa_adv_flow_mgnt_qcaps()
7843 static int __bnxt_alloc_fw_health(struct bnxt *bp) in __bnxt_alloc_fw_health()
7856 static int bnxt_alloc_fw_health(struct bnxt *bp) in bnxt_alloc_fw_health()
7874 static void __bnxt_map_fw_health_reg(struct bnxt *bp, u32 reg) in __bnxt_map_fw_health_reg()
7881 static void bnxt_inv_fw_health_reg(struct bnxt *bp) in bnxt_inv_fw_health_reg()
7898 static void bnxt_try_map_fw_health_reg(struct bnxt *bp) in bnxt_try_map_fw_health_reg()
7945 static int bnxt_map_fw_health_regs(struct bnxt *bp) in bnxt_map_fw_health_regs()
7974 static void bnxt_remap_fw_health_regs(struct bnxt *bp) in bnxt_remap_fw_health_regs()
7987 static int bnxt_hwrm_error_recovery_qcfg(struct bnxt *bp) in bnxt_hwrm_error_recovery_qcfg()
8052 static int bnxt_hwrm_func_reset(struct bnxt *bp) in bnxt_hwrm_func_reset()
8066 static void bnxt_nvm_cfg_ver_get(struct bnxt *bp) in bnxt_nvm_cfg_ver_get()
8076 static int bnxt_hwrm_queue_qportcfg(struct bnxt *bp) in bnxt_hwrm_queue_qportcfg()
8127 static int bnxt_hwrm_poll(struct bnxt *bp) in bnxt_hwrm_poll()
8145 static int bnxt_hwrm_ver_get(struct bnxt *bp) in bnxt_hwrm_ver_get()
8266 int bnxt_hwrm_fw_set_time(struct bnxt *bp) in bnxt_hwrm_fw_set_time()
8329 static void bnxt_accumulate_all_stats(struct bnxt *bp) in bnxt_accumulate_all_stats()
8374 static int bnxt_hwrm_port_qstats(struct bnxt *bp, u8 flags) in bnxt_hwrm_port_qstats()
8398 static int bnxt_hwrm_port_qstats_ext(struct bnxt *bp, u8 flags) in bnxt_hwrm_port_qstats_ext()
8488 static void bnxt_hwrm_free_tunnel_ports(struct bnxt *bp) in bnxt_hwrm_free_tunnel_ports()
8496 static int bnxt_set_tpa(struct bnxt *bp, bool set_tpa) in bnxt_set_tpa()
8516 static void bnxt_hwrm_clear_vnic_rss(struct bnxt *bp) in bnxt_hwrm_clear_vnic_rss()
8524 static void bnxt_clear_vnic(struct bnxt *bp) in bnxt_clear_vnic()
8543 static void bnxt_hwrm_resource_free(struct bnxt *bp, bool close_path, in bnxt_hwrm_resource_free()
8555 static int bnxt_hwrm_set_br_mode(struct bnxt *bp, u16 br_mode) in bnxt_hwrm_set_br_mode()
8578 static int bnxt_hwrm_set_cache_line_size(struct bnxt *bp, int size) in bnxt_hwrm_set_cache_line_size()
8599 static int __bnxt_setup_vnic(struct bnxt *bp, u16 vnic_id) in __bnxt_setup_vnic()
8655 static int __bnxt_setup_vnic_p5(struct bnxt *bp, u16 vnic_id) in __bnxt_setup_vnic_p5()
8694 static int bnxt_setup_vnic(struct bnxt *bp, u16 vnic_id) in bnxt_setup_vnic()
8702 static int bnxt_alloc_rfs_vnics(struct bnxt *bp) in bnxt_alloc_rfs_vnics()
8739 static bool bnxt_promisc_ok(struct bnxt *bp) in bnxt_promisc_ok()
8748 static int bnxt_setup_nitroa0_vnic(struct bnxt *bp) in bnxt_setup_nitroa0_vnic()
8768 static int bnxt_cfg_rx_mode(struct bnxt *);
8769 static bool bnxt_mc_list_updated(struct bnxt *, u32 *);
8771 static int bnxt_init_chip(struct bnxt *bp, bool irq_re_init) in bnxt_init_chip()
8888 static int bnxt_shutdown_nic(struct bnxt *bp, bool irq_re_init) in bnxt_shutdown_nic()
8894 static int bnxt_init_nic(struct bnxt *bp, bool irq_re_init) in bnxt_init_nic()
8905 static int bnxt_set_real_num_queues(struct bnxt *bp) in bnxt_set_real_num_queues()
8927 static int bnxt_trim_rings(struct bnxt *bp, int *rx, int *tx, int max, in bnxt_trim_rings()
8951 static void bnxt_setup_msix(struct bnxt *bp) in bnxt_setup_msix()
8985 static void bnxt_setup_inta(struct bnxt *bp) in bnxt_setup_inta()
8997 static int bnxt_init_int_mode(struct bnxt *bp);
8999 static int bnxt_setup_int_mode(struct bnxt *bp) in bnxt_setup_int_mode()
9019 static unsigned int bnxt_get_max_func_rss_ctxs(struct bnxt *bp) in bnxt_get_max_func_rss_ctxs()
9024 static unsigned int bnxt_get_max_func_vnics(struct bnxt *bp) in bnxt_get_max_func_vnics()
9030 unsigned int bnxt_get_max_func_stat_ctxs(struct bnxt *bp) in bnxt_get_max_func_stat_ctxs()
9035 unsigned int bnxt_get_max_func_cp_rings(struct bnxt *bp) in bnxt_get_max_func_cp_rings()
9040 static unsigned int bnxt_get_max_func_cp_rings_for_en(struct bnxt *bp) in bnxt_get_max_func_cp_rings_for_en()
9050 static unsigned int bnxt_get_max_func_irqs(struct bnxt *bp) in bnxt_get_max_func_irqs()
9060 static void bnxt_set_max_func_irqs(struct bnxt *bp, unsigned int max_irqs) in bnxt_set_max_func_irqs()
9065 unsigned int bnxt_get_avail_cp_rings_for_en(struct bnxt *bp) in bnxt_get_avail_cp_rings_for_en()
9076 unsigned int bnxt_get_avail_stat_ctxs_for_en(struct bnxt *bp) in bnxt_get_avail_stat_ctxs_for_en()
9081 int bnxt_get_avail_msix(struct bnxt *bp, int num) in bnxt_get_avail_msix()
9103 static int bnxt_get_num_msix(struct bnxt *bp) in bnxt_get_num_msix()
9111 static int bnxt_init_msix(struct bnxt *bp) in bnxt_init_msix()
9176 static int bnxt_init_inta(struct bnxt *bp) in bnxt_init_inta()
9191 static int bnxt_init_int_mode(struct bnxt *bp) in bnxt_init_int_mode()
9205 static void bnxt_clear_int_mode(struct bnxt *bp) in bnxt_clear_int_mode()
9215 int bnxt_reserve_rings(struct bnxt *bp, bool irq_re_init) in bnxt_reserve_rings()
9249 static void bnxt_free_irq(struct bnxt *bp) in bnxt_free_irq()
9278 static int bnxt_request_irq(struct bnxt *bp) in bnxt_request_irq()
9336 static void bnxt_del_napi(struct bnxt *bp) in bnxt_del_napi()
9354 static void bnxt_init_napi(struct bnxt *bp) in bnxt_init_napi()
9382 static void bnxt_disable_napi(struct bnxt *bp) in bnxt_disable_napi()
9399 static void bnxt_enable_napi(struct bnxt *bp) in bnxt_enable_napi()
9421 void bnxt_tx_disable(struct bnxt *bp) in bnxt_tx_disable()
9440 void bnxt_tx_enable(struct bnxt *bp) in bnxt_tx_enable()
9480 void bnxt_report_link(struct bnxt *bp) in bnxt_report_link()
9549 static int bnxt_hwrm_phy_qcaps(struct bnxt *bp) in bnxt_hwrm_phy_qcaps()
9613 int bnxt_update_link(struct bnxt *bp, bool chng_link_state) in bnxt_update_link()
9751 static void bnxt_get_port_module_status(struct bnxt *bp) in bnxt_get_port_module_status()
9779 bnxt_hwrm_set_pause_common(struct bnxt *bp, struct hwrm_port_phy_cfg_input *req) in bnxt_hwrm_set_pause_common()
9806 static void bnxt_hwrm_set_link_common(struct bnxt *bp, struct hwrm_port_phy_cfg_input *req) in bnxt_hwrm_set_link_common()
9836 int bnxt_hwrm_set_pause(struct bnxt *bp) in bnxt_hwrm_set_pause()
9867 static void bnxt_hwrm_set_eee(struct bnxt *bp, in bnxt_hwrm_set_eee()
9890 int bnxt_hwrm_set_link_setting(struct bnxt *bp, bool set_pause, bool set_eee) in bnxt_hwrm_set_link_setting()
9909 static int bnxt_hwrm_shutdown_link(struct bnxt *bp) in bnxt_hwrm_shutdown_link()
9940 static int bnxt_fw_reset_via_optee(struct bnxt *bp) in bnxt_fw_reset_via_optee()
9955 static int bnxt_try_recover_fw(struct bnxt *bp) in bnxt_try_recover_fw()
9986 static void bnxt_clear_reservations(struct bnxt *bp, bool fw_reset) in bnxt_clear_reservations()
10006 int bnxt_cancel_reservations(struct bnxt *bp, bool fw_reset) in bnxt_cancel_reservations()
10022 static int bnxt_hwrm_if_change(struct bnxt *bp, bool up) in bnxt_hwrm_if_change()
10111 static int bnxt_hwrm_port_led_qcaps(struct bnxt *bp) in bnxt_hwrm_port_led_qcaps()
10154 int bnxt_hwrm_alloc_wol_fltr(struct bnxt *bp) in bnxt_hwrm_alloc_wol_fltr()
10177 int bnxt_hwrm_free_wol_fltr(struct bnxt *bp) in bnxt_hwrm_free_wol_fltr()
10193 static u16 bnxt_hwrm_get_wol_fltrs(struct bnxt *bp, u16 handle) in bnxt_hwrm_get_wol_fltrs()
10222 static void bnxt_get_wol_settings(struct bnxt *bp) in bnxt_get_wol_settings()
10241 struct bnxt *bp = dev_get_drvdata(dev); in bnxt_show_temp()
10263 ATTRIBUTE_GROUPS(bnxt);
10265 static void bnxt_hwmon_close(struct bnxt *bp) in bnxt_hwmon_close()
10273 static void bnxt_hwmon_open(struct bnxt *bp) in bnxt_hwmon_open()
10299 static void bnxt_hwmon_close(struct bnxt *bp) in bnxt_hwmon_close()
10303 static void bnxt_hwmon_open(struct bnxt *bp) in bnxt_hwmon_open()
10308 static bool bnxt_eee_config_ok(struct bnxt *bp) in bnxt_eee_config_ok()
10332 static int bnxt_update_phy_setting(struct bnxt *bp) in bnxt_update_phy_setting()
10402 static void bnxt_preset_reg_win(struct bnxt *bp) in bnxt_preset_reg_win()
10411 static int bnxt_init_dflt_ring_mode(struct bnxt *bp);
10413 static int bnxt_reinit_after_abort(struct bnxt *bp) in bnxt_reinit_after_abort()
10435 static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init) in __bnxt_open_nic()
10534 int bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init) in bnxt_open_nic()
10553 int bnxt_half_open_nic(struct bnxt *bp) in bnxt_half_open_nic()
10587 void bnxt_half_close_nic(struct bnxt *bp) in bnxt_half_close_nic()
10595 void bnxt_reenable_sriov(struct bnxt *bp) in bnxt_reenable_sriov()
10608 struct bnxt *bp = netdev_priv(dev); in bnxt_open()
10642 static bool bnxt_drv_busy(struct bnxt *bp) in bnxt_drv_busy()
10648 static void bnxt_get_ring_stats(struct bnxt *bp,
10651 static void __bnxt_close_nic(struct bnxt *bp, bool irq_re_init, in __bnxt_close_nic()
10686 int bnxt_close_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init) in bnxt_close_nic()
10717 struct bnxt *bp = netdev_priv(dev); in bnxt_close()
10726 static int bnxt_hwrm_port_phy_read(struct bnxt *bp, u16 phy_addr, u16 reg, in bnxt_hwrm_port_phy_read()
10758 static int bnxt_hwrm_port_phy_write(struct bnxt *bp, u16 phy_addr, u16 reg, in bnxt_hwrm_port_phy_write()
10789 struct bnxt *bp = netdev_priv(dev); in bnxt_ioctl()
10829 static void bnxt_get_ring_stats(struct bnxt *bp, in bnxt_get_ring_stats()
10868 static void bnxt_add_prev_stats(struct bnxt *bp, in bnxt_add_prev_stats()
10886 struct bnxt *bp = netdev_priv(dev); in bnxt_get_stats64()
10927 static bool bnxt_mc_list_updated(struct bnxt *bp, u32 *rx_mask) in bnxt_mc_list_updated()
10961 static bool bnxt_uc_list_updated(struct bnxt *bp) in bnxt_uc_list_updated()
10982 struct bnxt *bp = netdev_priv(dev); in bnxt_set_rx_mode()
11020 static int bnxt_cfg_rx_mode(struct bnxt *bp) in bnxt_cfg_rx_mode()
11100 static bool bnxt_can_reserve_rings(struct bnxt *bp) in bnxt_can_reserve_rings()
11120 static bool bnxt_rfs_supported(struct bnxt *bp) in bnxt_rfs_supported()
11138 static bool bnxt_rfs_capable(struct bnxt *bp) in bnxt_rfs_capable()
11184 struct bnxt *bp = netdev_priv(dev); in bnxt_fix_features()
11218 struct bnxt *bp = netdev_priv(dev); in bnxt_set_features()
11282 static bool bnxt_exthdr_check(struct bnxt *bp, struct sk_buff *skb, int nw_off, in bnxt_exthdr_check()
11330 static bool bnxt_udp_tunl_check(struct bnxt *bp, struct sk_buff *skb) in bnxt_udp_tunl_check()
11352 static bool bnxt_tunl_check(struct bnxt *bp, struct sk_buff *skb, u8 l4_proto) in bnxt_tunl_check()
11381 struct bnxt *bp = netdev_priv(dev); in bnxt_features_check()
11404 int bnxt_dbg_hwrm_rd_reg(struct bnxt *bp, u32 reg_off, u16 num_words, in bnxt_dbg_hwrm_rd_reg()
11443 static int bnxt_dbg_hwrm_ring_info_get(struct bnxt *bp, u8 ring_type, in bnxt_dbg_hwrm_ring_info_get()
11502 static void bnxt_dbg_dump_states(struct bnxt *bp) in bnxt_dbg_dump_states()
11517 static int bnxt_hwrm_rx_ring_reset(struct bnxt *bp, int ring_nr) in bnxt_hwrm_rx_ring_reset()
11538 static void bnxt_reset_task(struct bnxt *bp, bool silent) in bnxt_reset_task()
11559 struct bnxt *bp = netdev_priv(dev); in bnxt_tx_timeout()
11566 static void bnxt_fw_health_check(struct bnxt *bp) in bnxt_fw_health_check()
11605 struct bnxt *bp = from_timer(bp, t, timer); in bnxt_timer()
11658 static void bnxt_rtnl_lock_sp(struct bnxt *bp) in bnxt_rtnl_lock_sp()
11669 static void bnxt_rtnl_unlock_sp(struct bnxt *bp) in bnxt_rtnl_unlock_sp()
11676 static void bnxt_reset(struct bnxt *bp, bool silent) in bnxt_reset()
11685 static void bnxt_rx_ring_reset(struct bnxt *bp) in bnxt_rx_ring_reset()
11733 static void bnxt_fw_reset_close(struct bnxt *bp) in bnxt_fw_reset_close()
11764 static bool is_bnxt_fw_ok(struct bnxt *bp) in is_bnxt_fw_ok()
11785 static void bnxt_force_fw_reset(struct bnxt *bp) in bnxt_force_fw_reset()
11819 void bnxt_fw_exception(struct bnxt *bp) in bnxt_fw_exception()
11831 static int bnxt_get_registered_vfs(struct bnxt *bp) in bnxt_get_registered_vfs()
11852 void bnxt_fw_reset(struct bnxt *bp) in bnxt_fw_reset()
11900 static void bnxt_chk_missed_irq(struct bnxt *bp) in bnxt_chk_missed_irq()
11938 static void bnxt_cfg_ntp_filters(struct bnxt *);
11940 static void bnxt_init_ethtool_link_settings(struct bnxt *bp) in bnxt_init_ethtool_link_settings()
11972 static void bnxt_fw_echo_reply(struct bnxt *bp) in bnxt_fw_echo_reply()
11988 struct bnxt *bp = container_of(work, struct bnxt, sp_task); in bnxt_sp_task()
12086 int bnxt_check_rings(struct bnxt *bp, int tx, int rx, bool sh, int tcs, in bnxt_check_rings()
12124 static void bnxt_unmap_bars(struct bnxt *bp, struct pci_dev *pdev) in bnxt_unmap_bars()
12142 static void bnxt_cleanup_pci(struct bnxt *bp) in bnxt_cleanup_pci()
12150 static void bnxt_init_dflt_coal(struct bnxt *bp) in bnxt_init_dflt_coal()
12184 static int bnxt_fw_init_one_p1(struct bnxt *bp) in bnxt_fw_init_one_p1()
12210 static int bnxt_fw_init_one_p2(struct bnxt *bp) in bnxt_fw_init_one_p2()
12248 static void bnxt_set_dflt_rss_hash_type(struct bnxt *bp) in bnxt_set_dflt_rss_hash_type()
12262 static void bnxt_set_dflt_rfs(struct bnxt *bp) in bnxt_set_dflt_rfs()
12278 static void bnxt_fw_init_one_p3(struct bnxt *bp) in bnxt_fw_init_one_p3()
12295 static int bnxt_probe_phy(struct bnxt *bp, bool fw_dflt);
12297 int bnxt_fw_init_one(struct bnxt *bp) in bnxt_fw_init_one()
12322 static void bnxt_fw_reset_writel(struct bnxt *bp, int reg_idx) in bnxt_fw_reset_writel()
12354 bool bnxt_hwrm_reset_permitted(struct bnxt *bp) in bnxt_hwrm_reset_permitted()
12375 static void bnxt_reset_all(struct bnxt *bp) in bnxt_reset_all()
12406 static bool bnxt_fw_reset_timeout(struct bnxt *bp) in bnxt_fw_reset_timeout()
12412 static void bnxt_fw_reset_abort(struct bnxt *bp, int rc) in bnxt_fw_reset_abort()
12425 struct bnxt *bp = container_of(work, struct bnxt, fw_reset_task.work); in bnxt_fw_reset_task()
12595 struct bnxt *bp = netdev_priv(dev); in bnxt_init_board()
12685 struct bnxt *bp = netdev_priv(dev); in bnxt_change_mac_addr()
12710 struct bnxt *bp = netdev_priv(dev); in bnxt_change_mtu()
12726 struct bnxt *bp = netdev_priv(dev); in bnxt_setup_mq_tc()
12771 struct bnxt *bp = cb_priv; in bnxt_setup_tc_block_cb()
12790 struct bnxt *bp = netdev_priv(dev); in bnxt_setup_tc()
12845 struct bnxt *bp = netdev_priv(dev); in bnxt_rx_flow_steer()
12940 static void bnxt_cfg_ntp_filters(struct bnxt *bp) in bnxt_cfg_ntp_filters()
12988 static void bnxt_cfg_ntp_filters(struct bnxt *bp) in bnxt_cfg_ntp_filters()
12996 struct bnxt *bp = netdev_priv(netdev); in bnxt_udp_tunnel_sync()
13026 struct bnxt *bp = netdev_priv(dev); in bnxt_bridge_getlink()
13035 struct bnxt *bp = netdev_priv(dev); in bnxt_bridge_setlink()
13070 struct bnxt *bp = netdev_priv(dev); in bnxt_get_port_parent_id()
13087 struct bnxt *bp = netdev_priv(dev); in bnxt_get_devlink_port()
13129 struct bnxt *bp = netdev_priv(dev); in bnxt_remove_one()
13171 static int bnxt_probe_phy(struct bnxt *bp, bool fw_dflt) in bnxt_probe_phy()
13221 static void _bnxt_get_max_rings(struct bnxt *bp, int *max_rx, int *max_tx, in _bnxt_get_max_rings()
13250 int bnxt_get_max_rings(struct bnxt *bp, int *max_rx, int *max_tx, bool shared) in bnxt_get_max_rings()
13263 static int bnxt_get_dflt_rings(struct bnxt *bp, int *max_rx, int *max_tx, in bnxt_get_dflt_rings()
13311 static void bnxt_trim_dflt_sh_rings(struct bnxt *bp) in bnxt_trim_dflt_sh_rings()
13319 static int bnxt_set_dflt_rings(struct bnxt *bp, bool sh) in bnxt_set_dflt_rings()
13374 static int bnxt_init_dflt_ring_mode(struct bnxt *bp) in bnxt_init_dflt_ring_mode()
13404 int bnxt_restore_pf_fw_resources(struct bnxt *bp) in bnxt_restore_pf_fw_resources()
13429 static int bnxt_init_mac_addr(struct bnxt *bp) in bnxt_init_mac_addr()
13456 static void bnxt_vpd_read_info(struct bnxt *bp) in bnxt_vpd_read_info()
13490 static int bnxt_pcie_dsn_get(struct bnxt *bp, u8 dsn[]) in bnxt_pcie_dsn_get()
13507 static int bnxt_map_db_bar(struct bnxt *bp) in bnxt_map_db_bar()
13517 void bnxt_print_device_info(struct bnxt *bp) in bnxt_print_device_info()
13529 struct bnxt *bp; in bnxt_init_one()
13763 struct bnxt *bp; in bnxt_shutdown()
13793 struct bnxt *bp = netdev_priv(dev); in bnxt_suspend()
13814 struct bnxt *bp = netdev_priv(dev); in bnxt_resume()
13880 struct bnxt *bp = netdev_priv(netdev); in bnxt_io_error_detected()
13924 struct bnxt *bp = netdev_priv(netdev); in bnxt_io_slot_reset()
14000 struct bnxt *bp = netdev_priv(netdev); in bnxt_io_resume()