Lines Matching refs:stmmac_priv

133 static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue);
134 static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue);
135 static void stmmac_reset_queues_param(struct stmmac_priv *priv);
136 static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue);
137 static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue);
138 static void stmmac_set_dma_operation_mode(struct stmmac_priv *priv, u32 txmode,
149 int stmmac_bus_clks_config(struct stmmac_priv *priv, bool enabled) in stmmac_bus_clks_config()
202 static void __stmmac_disable_all_queues(struct stmmac_priv *priv) in __stmmac_disable_all_queues()
229 static void stmmac_disable_all_queues(struct stmmac_priv *priv) in stmmac_disable_all_queues()
251 static void stmmac_enable_all_queues(struct stmmac_priv *priv) in stmmac_enable_all_queues()
274 static void stmmac_service_event_schedule(struct stmmac_priv *priv) in stmmac_service_event_schedule()
281 static void stmmac_global_err(struct stmmac_priv *priv) in stmmac_global_err()
300 static void stmmac_clk_csr_set(struct stmmac_priv *priv) in stmmac_clk_csr_set()
361 static inline u32 stmmac_tx_avail(struct stmmac_priv *priv, u32 queue) in stmmac_tx_avail()
379 static inline u32 stmmac_rx_dirty(struct stmmac_priv *priv, u32 queue) in stmmac_rx_dirty()
392 static void stmmac_lpi_entry_timer_config(struct stmmac_priv *priv, bool en) in stmmac_lpi_entry_timer_config()
408 static int stmmac_enable_eee_mode(struct stmmac_priv *priv) in stmmac_enable_eee_mode()
434 void stmmac_disable_eee_mode(struct stmmac_priv *priv) in stmmac_disable_eee_mode()
455 struct stmmac_priv *priv = from_timer(priv, t, eee_ctrl_timer); in stmmac_eee_ctrl_timer()
469 bool stmmac_eee_init(struct stmmac_priv *priv) in stmmac_eee_init()
535 static void stmmac_get_tx_hwtstamp(struct stmmac_priv *priv, in stmmac_get_tx_hwtstamp()
578 static void stmmac_get_rx_hwtstamp(struct stmmac_priv *priv, struct dma_desc *p, in stmmac_get_rx_hwtstamp()
619 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_hwtstamp_set()
814 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_hwtstamp_get()
834 int stmmac_init_tstamp_counter(struct stmmac_priv *priv, u32 systime_flags) in stmmac_init_tstamp_counter()
882 static int stmmac_init_ptp(struct stmmac_priv *priv) in stmmac_init_ptp()
915 static void stmmac_release_ptp(struct stmmac_priv *priv) in stmmac_release_ptp()
927 static void stmmac_mac_flow_ctrl(struct stmmac_priv *priv, u32 duplex) in stmmac_mac_flow_ctrl()
938 struct stmmac_priv *priv = netdev_priv(to_net_dev(config->dev)); in stmmac_mac_select_pcs()
952 static void stmmac_fpe_link_state_handle(struct stmmac_priv *priv, bool is_up) in stmmac_fpe_link_state_handle()
970 struct stmmac_priv *priv = netdev_priv(to_net_dev(config->dev)); in stmmac_mac_link_down()
988 struct stmmac_priv *priv = netdev_priv(to_net_dev(config->dev)); in stmmac_mac_link_up()
1105 static void stmmac_check_pcs_mode(struct stmmac_priv *priv) in stmmac_check_pcs_mode()
1133 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_init_phy()
1175 static int stmmac_phy_setup(struct stmmac_priv *priv) in stmmac_phy_setup()
1241 static void stmmac_display_rx_rings(struct stmmac_priv *priv, in stmmac_display_rx_rings()
1269 static void stmmac_display_tx_rings(struct stmmac_priv *priv, in stmmac_display_tx_rings()
1299 static void stmmac_display_rings(struct stmmac_priv *priv, in stmmac_display_rings()
1335 static void stmmac_clear_rx_descriptors(struct stmmac_priv *priv, in stmmac_clear_rx_descriptors()
1364 static void stmmac_clear_tx_descriptors(struct stmmac_priv *priv, in stmmac_clear_tx_descriptors()
1394 static void stmmac_clear_descriptors(struct stmmac_priv *priv, in stmmac_clear_descriptors()
1421 static int stmmac_init_rx_buffers(struct stmmac_priv *priv, in stmmac_init_rx_buffers()
1467 static void stmmac_free_rx_buffer(struct stmmac_priv *priv, in stmmac_free_rx_buffer()
1489 static void stmmac_free_tx_buffer(struct stmmac_priv *priv, in stmmac_free_tx_buffer()
1535 static void dma_free_rx_skbufs(struct stmmac_priv *priv, in dma_free_rx_skbufs()
1546 static int stmmac_alloc_rx_buffers(struct stmmac_priv *priv, in stmmac_alloc_rx_buffers()
1579 static void dma_free_rx_xskbufs(struct stmmac_priv *priv, in dma_free_rx_xskbufs()
1597 static int stmmac_alloc_rx_buffers_zc(struct stmmac_priv *priv, in stmmac_alloc_rx_buffers_zc()
1628 static struct xsk_buff_pool *stmmac_get_xsk_pool(struct stmmac_priv *priv, u32 queue) in stmmac_get_xsk_pool()
1646 static int __init_dma_rx_desc_rings(struct stmmac_priv *priv, in __init_dma_rx_desc_rings()
1710 struct stmmac_priv *priv = netdev_priv(dev); in init_dma_rx_desc_rings()
1754 static int __init_dma_tx_desc_rings(struct stmmac_priv *priv, in __init_dma_tx_desc_rings()
1804 struct stmmac_priv *priv = netdev_priv(dev); in init_dma_tx_desc_rings()
1829 struct stmmac_priv *priv = netdev_priv(dev); in init_dma_desc_rings()
1852 static void dma_free_tx_skbufs(struct stmmac_priv *priv, in dma_free_tx_skbufs()
1875 static void stmmac_free_tx_skbufs(struct stmmac_priv *priv) in stmmac_free_tx_skbufs()
1890 static void __free_dma_rx_desc_resources(struct stmmac_priv *priv, in __free_dma_rx_desc_resources()
1923 static void free_dma_rx_desc_resources(struct stmmac_priv *priv, in free_dma_rx_desc_resources()
1940 static void __free_dma_tx_desc_resources(struct stmmac_priv *priv, in __free_dma_tx_desc_resources()
1970 static void free_dma_tx_desc_resources(struct stmmac_priv *priv, in free_dma_tx_desc_resources()
1991 static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv, in __alloc_dma_rx_desc_resources()
2065 static int alloc_dma_rx_desc_resources(struct stmmac_priv *priv, in alloc_dma_rx_desc_resources()
2097 static int __alloc_dma_tx_desc_resources(struct stmmac_priv *priv, in __alloc_dma_tx_desc_resources()
2144 static int alloc_dma_tx_desc_resources(struct stmmac_priv *priv, in alloc_dma_tx_desc_resources()
2174 static int alloc_dma_desc_resources(struct stmmac_priv *priv, in alloc_dma_desc_resources()
2193 static void free_dma_desc_resources(struct stmmac_priv *priv, in free_dma_desc_resources()
2210 static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv) in stmmac_mac_enable_rx_queues()
2229 static void stmmac_start_rx_dma(struct stmmac_priv *priv, u32 chan) in stmmac_start_rx_dma()
2242 static void stmmac_start_tx_dma(struct stmmac_priv *priv, u32 chan) in stmmac_start_tx_dma()
2255 static void stmmac_stop_rx_dma(struct stmmac_priv *priv, u32 chan) in stmmac_stop_rx_dma()
2268 static void stmmac_stop_tx_dma(struct stmmac_priv *priv, u32 chan) in stmmac_stop_tx_dma()
2274 static void stmmac_enable_all_dma_irq(struct stmmac_priv *priv) in stmmac_enable_all_dma_irq()
2297 static void stmmac_start_all_dma(struct stmmac_priv *priv) in stmmac_start_all_dma()
2316 static void stmmac_stop_all_dma(struct stmmac_priv *priv) in stmmac_stop_all_dma()
2335 static void stmmac_dma_operation_mode(struct stmmac_priv *priv) in stmmac_dma_operation_mode()
2404 static bool stmmac_xdp_xmit_zc(struct stmmac_priv *priv, u32 queue, u32 budget) in stmmac_xdp_xmit_zc()
2499 static void stmmac_bump_dma_threshold(struct stmmac_priv *priv, u32 chan) in stmmac_bump_dma_threshold()
2521 static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue) in stmmac_tx_clean()
2701 static void stmmac_tx_err(struct stmmac_priv *priv, u32 chan) in stmmac_tx_err()
2729 static void stmmac_set_dma_operation_mode(struct stmmac_priv *priv, u32 txmode, in stmmac_set_dma_operation_mode()
2752 static bool stmmac_safety_feat_interrupt(struct stmmac_priv *priv) in stmmac_safety_feat_interrupt()
2766 static int stmmac_napi_check(struct stmmac_priv *priv, u32 chan, u32 dir) in stmmac_napi_check()
2808 static void stmmac_dma_interrupt(struct stmmac_priv *priv) in stmmac_dma_interrupt()
2840 static void stmmac_mmc_setup(struct stmmac_priv *priv) in stmmac_mmc_setup()
2863 static int stmmac_get_hw_features(struct stmmac_priv *priv) in stmmac_get_hw_features()
2875 static void stmmac_check_ether_addr(struct stmmac_priv *priv) in stmmac_check_ether_addr()
2898 static int stmmac_init_dma_engine(struct stmmac_priv *priv) in stmmac_init_dma_engine()
2964 static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue) in stmmac_tx_timer_arm()
2982 struct stmmac_priv *priv = tx_q->priv_data; in stmmac_tx_timer()
3009 static void stmmac_init_coalesce(struct stmmac_priv *priv) in stmmac_init_coalesce()
3029 static void stmmac_set_rings_length(struct stmmac_priv *priv) in stmmac_set_rings_length()
3051 static void stmmac_set_tx_queue_weight(struct stmmac_priv *priv) in stmmac_set_tx_queue_weight()
3068 static void stmmac_configure_cbs(struct stmmac_priv *priv) in stmmac_configure_cbs()
3094 static void stmmac_rx_queue_dma_chan_map(struct stmmac_priv *priv) in stmmac_rx_queue_dma_chan_map()
3111 static void stmmac_mac_config_rx_queues_prio(struct stmmac_priv *priv) in stmmac_mac_config_rx_queues_prio()
3131 static void stmmac_mac_config_tx_queues_prio(struct stmmac_priv *priv) in stmmac_mac_config_tx_queues_prio()
3151 static void stmmac_mac_config_rx_queues_routing(struct stmmac_priv *priv) in stmmac_mac_config_rx_queues_routing()
3167 static void stmmac_mac_config_rss(struct stmmac_priv *priv) in stmmac_mac_config_rss()
3188 static void stmmac_mtl_configuration(struct stmmac_priv *priv) in stmmac_mtl_configuration()
3233 static void stmmac_safety_feat_configuration(struct stmmac_priv *priv) in stmmac_safety_feat_configuration()
3244 static int stmmac_fpe_start_wq(struct stmmac_priv *priv) in stmmac_fpe_start_wq()
3280 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_hw_setup()
3425 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_hw_teardown()
3433 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_free_irq()
3484 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_request_irq_multi_msi()
3636 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_request_irq_single()
3687 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_request_irq()
3709 stmmac_setup_dma_desc(struct stmmac_priv *priv, unsigned int mtu) in stmmac_setup_dma_desc()
3785 struct stmmac_priv *priv = netdev_priv(dev); in __stmmac_open()
3866 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_open()
3879 static void stmmac_fpe_stop_wq(struct stmmac_priv *priv) in stmmac_fpe_stop_wq()
3897 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_release()
3946 static bool stmmac_vlan_insert(struct stmmac_priv *priv, struct sk_buff *skb, in stmmac_vlan_insert()
3988 static void stmmac_tso_allocator(struct stmmac_priv *priv, dma_addr_t des, in stmmac_tso_allocator()
4028 static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue) in stmmac_flush_tx_descriptors()
4080 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_tso_xmit()
4319 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_xmit()
4579 static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue) in stmmac_rx_refill()
4643 static unsigned int stmmac_rx_buf1_len(struct stmmac_priv *priv, in stmmac_rx_buf1_len()
4671 static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv, in stmmac_rx_buf2_len()
4692 static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue, in stmmac_xdp_xmit_xdpf()
4764 static int stmmac_xdp_get_tx_queue(struct stmmac_priv *priv, in stmmac_xdp_get_tx_queue()
4778 static int stmmac_xdp_xmit_back(struct stmmac_priv *priv, in stmmac_xdp_xmit_back()
4806 static int __stmmac_xdp_run_prog(struct stmmac_priv *priv, in __stmmac_xdp_run_prog()
4841 static struct sk_buff *stmmac_xdp_run_prog(struct stmmac_priv *priv, in stmmac_xdp_run_prog()
4858 static void stmmac_finalize_xdp_rx(struct stmmac_priv *priv, in stmmac_finalize_xdp_rx()
4894 static void stmmac_dispatch_skb_zc(struct stmmac_priv *priv, u32 queue, in stmmac_dispatch_skb_zc()
4930 static bool stmmac_rx_refill_zc(struct stmmac_priv *priv, u32 queue, u32 budget) in stmmac_rx_refill_zc()
4988 static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue) in stmmac_rx_zc()
5170 static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue) in stmmac_rx()
5439 struct stmmac_priv *priv = ch->priv_data; in stmmac_napi_poll_rx()
5461 struct stmmac_priv *priv = ch->priv_data; in stmmac_napi_poll_tx()
5485 struct stmmac_priv *priv = ch->priv_data; in stmmac_napi_poll_rxtx()
5530 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_tx_timeout()
5546 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_set_rx_mode()
5564 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_change_mtu()
5617 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_fix_features()
5647 struct stmmac_priv *priv = netdev_priv(netdev); in stmmac_set_features()
5670 static void stmmac_fpe_event_status(struct stmmac_priv *priv, int status) in stmmac_fpe_event_status()
5712 static void stmmac_common_interrupt(struct stmmac_priv *priv) in stmmac_common_interrupt()
5780 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_interrupt()
5802 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_mac_interrupt()
5822 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_safety_interrupt()
5844 struct stmmac_priv *priv; in stmmac_msi_intr_tx()
5848 priv = container_of(dma_conf, struct stmmac_priv, dma_conf); in stmmac_msi_intr_tx()
5876 struct stmmac_priv *priv; in stmmac_msi_intr_rx()
5879 priv = container_of(dma_conf, struct stmmac_priv, dma_conf); in stmmac_msi_intr_rx()
5901 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_poll_controller()
5933 struct stmmac_priv *priv = netdev_priv (dev); in stmmac_ioctl()
5961 struct stmmac_priv *priv = cb_priv; in stmmac_setup_tc_block_cb()
5989 struct stmmac_priv *priv = netdev_priv(ndev); in stmmac_setup_tc()
6028 struct stmmac_priv *priv = netdev_priv(ndev); in stmmac_set_mac_address()
6083 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_rings_status_show()
6130 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_dma_cap_show()
6233 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_device_event()
6257 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_init_fs()
6277 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_exit_fs()
6307 static int stmmac_vlan_update(struct stmmac_priv *priv, bool is_double) in stmmac_vlan_update()
6334 struct stmmac_priv *priv = netdev_priv(ndev); in stmmac_vlan_rx_add_vid()
6359 struct stmmac_priv *priv = netdev_priv(ndev); in stmmac_vlan_rx_kill_vid()
6388 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_bpf()
6404 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_xdp_xmit()
6443 void stmmac_disable_rx_queue(struct stmmac_priv *priv, u32 queue) in stmmac_disable_rx_queue()
6456 void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue) in stmmac_enable_rx_queue()
6506 void stmmac_disable_tx_queue(struct stmmac_priv *priv, u32 queue) in stmmac_disable_tx_queue()
6519 void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue) in stmmac_enable_tx_queue()
6561 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_xdp_release()
6594 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_xdp_open()
6701 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_xsk_wakeup()
6758 static void stmmac_reset_subtask(struct stmmac_priv *priv) in stmmac_reset_subtask()
6782 struct stmmac_priv *priv = container_of(work, struct stmmac_priv, in stmmac_service_task()
6797 static int stmmac_hw_init(struct stmmac_priv *priv) in stmmac_hw_init()
6894 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_napi_add()
6923 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_napi_del()
6944 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_reinit_queues()
6965 struct stmmac_priv *priv = netdev_priv(dev); in stmmac_reinit_ringparam()
6983 struct stmmac_priv *priv = container_of(work, struct stmmac_priv, in stmmac_fpe_lp_task()
7027 void stmmac_fpe_handshake(struct stmmac_priv *priv, bool enable) in stmmac_fpe_handshake()
7057 struct stmmac_priv *priv; in stmmac_dvr_probe()
7061 ndev = devm_alloc_etherdev_mqs(device, sizeof(struct stmmac_priv), in stmmac_dvr_probe()
7350 struct stmmac_priv *priv = netdev_priv(ndev); in stmmac_dvr_remove()
7398 struct stmmac_priv *priv = netdev_priv(ndev); in stmmac_suspend()
7460 static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue) in stmmac_reset_rx_queue()
7468 static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue) in stmmac_reset_tx_queue()
7483 static void stmmac_reset_queues_param(struct stmmac_priv *priv) in stmmac_reset_queues_param()
7505 struct stmmac_priv *priv = netdev_priv(ndev); in stmmac_resume()