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
372 skb->protocol = eth_type_trans(skb, netdev); in igbvf_clean_rx_irq()
374 igbvf_receive_skb(adapter, netdev, skb, staterr, in igbvf_clean_rx_irq()
793 struct net_device *netdev = adapter->netdev; in igbvf_clean_tx_irq() local
852 if (unlikely(count && netif_carrier_ok(netdev) && in igbvf_clean_tx_irq()
858 if (netif_queue_stopped(netdev) && in igbvf_clean_tx_irq()
860 netif_wake_queue(netdev); in igbvf_clean_tx_irq()
872 struct net_device *netdev = data; in igbvf_msix_other() local
873 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_msix_other()
878 netif_carrier_off(netdev); in igbvf_msix_other()
890 struct net_device *netdev = data; in igbvf_intr_msix_tx() local
891 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_intr_msix_tx()
918 struct net_device *netdev = data; in igbvf_intr_msix_rx() local
919 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_intr_msix_rx()
1070 struct net_device *netdev = adapter->netdev; in igbvf_request_msix() local
1073 if (strlen(netdev->name) < (IFNAMSIZ - 5)) { in igbvf_request_msix()
1074 sprintf(adapter->tx_ring->name, "%s-tx-0", netdev->name); in igbvf_request_msix()
1075 sprintf(adapter->rx_ring->name, "%s-rx-0", netdev->name); in igbvf_request_msix()
1077 memcpy(adapter->tx_ring->name, netdev->name, IFNAMSIZ); in igbvf_request_msix()
1078 memcpy(adapter->rx_ring->name, netdev->name, IFNAMSIZ); in igbvf_request_msix()
1083 netdev); in igbvf_request_msix()
1093 netdev); in igbvf_request_msix()
1102 igbvf_msix_other, 0, netdev->name, netdev); in igbvf_request_msix()
1118 struct net_device *netdev = adapter->netdev; in igbvf_alloc_queues() local
1130 netif_napi_add(netdev, &adapter->rx_ring->napi, igbvf_poll, 64); in igbvf_alloc_queues()
1161 struct net_device *netdev = adapter->netdev; in igbvf_free_irq() local
1166 free_irq(adapter->msix_entries[vector].vector, netdev); in igbvf_free_irq()
1240 static int igbvf_vlan_rx_add_vid(struct net_device *netdev, in igbvf_vlan_rx_add_vid() argument
1243 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_vlan_rx_add_vid()
1254 static int igbvf_vlan_rx_kill_vid(struct net_device *netdev, in igbvf_vlan_rx_kill_vid() argument
1257 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_vlan_rx_kill_vid()
1274 igbvf_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), vid); in igbvf_restore_vlan()
1412 static void igbvf_set_multi(struct net_device *netdev) in igbvf_set_multi() argument
1414 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_set_multi()
1420 if (!netdev_mc_empty(netdev)) { in igbvf_set_multi()
1421 mta_list = kmalloc_array(netdev_mc_count(netdev), ETH_ALEN, in igbvf_set_multi()
1429 netdev_for_each_mc_addr(ha, netdev) in igbvf_set_multi()
1442 igbvf_set_multi(adapter->netdev); in igbvf_configure()
1464 struct net_device *netdev = adapter->netdev; in igbvf_reset() local
1474 memcpy(netdev->dev_addr, adapter->hw.mac.addr, in igbvf_reset()
1475 netdev->addr_len); in igbvf_reset()
1476 memcpy(netdev->perm_addr, adapter->hw.mac.addr, in igbvf_reset()
1477 netdev->addr_len); in igbvf_reset()
1509 struct net_device *netdev = adapter->netdev; in igbvf_down() local
1522 netif_carrier_off(netdev); in igbvf_down()
1523 netif_stop_queue(netdev); in igbvf_down()
1570 struct net_device *netdev = adapter->netdev; in igbvf_sw_init() local
1575 adapter->max_frame_size = netdev->mtu + ETH_HLEN + ETH_FCS_LEN; in igbvf_sw_init()
1649 static int igbvf_open(struct net_device *netdev) in igbvf_open() argument
1651 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_open()
1717 static int igbvf_close(struct net_device *netdev) in igbvf_close() argument
1719 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_close()
1739 static int igbvf_set_mac(struct net_device *netdev, void *p) in igbvf_set_mac() argument
1741 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_set_mac()
1748 memcpy(hw->mac.addr, addr->sa_data, netdev->addr_len); in igbvf_set_mac()
1755 memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); in igbvf_set_mac()
1849 struct net_device *netdev = adapter->netdev; in igbvf_watchdog_task() local
1859 if (!netif_carrier_ok(netdev)) { in igbvf_watchdog_task()
1865 netif_carrier_on(netdev); in igbvf_watchdog_task()
1866 netif_wake_queue(netdev); in igbvf_watchdog_task()
1869 if (netif_carrier_ok(netdev)) { in igbvf_watchdog_task()
1873 netif_carrier_off(netdev); in igbvf_watchdog_task()
1874 netif_stop_queue(netdev); in igbvf_watchdog_task()
1878 if (netif_carrier_ok(netdev)) { in igbvf_watchdog_task()
2050 static int igbvf_maybe_stop_tx(struct net_device *netdev, int size) in igbvf_maybe_stop_tx() argument
2052 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_maybe_stop_tx()
2058 netif_stop_queue(netdev); in igbvf_maybe_stop_tx()
2070 netif_wake_queue(netdev); in igbvf_maybe_stop_tx()
2215 struct net_device *netdev, in igbvf_xmit_frame_ring_adv() argument
2218 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_xmit_frame_ring_adv()
2241 if (igbvf_maybe_stop_tx(netdev, skb_shinfo(skb)->nr_frags + 4)) { in igbvf_xmit_frame_ring_adv()
2279 igbvf_maybe_stop_tx(netdev, MAX_SKB_FRAGS + 4); in igbvf_xmit_frame_ring_adv()
2290 struct net_device *netdev) in igbvf_xmit_frame() argument
2292 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_xmit_frame()
2302 return igbvf_xmit_frame_ring_adv(skb, netdev, tx_ring); in igbvf_xmit_frame()
2309 static void igbvf_tx_timeout(struct net_device *netdev) in igbvf_tx_timeout() argument
2311 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_tx_timeout()
2334 static struct net_device_stats *igbvf_get_stats(struct net_device *netdev) in igbvf_get_stats() argument
2336 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_get_stats()
2349 static int igbvf_change_mtu(struct net_device *netdev, int new_mtu) in igbvf_change_mtu() argument
2351 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_change_mtu()
2368 if (netif_running(netdev)) in igbvf_change_mtu()
2397 netdev->mtu, new_mtu); in igbvf_change_mtu()
2398 netdev->mtu = new_mtu; in igbvf_change_mtu()
2400 if (netif_running(netdev)) in igbvf_change_mtu()
2410 static int igbvf_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) in igbvf_ioctl() argument
2420 struct net_device *netdev = pci_get_drvdata(pdev); in igbvf_suspend() local
2421 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_suspend()
2426 netif_device_detach(netdev); in igbvf_suspend()
2428 if (netif_running(netdev)) { in igbvf_suspend()
2448 struct net_device *netdev = pci_get_drvdata(pdev); in igbvf_resume() local
2449 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_resume()
2461 if (netif_running(netdev)) { in igbvf_resume()
2469 if (netif_running(netdev)) in igbvf_resume()
2472 netif_device_attach(netdev); in igbvf_resume()
2488 static void igbvf_netpoll(struct net_device *netdev) in igbvf_netpoll() argument
2490 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_netpoll()
2511 struct net_device *netdev = pci_get_drvdata(pdev); in igbvf_io_error_detected() local
2512 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_io_error_detected()
2514 netif_device_detach(netdev); in igbvf_io_error_detected()
2519 if (netif_running(netdev)) in igbvf_io_error_detected()
2536 struct net_device *netdev = pci_get_drvdata(pdev); in igbvf_io_slot_reset() local
2537 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_io_slot_reset()
2561 struct net_device *netdev = pci_get_drvdata(pdev); in igbvf_io_resume() local
2562 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_io_resume()
2564 if (netif_running(netdev)) { in igbvf_io_resume()
2572 netif_device_attach(netdev); in igbvf_io_resume()
2578 struct net_device *netdev = adapter->netdev; in igbvf_print_device_info() local
2585 dev_info(&pdev->dev, "Address: %pM\n", netdev->dev_addr); in igbvf_print_device_info()
2588 static int igbvf_set_features(struct net_device *netdev, in igbvf_set_features() argument
2591 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_set_features()
2632 struct net_device *netdev; in igbvf_probe() local
2664 netdev = alloc_etherdev(sizeof(struct igbvf_adapter)); in igbvf_probe()
2665 if (!netdev) in igbvf_probe()
2668 SET_NETDEV_DEV(netdev, &pdev->dev); in igbvf_probe()
2670 pci_set_drvdata(pdev, netdev); in igbvf_probe()
2671 adapter = netdev_priv(netdev); in igbvf_probe()
2673 adapter->netdev = netdev; in igbvf_probe()
2709 netdev->netdev_ops = &igbvf_netdev_ops; in igbvf_probe()
2711 igbvf_set_ethtool_ops(netdev); in igbvf_probe()
2712 netdev->watchdog_timeo = 5 * HZ; in igbvf_probe()
2713 strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); in igbvf_probe()
2717 netdev->hw_features = NETIF_F_SG | in igbvf_probe()
2724 netdev->features = netdev->hw_features | in igbvf_probe()
2730 netdev->features |= NETIF_F_HIGHDMA; in igbvf_probe()
2732 netdev->vlan_features |= NETIF_F_TSO; in igbvf_probe()
2733 netdev->vlan_features |= NETIF_F_TSO6; in igbvf_probe()
2734 netdev->vlan_features |= NETIF_F_IP_CSUM; in igbvf_probe()
2735 netdev->vlan_features |= NETIF_F_IPV6_CSUM; in igbvf_probe()
2736 netdev->vlan_features |= NETIF_F_SG; in igbvf_probe()
2750 memcpy(netdev->dev_addr, adapter->hw.mac.addr, in igbvf_probe()
2751 netdev->addr_len); in igbvf_probe()
2754 if (!is_valid_ether_addr(netdev->dev_addr)) { in igbvf_probe()
2756 eth_hw_addr_random(netdev); in igbvf_probe()
2757 memcpy(adapter->hw.mac.addr, netdev->dev_addr, in igbvf_probe()
2758 netdev->addr_len); in igbvf_probe()
2778 strcpy(netdev->name, "eth%d"); in igbvf_probe()
2779 err = register_netdev(netdev); in igbvf_probe()
2784 netif_carrier_off(netdev); in igbvf_probe()
2785 netif_stop_queue(netdev); in igbvf_probe()
2801 free_netdev(netdev); in igbvf_probe()
2821 struct net_device *netdev = pci_get_drvdata(pdev); in igbvf_remove() local
2822 struct igbvf_adapter *adapter = netdev_priv(netdev); in igbvf_remove()
2834 unregister_netdev(netdev); in igbvf_remove()
2850 free_netdev(netdev); in igbvf_remove()