Lines Matching refs:net_dev
241 netif_err(efx, drv, efx->net_dev, in efx_check_disabled()
337 netif_vdbg(efx, intr, efx->net_dev, in efx_poll()
377 netif_dbg(efx, probe, efx->net_dev, in efx_probe_eventq()
397 netif_dbg(efx, drv, efx->net_dev, in efx_init_eventq()
412 netif_dbg(channel->efx, ifup, channel->efx->net_dev, in efx_start_eventq()
438 netif_dbg(channel->efx, drv, channel->efx->net_dev, in efx_fini_eventq()
447 netif_dbg(channel->efx, drv, channel->efx->net_dev, in efx_remove_eventq()
542 netif_dbg(channel->efx, probe, channel->efx->net_dev, in efx_probe_channel()
619 netif_err(efx, probe, efx->net_dev, in efx_probe_channels()
640 netdev_features_t old_features = efx->net_dev->features; in efx_start_datapath()
652 EFX_MAX_FRAME_LEN(efx->net_dev->mtu) + in efx_start_datapath()
675 netif_dbg(efx, drv, efx->net_dev, in efx_start_datapath()
680 netif_dbg(efx, drv, efx->net_dev, in efx_start_datapath()
688 efx->net_dev->hw_features |= efx->net_dev->features; in efx_start_datapath()
689 efx->net_dev->hw_features &= ~efx->fixed_features; in efx_start_datapath()
690 efx->net_dev->features |= efx->fixed_features; in efx_start_datapath()
691 if (efx->net_dev->features != old_features) in efx_start_datapath()
692 netdev_features_change(efx->net_dev); in efx_start_datapath()
728 if (netif_device_present(efx->net_dev)) in efx_start_datapath()
729 netif_tx_wake_all_queues(efx->net_dev); in efx_start_datapath()
765 netif_err(efx, drv, efx->net_dev, "failed to flush queues\n"); in efx_stop_datapath()
767 netif_dbg(efx, drv, efx->net_dev, in efx_stop_datapath()
784 netif_dbg(channel->efx, drv, channel->efx->net_dev, in efx_remove_channel()
892 netif_err(efx, drv, efx->net_dev, in efx_realloc_channels()
961 if (!netif_running(efx->net_dev)) in efx_link_status_changed()
964 if (link_state->up != netif_carrier_ok(efx->net_dev)) { in efx_link_status_changed()
968 netif_carrier_on(efx->net_dev); in efx_link_status_changed()
970 netif_carrier_off(efx->net_dev); in efx_link_status_changed()
975 netif_info(efx, link, efx->net_dev, in efx_link_status_changed()
978 efx->net_dev->mtu); in efx_link_status_changed()
980 netif_info(efx, link, efx->net_dev, "link down\n"); in efx_link_status_changed()
1095 netif_dbg(efx, probe, efx->net_dev, "create port\n"); in efx_probe_port()
1106 ether_addr_copy(efx->net_dev->dev_addr, efx->net_dev->perm_addr); in efx_probe_port()
1115 netif_dbg(efx, drv, efx->net_dev, "init port\n"); in efx_init_port()
1146 netif_dbg(efx, ifup, efx->net_dev, "start port\n"); in efx_start_port()
1165 netif_dbg(efx, ifdown, efx->net_dev, "stop port\n"); in efx_stop_port()
1174 netif_addr_lock_bh(efx->net_dev); in efx_stop_port()
1175 netif_addr_unlock_bh(efx->net_dev); in efx_stop_port()
1184 netif_dbg(efx, drv, efx->net_dev, "shut down port\n"); in efx_fini_port()
1198 netif_dbg(efx, drv, efx->net_dev, "destroying port\n"); in efx_remove_port()
1226 netif_dbg(efx, probe, efx->net_dev, "adding to primary list\n"); in efx_associate()
1233 netif_dbg(other, probe, other->net_dev, in efx_associate()
1236 efx->net_dev->name); in efx_associate()
1247 netif_dbg(efx, probe, efx->net_dev, in efx_associate()
1250 other->net_dev->name); in efx_associate()
1258 netif_dbg(efx, probe, efx->net_dev, in efx_associate()
1273 netif_dbg(other, probe, other->net_dev, in efx_dissociate()
1288 netif_dbg(efx, probe, efx->net_dev, "initialising I/O\n"); in efx_init_io()
1294 netif_err(efx, probe, efx->net_dev, in efx_init_io()
1312 netif_err(efx, probe, efx->net_dev, in efx_init_io()
1316 netif_dbg(efx, probe, efx->net_dev, in efx_init_io()
1322 netif_err(efx, probe, efx->net_dev, in efx_init_io()
1329 netif_err(efx, probe, efx->net_dev, in efx_init_io()
1335 netif_dbg(efx, probe, efx->net_dev, in efx_init_io()
1356 netif_dbg(efx, drv, efx->net_dev, "shutting down I/O\n"); in efx_fini_io()
1394 netif_warn(efx, probe, efx->net_dev, in efx_wanted_parallelism()
1412 netif_cond_dbg(efx, probe, efx->net_dev, !rss_cpus, warn, in efx_wanted_parallelism()
1425 netif_warn(efx, probe, efx->net_dev, in efx_wanted_parallelism()
1467 netif_err(efx, drv, efx->net_dev, in efx_probe_interrupts()
1474 netif_err(efx, drv, efx->net_dev, in efx_probe_interrupts()
1477 netif_err(efx, drv, efx->net_dev, in efx_probe_interrupts()
1513 netif_err(efx, drv, efx->net_dev, in efx_probe_interrupts()
1756 netif_dbg(efx, probe, efx->net_dev, "creating NIC\n"); in efx_probe_nic()
1765 netif_err(efx, drv, efx->net_dev, in efx_probe_nic()
1797 netif_set_real_num_tx_queues(efx->net_dev, efx->n_tx_channels); in efx_probe_nic()
1798 netif_set_real_num_rx_queues(efx->net_dev, efx->n_rx_channels); in efx_probe_nic()
1816 netif_dbg(efx, drv, efx->net_dev, "destroying NIC\n"); in efx_remove_nic()
1896 netif_err(efx, probe, efx->net_dev, "failed to create NIC\n"); in efx_probe_all()
1902 netif_err(efx, probe, efx->net_dev, "failed to create port\n"); in efx_probe_all()
1916 netif_warn(efx, probe, efx->net_dev, in efx_probe_all()
1923 netif_err(efx, probe, efx->net_dev, in efx_probe_all()
1962 if (efx->port_enabled || !netif_running(efx->net_dev) || in efx_start_all()
2016 WARN_ON(netif_running(efx->net_dev) && in efx_stop_all()
2017 netif_device_present(efx->net_dev)); in efx_stop_all()
2018 netif_tx_disable(efx->net_dev); in efx_stop_all()
2073 netif_err(efx, drv, efx->net_dev, "Channels are shared. " in efx_init_irq_moderation()
2122 netif_vdbg(efx, timer, efx->net_dev, in efx_monitor()
2149 static int efx_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd) in efx_ioctl() argument
2151 struct efx_nic *efx = netdev_priv(net_dev); in efx_ioctl()
2177 channel->napi_dev = efx->net_dev; in efx_init_napi_channel()
2213 int efx_net_open(struct net_device *net_dev) in efx_net_open() argument
2215 struct efx_nic *efx = netdev_priv(net_dev); in efx_net_open()
2218 netif_dbg(efx, ifup, efx->net_dev, "opening device on CPU %d\n", in efx_net_open()
2235 netif_device_detach(efx->net_dev); in efx_net_open()
2244 int efx_net_stop(struct net_device *net_dev) in efx_net_stop() argument
2246 struct efx_nic *efx = netdev_priv(net_dev); in efx_net_stop()
2248 netif_dbg(efx, ifdown, efx->net_dev, "closing on CPU %d\n", in efx_net_stop()
2258 static void efx_net_stats(struct net_device *net_dev, in efx_net_stats() argument
2261 struct efx_nic *efx = netdev_priv(net_dev); in efx_net_stats()
2269 static void efx_watchdog(struct net_device *net_dev) in efx_watchdog() argument
2271 struct efx_nic *efx = netdev_priv(net_dev); in efx_watchdog()
2273 netif_err(efx, tx_err, efx->net_dev, in efx_watchdog()
2282 static int efx_change_mtu(struct net_device *net_dev, int new_mtu) in efx_change_mtu() argument
2284 struct efx_nic *efx = netdev_priv(net_dev); in efx_change_mtu()
2291 netif_dbg(efx, drv, efx->net_dev, "changing MTU to %d\n", new_mtu); in efx_change_mtu()
2297 net_dev->mtu = new_mtu; in efx_change_mtu()
2306 static int efx_set_mac_address(struct net_device *net_dev, void *data) in efx_set_mac_address() argument
2308 struct efx_nic *efx = netdev_priv(net_dev); in efx_set_mac_address()
2315 netif_err(efx, drv, efx->net_dev, in efx_set_mac_address()
2322 ether_addr_copy(old_addr, net_dev->dev_addr); in efx_set_mac_address()
2323 ether_addr_copy(net_dev->dev_addr, new_addr); in efx_set_mac_address()
2327 ether_addr_copy(net_dev->dev_addr, old_addr); in efx_set_mac_address()
2341 static void efx_set_rx_mode(struct net_device *net_dev) in efx_set_rx_mode() argument
2343 struct efx_nic *efx = netdev_priv(net_dev); in efx_set_rx_mode()
2350 static int efx_set_features(struct net_device *net_dev, netdev_features_t data) in efx_set_features() argument
2352 struct efx_nic *efx = netdev_priv(net_dev); in efx_set_features()
2356 if (net_dev->features & ~data & NETIF_F_NTUPLE) { in efx_set_features()
2365 if ((net_dev->features ^ data) & (NETIF_F_HW_VLAN_CTAG_FILTER | in efx_set_features()
2370 efx_set_rx_mode(net_dev); in efx_set_features()
2376 static int efx_get_phys_port_id(struct net_device *net_dev, in efx_get_phys_port_id() argument
2379 struct efx_nic *efx = netdev_priv(net_dev); in efx_get_phys_port_id()
2387 static int efx_get_phys_port_name(struct net_device *net_dev, in efx_get_phys_port_name() argument
2390 struct efx_nic *efx = netdev_priv(net_dev); in efx_get_phys_port_name()
2397 static int efx_vlan_rx_add_vid(struct net_device *net_dev, __be16 proto, u16 vid) in efx_vlan_rx_add_vid() argument
2399 struct efx_nic *efx = netdev_priv(net_dev); in efx_vlan_rx_add_vid()
2407 static int efx_vlan_rx_kill_vid(struct net_device *net_dev, __be16 proto, u16 vid) in efx_vlan_rx_kill_vid() argument
2409 struct efx_nic *efx = netdev_priv(net_dev); in efx_vlan_rx_kill_vid()
2496 strcpy(efx->name, efx->net_dev->name); in efx_update_name()
2504 struct net_device *net_dev = netdev_notifier_info_to_dev(ptr); in efx_netdev_event() local
2506 if ((net_dev->netdev_ops == &efx_netdev_ops) && in efx_netdev_event()
2508 efx_update_name(netdev_priv(net_dev)); in efx_netdev_event()
2549 struct net_device *net_dev = efx->net_dev; in efx_register_netdev() local
2553 net_dev->watchdog_timeo = 5 * HZ; in efx_register_netdev()
2554 net_dev->irq = efx->pci_dev->irq; in efx_register_netdev()
2555 net_dev->netdev_ops = &efx_netdev_ops; in efx_register_netdev()
2557 net_dev->priv_flags |= IFF_UNICAST_FLT; in efx_register_netdev()
2558 net_dev->ethtool_ops = &efx_ethtool_ops; in efx_register_netdev()
2559 net_dev->gso_max_segs = EFX_TSO_MAX_SEGS; in efx_register_netdev()
2560 net_dev->min_mtu = EFX_MIN_MTU; in efx_register_netdev()
2561 net_dev->max_mtu = EFX_MAX_MTU; in efx_register_netdev()
2572 netif_err(efx, probe, efx->net_dev, in efx_register_netdev()
2578 rc = dev_alloc_name(net_dev, net_dev->name); in efx_register_netdev()
2584 netif_carrier_off(net_dev); in efx_register_netdev()
2586 rc = register_netdevice(net_dev); in efx_register_netdev()
2602 netif_err(efx, drv, efx->net_dev, in efx_register_netdev()
2609 netif_err(efx, drv, efx->net_dev, in efx_register_netdev()
2624 unregister_netdevice(net_dev); in efx_register_netdev()
2628 netif_err(efx, drv, efx->net_dev, "could not register net dev\n"); in efx_register_netdev()
2634 if (!efx->net_dev) in efx_unregister_netdev()
2637 BUG_ON(netdev_priv(efx->net_dev) != efx); in efx_unregister_netdev()
2645 unregister_netdev(efx->net_dev); in efx_unregister_netdev()
2693 netif_err(efx, drv, efx->net_dev, "failed to initialise NIC\n"); in efx_reset_up()
2707 netif_err(efx, drv, efx->net_dev, in efx_reset_up()
2718 netif_warn(efx, probe, efx->net_dev, in efx_reset_up()
2760 netif_info(efx, drv, efx->net_dev, "resetting (%s)\n", in efx_reset()
2768 netif_err(efx, drv, efx->net_dev, "failed to reset hardware\n"); in efx_reset()
2799 dev_close(efx->net_dev); in efx_reset()
2800 netif_err(efx, drv, efx->net_dev, "has been disabled\n"); in efx_reset()
2803 netif_dbg(efx, drv, efx->net_dev, "reset complete\n"); in efx_reset()
2843 netif_err(efx, drv, efx->net_dev, "Warning: No MC reboot after BIST mode\n"); in efx_wait_for_bist_end()
2891 netif_dbg(efx, drv, efx->net_dev, in efx_schedule_reset()
2908 netif_dbg(efx, drv, efx->net_dev, "scheduling %s reset\n", in efx_schedule_reset()
2913 netif_dbg(efx, drv, efx->net_dev, in efx_schedule_reset()
3003 struct pci_dev *pci_dev, struct net_device *net_dev) in efx_init_struct() argument
3022 efx->net_dev = net_dev; in efx_init_struct()
3045 efx->mdio.dev = net_dev; in efx_init_struct()
3344 dev_close(efx->net_dev); in efx_pci_remove()
3359 netif_dbg(efx, drv, efx->net_dev, "shutdown successful\n"); in efx_pci_remove()
3362 free_netdev(efx->net_dev); in efx_pci_remove()
3383 netif_err(efx, drv, efx->net_dev, "Unable to read VPD\n"); in efx_probe_vpd_strings()
3390 netif_err(efx, drv, efx->net_dev, "VPD Read-only not found\n"); in efx_probe_vpd_strings()
3403 netif_err(efx, drv, efx->net_dev, "Part number not found\n"); in efx_probe_vpd_strings()
3410 netif_err(efx, drv, efx->net_dev, "Incomplete part number\n"); in efx_probe_vpd_strings()
3414 netif_info(efx, drv, efx->net_dev, in efx_probe_vpd_strings()
3421 netif_err(efx, drv, efx->net_dev, "Serial number not found\n"); in efx_probe_vpd_strings()
3428 netif_err(efx, drv, efx->net_dev, "Incomplete serial number\n"); in efx_probe_vpd_strings()
3458 netif_err(efx, probe, efx->net_dev, in efx_pci_probe_main()
3465 netif_err(efx, probe, efx->net_dev, in efx_pci_probe_main()
3497 struct net_device *net_dev = efx->net_dev; in efx_pci_probe_post_io() local
3506 netif_err(efx, probe, efx->net_dev, in efx_pci_probe_post_io()
3511 net_dev->features |= (efx->type->offload_features | NETIF_F_SG | in efx_pci_probe_post_io()
3514 net_dev->features |= NETIF_F_TSO6; in efx_pci_probe_post_io()
3517 net_dev->features &= ~NETIF_F_ALL_TSO; in efx_pci_probe_post_io()
3519 net_dev->vlan_features |= (NETIF_F_HW_CSUM | NETIF_F_SG | in efx_pci_probe_post_io()
3523 net_dev->hw_features |= net_dev->features & ~efx->fixed_features; in efx_pci_probe_post_io()
3526 net_dev->features &= ~NETIF_F_RXALL; in efx_pci_probe_post_io()
3532 net_dev->features &= ~NETIF_F_HW_VLAN_CTAG_FILTER; in efx_pci_probe_post_io()
3533 net_dev->features |= efx->fixed_features; in efx_pci_probe_post_io()
3555 struct net_device *net_dev; in efx_pci_probe() local
3560 net_dev = alloc_etherdev_mqs(sizeof(*efx), EFX_MAX_CORE_TX_QUEUES, in efx_pci_probe()
3562 if (!net_dev) in efx_pci_probe()
3564 efx = netdev_priv(net_dev); in efx_pci_probe()
3569 SET_NETDEV_DEV(net_dev, &pci_dev->dev); in efx_pci_probe()
3570 rc = efx_init_struct(efx, pci_dev, net_dev); in efx_pci_probe()
3574 netif_info(efx, probe, efx->net_dev, in efx_pci_probe()
3607 netif_dbg(efx, probe, efx->net_dev, "initialisation successful\n"); in efx_pci_probe()
3614 netif_warn(efx, probe, efx->net_dev, in efx_pci_probe()
3630 netif_dbg(efx, drv, efx->net_dev, "initialisation failed. rc=%d\n", rc); in efx_pci_probe()
3631 free_netdev(net_dev); in efx_pci_probe()
3819 netif_err(efx, hw, efx->net_dev, in efx_io_slot_reset()
3840 netif_err(efx, hw, efx->net_dev, in efx_io_resume()
3844 netif_dbg(efx, hw, efx->net_dev, in efx_io_resume()