Lines Matching refs:netdev
106 struct net_device *netdev, in igbvf_receive_skb() argument
159 struct net_device *netdev = adapter->netdev; in igbvf_alloc_rx_buffers() local
204 skb = netdev_alloc_skb_ip_align(netdev, bufsz); in igbvf_alloc_rx_buffers()
268 struct net_device *netdev = adapter->netdev; in igbvf_clean_rx_irq() local
373 skb->protocol = eth_type_trans(skb, netdev); in igbvf_clean_rx_irq()
375 igbvf_receive_skb(adapter, netdev, skb, staterr, in igbvf_clean_rx_irq()
794 struct net_device *netdev = adapter->netdev; in igbvf_clean_tx_irq() local
853 if (unlikely(count && netif_carrier_ok(netdev) && in igbvf_clean_tx_irq()
859 if (netif_queue_stopped(netdev) && in igbvf_clean_tx_irq()
861 netif_wake_queue(netdev); in igbvf_clean_tx_irq()
873 struct net_device *netdev = data; in igbvf_msix_other() local
874 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_msix_other()
879 netif_carrier_off(netdev); in igbvf_msix_other()
891 struct net_device *netdev = data; in igbvf_intr_msix_tx() local
892 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_intr_msix_tx()
919 struct net_device *netdev = data; in igbvf_intr_msix_rx() local
920 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_intr_msix_rx()
1071 struct net_device *netdev = adapter->netdev; in igbvf_request_msix() local
1074 if (strlen(netdev->name) < (IFNAMSIZ - 5)) { in igbvf_request_msix()
1075 sprintf(adapter->tx_ring->name, "%s-tx-0", netdev->name); in igbvf_request_msix()
1076 sprintf(adapter->rx_ring->name, "%s-rx-0", netdev->name); in igbvf_request_msix()
1078 memcpy(adapter->tx_ring->name, netdev->name, IFNAMSIZ); in igbvf_request_msix()
1079 memcpy(adapter->rx_ring->name, netdev->name, IFNAMSIZ); in igbvf_request_msix()
1084 netdev); in igbvf_request_msix()
1094 netdev); in igbvf_request_msix()
1103 igbvf_msix_other, 0, netdev->name, netdev); in igbvf_request_msix()
1119 struct net_device *netdev = adapter->netdev; in igbvf_alloc_queues() local
1131 netif_napi_add(netdev, &adapter->rx_ring->napi, igbvf_poll, 64); in igbvf_alloc_queues()
1162 struct net_device *netdev = adapter->netdev; in igbvf_free_irq() local
1167 free_irq(adapter->msix_entries[vector].vector, netdev); in igbvf_free_irq()
1241 static int igbvf_vlan_rx_add_vid(struct net_device *netdev, in igbvf_vlan_rx_add_vid() argument
1244 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_vlan_rx_add_vid()
1255 static int igbvf_vlan_rx_kill_vid(struct net_device *netdev, in igbvf_vlan_rx_kill_vid() argument
1258 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_vlan_rx_kill_vid()
1275 igbvf_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), vid); in igbvf_restore_vlan()
1413 static void igbvf_set_multi(struct net_device *netdev) in igbvf_set_multi() argument
1415 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_set_multi()
1421 if (!netdev_mc_empty(netdev)) { in igbvf_set_multi()
1422 mta_list = kmalloc_array(netdev_mc_count(netdev), ETH_ALEN, in igbvf_set_multi()
1430 netdev_for_each_mc_addr(ha, netdev) in igbvf_set_multi()
1443 igbvf_set_multi(adapter->netdev); in igbvf_configure()
1465 struct net_device *netdev = adapter->netdev; in igbvf_reset() local
1475 memcpy(netdev->dev_addr, adapter->hw.mac.addr, in igbvf_reset()
1476 netdev->addr_len); in igbvf_reset()
1477 memcpy(netdev->perm_addr, adapter->hw.mac.addr, in igbvf_reset()
1478 netdev->addr_len); in igbvf_reset()
1510 struct net_device *netdev = adapter->netdev; in igbvf_down() local
1523 netif_carrier_off(netdev); in igbvf_down()
1524 netif_stop_queue(netdev); in igbvf_down()
1571 struct net_device *netdev = adapter->netdev; in igbvf_sw_init() local
1576 adapter->max_frame_size = netdev->mtu + ETH_HLEN + ETH_FCS_LEN; in igbvf_sw_init()
1650 static int igbvf_open(struct net_device *netdev) in igbvf_open() argument
1652 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_open()
1718 static int igbvf_close(struct net_device *netdev) in igbvf_close() argument
1720 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_close()
1740 static int igbvf_set_mac(struct net_device *netdev, void *p) in igbvf_set_mac() argument
1742 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_set_mac()
1749 memcpy(hw->mac.addr, addr->sa_data, netdev->addr_len); in igbvf_set_mac()
1756 memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); in igbvf_set_mac()
1850 struct net_device *netdev = adapter->netdev; in igbvf_watchdog_task() local
1860 if (!netif_carrier_ok(netdev)) { in igbvf_watchdog_task()
1866 netif_carrier_on(netdev); in igbvf_watchdog_task()
1867 netif_wake_queue(netdev); in igbvf_watchdog_task()
1870 if (netif_carrier_ok(netdev)) { in igbvf_watchdog_task()
1874 netif_carrier_off(netdev); in igbvf_watchdog_task()
1875 netif_stop_queue(netdev); in igbvf_watchdog_task()
1879 if (netif_carrier_ok(netdev)) { in igbvf_watchdog_task()
2051 static int igbvf_maybe_stop_tx(struct net_device *netdev, int size) in igbvf_maybe_stop_tx() argument
2053 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_maybe_stop_tx()
2059 netif_stop_queue(netdev); in igbvf_maybe_stop_tx()
2071 netif_wake_queue(netdev); in igbvf_maybe_stop_tx()
2216 struct net_device *netdev, in igbvf_xmit_frame_ring_adv() argument
2219 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_xmit_frame_ring_adv()
2242 if (igbvf_maybe_stop_tx(netdev, skb_shinfo(skb)->nr_frags + 4)) { in igbvf_xmit_frame_ring_adv()
2280 igbvf_maybe_stop_tx(netdev, MAX_SKB_FRAGS + 4); in igbvf_xmit_frame_ring_adv()
2291 struct net_device *netdev) in igbvf_xmit_frame() argument
2293 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_xmit_frame()
2303 return igbvf_xmit_frame_ring_adv(skb, netdev, tx_ring); in igbvf_xmit_frame()
2310 static void igbvf_tx_timeout(struct net_device *netdev) in igbvf_tx_timeout() argument
2312 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_tx_timeout()
2335 static struct net_device_stats *igbvf_get_stats(struct net_device *netdev) in igbvf_get_stats() argument
2337 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_get_stats()
2350 static int igbvf_change_mtu(struct net_device *netdev, int new_mtu) in igbvf_change_mtu() argument
2352 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_change_mtu()
2369 if (netif_running(netdev)) in igbvf_change_mtu()
2398 netdev->mtu, new_mtu); in igbvf_change_mtu()
2399 netdev->mtu = new_mtu; in igbvf_change_mtu()
2401 if (netif_running(netdev)) in igbvf_change_mtu()
2411 static int igbvf_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) in igbvf_ioctl() argument
2421 struct net_device *netdev = pci_get_drvdata(pdev); in igbvf_suspend() local
2422 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_suspend()
2427 netif_device_detach(netdev); in igbvf_suspend()
2429 if (netif_running(netdev)) { in igbvf_suspend()
2449 struct net_device *netdev = pci_get_drvdata(pdev); in igbvf_resume() local
2450 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_resume()
2462 if (netif_running(netdev)) { in igbvf_resume()
2470 if (netif_running(netdev)) in igbvf_resume()
2473 netif_device_attach(netdev); in igbvf_resume()
2489 static void igbvf_netpoll(struct net_device *netdev) in igbvf_netpoll() argument
2491 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_netpoll()
2512 struct net_device *netdev = pci_get_drvdata(pdev); in igbvf_io_error_detected() local
2513 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_io_error_detected()
2515 netif_device_detach(netdev); in igbvf_io_error_detected()
2520 if (netif_running(netdev)) in igbvf_io_error_detected()
2537 struct net_device *netdev = pci_get_drvdata(pdev); in igbvf_io_slot_reset() local
2538 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_io_slot_reset()
2562 struct net_device *netdev = pci_get_drvdata(pdev); in igbvf_io_resume() local
2563 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_io_resume()
2565 if (netif_running(netdev)) { in igbvf_io_resume()
2573 netif_device_attach(netdev); in igbvf_io_resume()
2579 struct net_device *netdev = adapter->netdev; in igbvf_print_device_info() local
2586 dev_info(&pdev->dev, "Address: %pM\n", netdev->dev_addr); in igbvf_print_device_info()
2589 static int igbvf_set_features(struct net_device *netdev, in igbvf_set_features() argument
2592 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_set_features()
2634 struct net_device *netdev; in igbvf_probe() local
2666 netdev = alloc_etherdev(sizeof(struct igbvf_adapter)); in igbvf_probe()
2667 if (!netdev) in igbvf_probe()
2670 SET_NETDEV_DEV(netdev, &pdev->dev); in igbvf_probe()
2672 pci_set_drvdata(pdev, netdev); in igbvf_probe()
2673 adapter = netdev_priv(netdev); in igbvf_probe()
2675 adapter->netdev = netdev; in igbvf_probe()
2711 netdev->netdev_ops = &igbvf_netdev_ops; in igbvf_probe()
2713 igbvf_set_ethtool_ops(netdev); in igbvf_probe()
2714 netdev->watchdog_timeo = 5 * HZ; in igbvf_probe()
2715 strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); in igbvf_probe()
2719 netdev->hw_features = NETIF_F_SG | in igbvf_probe()
2726 netdev->features = netdev->hw_features | in igbvf_probe()
2732 netdev->features |= NETIF_F_HIGHDMA; in igbvf_probe()
2734 netdev->vlan_features |= NETIF_F_TSO; in igbvf_probe()
2735 netdev->vlan_features |= NETIF_F_TSO6; in igbvf_probe()
2736 netdev->vlan_features |= NETIF_F_IP_CSUM; in igbvf_probe()
2737 netdev->vlan_features |= NETIF_F_IPV6_CSUM; in igbvf_probe()
2738 netdev->vlan_features |= NETIF_F_SG; in igbvf_probe()
2752 memcpy(netdev->dev_addr, adapter->hw.mac.addr, in igbvf_probe()
2753 netdev->addr_len); in igbvf_probe()
2756 if (!is_valid_ether_addr(netdev->dev_addr)) { in igbvf_probe()
2758 eth_hw_addr_random(netdev); in igbvf_probe()
2759 memcpy(adapter->hw.mac.addr, netdev->dev_addr, in igbvf_probe()
2760 netdev->addr_len); in igbvf_probe()
2780 strcpy(netdev->name, "eth%d"); in igbvf_probe()
2781 err = register_netdev(netdev); in igbvf_probe()
2786 netif_carrier_off(netdev); in igbvf_probe()
2787 netif_stop_queue(netdev); in igbvf_probe()
2803 free_netdev(netdev); in igbvf_probe()
2823 struct net_device *netdev = pci_get_drvdata(pdev); in igbvf_remove() local
2824 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_remove()
2836 unregister_netdev(netdev); in igbvf_remove()
2852 free_netdev(netdev); in igbvf_remove()