Lines Matching refs:netdev
244 netif_dbg(pdata, drv, pdata->netdev, in xgbe_alloc_channels()
247 netif_dbg(pdata, drv, pdata->netdev, in xgbe_alloc_channels()
279 netif_info(pdata, drv, pdata->netdev, in xgbe_maybe_stop_tx_queue()
281 netif_stop_subqueue(pdata->netdev, channel->queue_index); in xgbe_maybe_stop_tx_queue()
296 static int xgbe_calc_rx_buf_size(struct net_device *netdev, unsigned int mtu) in xgbe_calc_rx_buf_size() argument
397 netdev_alert(pdata->netdev, in xgbe_ecc_ded()
415 netif_dbg(pdata, intr, pdata->netdev, "ECC_ISR=%#010x\n", ecc_isr); in xgbe_ecc_isr_task()
493 netif_dbg(pdata, intr, pdata->netdev, "DMA_ISR=%#010x\n", dma_isr); in xgbe_isr_task()
502 netif_dbg(pdata, intr, pdata->netdev, "DMA_CH%u_ISR=%#010x\n", in xgbe_isr_task()
542 netif_dbg(pdata, intr, pdata->netdev, "MAC_ISR=%#010x\n", in xgbe_isr_task()
554 netif_dbg(pdata, intr, pdata->netdev, in xgbe_isr_task()
569 netif_dbg(pdata, intr, pdata->netdev, in xgbe_isr_task()
923 static int xgbe_vxlan_set_port(struct net_device *netdev, unsigned int table, in xgbe_vxlan_set_port() argument
926 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_vxlan_set_port()
934 static int xgbe_vxlan_unset_port(struct net_device *netdev, unsigned int table, in xgbe_vxlan_unset_port() argument
937 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_vxlan_unset_port()
968 netif_napi_add(pdata->netdev, &channel->napi, in xgbe_napi_enable()
975 netif_napi_add(pdata->netdev, &pdata->napi, in xgbe_napi_enable()
1006 struct net_device *netdev = pdata->netdev; in xgbe_request_irqs() local
1014 netdev_name(netdev), pdata); in xgbe_request_irqs()
1016 netdev_alert(netdev, "error requesting irq %d\n", in xgbe_request_irqs()
1025 netdev_alert(netdev, "error requesting ecc irq %d\n", in xgbe_request_irqs()
1038 "%s-TxRx-%u", netdev_name(netdev), in xgbe_request_irqs()
1045 netdev_alert(netdev, "error requesting irq %d\n", in xgbe_request_irqs()
1181 int xgbe_powerdown(struct net_device *netdev, unsigned int caller) in xgbe_powerdown() argument
1183 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_powerdown()
1189 if (!netif_running(netdev) || in xgbe_powerdown()
1191 netdev_alert(netdev, "Device is already powered down\n"); in xgbe_powerdown()
1199 netif_device_detach(netdev); in xgbe_powerdown()
1201 netif_tx_stop_all_queues(netdev); in xgbe_powerdown()
1220 int xgbe_powerup(struct net_device *netdev, unsigned int caller) in xgbe_powerup() argument
1222 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_powerup()
1228 if (!netif_running(netdev) || in xgbe_powerup()
1230 netdev_alert(netdev, "Device is already powered up\n"); in xgbe_powerup()
1245 netif_device_attach(netdev); in xgbe_powerup()
1247 netif_tx_start_all_queues(netdev); in xgbe_powerup()
1272 struct net_device *netdev = pdata->netdev; in xgbe_alloc_memory() local
1287 pdata->rx_buf_size = xgbe_calc_rx_buf_size(netdev, netdev->mtu); in xgbe_alloc_memory()
1314 struct net_device *netdev = pdata->netdev; in xgbe_start() local
1319 ret = netif_set_real_num_tx_queues(netdev, pdata->tx_ring_count); in xgbe_start()
1321 netdev_err(netdev, "error setting real tx queue count\n"); in xgbe_start()
1325 ret = netif_set_real_num_rx_queues(netdev, pdata->rx_ring_count); in xgbe_start()
1327 netdev_err(netdev, "error setting real rx queue count\n"); in xgbe_start()
1353 udp_tunnel_nic_reset_ntf(netdev); in xgbe_start()
1355 netif_tx_start_all_queues(netdev); in xgbe_start()
1380 struct net_device *netdev = pdata->netdev; in xgbe_stop() local
1389 netif_tx_stop_all_queues(netdev); in xgbe_stop()
1390 netif_carrier_off(pdata->netdev); in xgbe_stop()
1395 xgbe_vxlan_unset_port(netdev, 0, 0, NULL); in xgbe_stop()
1413 txq = netdev_get_tx_queue(netdev, channel->queue_index); in xgbe_stop()
1437 netdev_alert(pdata->netdev, "device stopped\n"); in xgbe_stopdev()
1443 if (!netif_running(pdata->netdev)) in xgbe_full_restart_dev()
1457 if (!netif_running(pdata->netdev)) in xgbe_restart_dev()
1832 static int xgbe_open(struct net_device *netdev) in xgbe_open() argument
1834 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_open()
1839 netdev_name(netdev)); in xgbe_open()
1842 netdev_name(netdev)); in xgbe_open()
1845 netdev_name(netdev)); in xgbe_open()
1849 create_singlethread_workqueue(netdev_name(netdev)); in xgbe_open()
1851 netdev_err(netdev, "device workqueue creation failed\n"); in xgbe_open()
1858 netdev_err(netdev, "phy workqueue creation failed\n"); in xgbe_open()
1871 netdev_alert(netdev, "dma clk_prepare_enable failed\n"); in xgbe_open()
1877 netdev_alert(netdev, "ptp clk_prepare_enable failed\n"); in xgbe_open()
1916 static int xgbe_close(struct net_device *netdev) in xgbe_close() argument
1918 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_close()
1938 static netdev_tx_t xgbe_xmit(struct sk_buff *skb, struct net_device *netdev) in xgbe_xmit() argument
1940 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_xmit()
1952 txq = netdev_get_tx_queue(netdev, channel->queue_index); in xgbe_xmit()
1959 netif_err(pdata, tx_err, netdev, in xgbe_xmit()
1976 netif_err(pdata, tx_err, netdev, in xgbe_xmit()
1997 xgbe_print_pkt(netdev, skb, true); in xgbe_xmit()
2008 static void xgbe_set_rx_mode(struct net_device *netdev) in xgbe_set_rx_mode() argument
2010 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_rx_mode()
2020 static int xgbe_set_mac_address(struct net_device *netdev, void *addr) in xgbe_set_mac_address() argument
2022 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_mac_address()
2031 eth_hw_addr_set(netdev, saddr->sa_data); in xgbe_set_mac_address()
2033 hw_if->set_mac_address(pdata, netdev->dev_addr); in xgbe_set_mac_address()
2040 static int xgbe_ioctl(struct net_device *netdev, struct ifreq *ifreq, int cmd) in xgbe_ioctl() argument
2042 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_ioctl()
2061 static int xgbe_change_mtu(struct net_device *netdev, int mtu) in xgbe_change_mtu() argument
2063 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_change_mtu()
2068 ret = xgbe_calc_rx_buf_size(netdev, mtu); in xgbe_change_mtu()
2073 netdev->mtu = mtu; in xgbe_change_mtu()
2082 static void xgbe_tx_timeout(struct net_device *netdev, unsigned int txqueue) in xgbe_tx_timeout() argument
2084 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_tx_timeout()
2086 netdev_warn(netdev, "tx timeout, device restarting\n"); in xgbe_tx_timeout()
2090 static void xgbe_get_stats64(struct net_device *netdev, in xgbe_get_stats64() argument
2093 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_stats64()
2114 s->tx_dropped = netdev->stats.tx_dropped; in xgbe_get_stats64()
2119 static int xgbe_vlan_rx_add_vid(struct net_device *netdev, __be16 proto, in xgbe_vlan_rx_add_vid() argument
2122 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_vlan_rx_add_vid()
2135 static int xgbe_vlan_rx_kill_vid(struct net_device *netdev, __be16 proto, in xgbe_vlan_rx_kill_vid() argument
2138 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_vlan_rx_kill_vid()
2152 static void xgbe_poll_controller(struct net_device *netdev) in xgbe_poll_controller() argument
2154 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_poll_controller()
2175 static int xgbe_setup_tc(struct net_device *netdev, enum tc_setup_type type, in xgbe_setup_tc() argument
2178 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_setup_tc()
2197 static netdev_features_t xgbe_fix_features(struct net_device *netdev, in xgbe_fix_features() argument
2200 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_fix_features()
2211 netdev_notice(netdev, in xgbe_fix_features()
2218 netdev_notice(netdev, in xgbe_fix_features()
2225 netdev_notice(netdev, in xgbe_fix_features()
2231 netdev_notice(netdev, in xgbe_fix_features()
2240 static int xgbe_set_features(struct net_device *netdev, in xgbe_set_features() argument
2243 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_features()
2283 struct net_device *netdev, in xgbe_features_check() argument
2423 struct net_device *netdev = pdata->netdev; in xgbe_tx_poll() local
2440 txq = netdev_get_tx_queue(netdev, channel->queue_index); in xgbe_tx_poll()
2493 struct net_device *netdev = pdata->netdev; in xgbe_rx_poll() local
2557 netif_err(pdata, rx_err, netdev, in xgbe_rx_poll()
2613 max_len = netdev->mtu + ETH_HLEN; in xgbe_rx_poll()
2614 if (!(netdev->features & NETIF_F_HW_VLAN_CTAG_RX) && in xgbe_rx_poll()
2619 netif_err(pdata, rx_err, netdev, in xgbe_rx_poll()
2626 xgbe_print_pkt(netdev, skb, false); in xgbe_rx_poll()
2662 skb->dev = netdev; in xgbe_rx_poll()
2663 skb->protocol = eth_type_trans(skb, netdev); in xgbe_rx_poll()
2764 netdev_dbg(pdata->netdev, in xgbe_dump_tx_desc()
2783 netdev_dbg(pdata->netdev, in xgbe_dump_rx_desc()
2789 void xgbe_print_pkt(struct net_device *netdev, struct sk_buff *skb, bool tx_rx) in xgbe_print_pkt() argument
2795 netdev_dbg(netdev, "\n************** SKB dump ****************\n"); in xgbe_print_pkt()
2797 netdev_dbg(netdev, "%s packet of %d bytes\n", in xgbe_print_pkt()
2800 netdev_dbg(netdev, "Dst MAC addr: %pM\n", eth->h_dest); in xgbe_print_pkt()
2801 netdev_dbg(netdev, "Src MAC addr: %pM\n", eth->h_source); in xgbe_print_pkt()
2802 netdev_dbg(netdev, "Protocol: %#06x\n", ntohs(eth->h_proto)); in xgbe_print_pkt()
2809 netdev_dbg(netdev, " %#06x: %s\n", i, buffer); in xgbe_print_pkt()
2812 netdev_dbg(netdev, "\n************** SKB dump ****************\n"); in xgbe_print_pkt()