Lines Matching refs:efx

26 static void ef100_update_name(struct efx_nic *efx)
28 strcpy(efx->name, efx->net_dev->name);
31 static int ef100_alloc_vis(struct efx_nic *efx, unsigned int *allocated_vis)
37 unsigned int tx_vis = efx->n_tx_channels + efx->n_extra_tx_channels;
38 unsigned int rx_vis = efx->n_rx_channels;
41 EFX_WARN_ON_PARANOID(efx->tx_queues_per_channel != 1);
43 tx_vis += efx->n_xdp_channels * efx->xdp_tx_per_channel;
51 return efx_mcdi_alloc_vis(efx, min_vis, max_vis,
55 static int ef100_remap_bar(struct efx_nic *efx, int max_vis)
60 efx->max_vis = max_vis;
61 uc_mem_map_size = PAGE_ALIGN(max_vis * efx->vi_stride);
64 membase = ioremap(efx->membase_phys, uc_mem_map_size);
66 netif_err(efx, probe, efx->net_dev,
71 iounmap(efx->membase);
72 efx->membase = membase;
82 struct efx_nic *efx = netdev_priv(net_dev);
84 netif_dbg(efx, ifdown, efx->net_dev, "closing on CPU %d\n",
88 efx_stop_all(efx);
89 efx_mcdi_mac_fini_stats(efx);
90 efx_disable_interrupts(efx);
91 efx_clear_interrupt_affinity(efx);
92 efx_nic_fini_interrupt(efx);
93 efx_remove_filters(efx);
94 efx_fini_napi(efx);
95 efx_remove_channels(efx);
96 efx_mcdi_free_vis(efx);
97 efx_remove_interrupts(efx);
99 efx->state = STATE_NET_DOWN;
107 struct efx_nic *efx = netdev_priv(net_dev);
111 ef100_update_name(efx);
112 netif_dbg(efx, ifup, net_dev, "opening device on CPU %d\n",
115 rc = efx_check_disabled(efx);
119 rc = efx_probe_interrupts(efx);
123 rc = efx_set_channels(efx);
127 rc = efx_mcdi_free_vis(efx);
131 rc = ef100_alloc_vis(efx, &allocated_vis);
135 rc = efx_probe_channels(efx);
139 rc = ef100_remap_bar(efx, allocated_vis);
143 efx_init_napi(efx);
145 rc = efx_probe_filters(efx);
149 rc = efx_nic_init_interrupt(efx);
152 efx_set_interrupt_affinity(efx);
154 rc = efx_enable_interrupts(efx);
161 (void) efx_mcdi_poll_reboot(efx);
163 rc = efx_mcdi_mac_init_stats(efx);
167 efx_start_all(efx);
172 mutex_lock(&efx->mac_lock);
173 if (efx_mcdi_phy_poll(efx))
174 efx_link_status_changed(efx);
175 mutex_unlock(&efx->mac_lock);
177 efx->state = STATE_NET_UP;
196 struct efx_nic *efx = netdev_priv(net_dev);
201 channel = efx_get_tx_channel(efx, skb_get_queue_mapping(skb));
202 netif_vdbg(efx, tx_queued, efx->net_dev,
205 if (!efx->n_channels || !efx->n_tx_channels || !channel) {
244 struct efx_nic *efx = container_of(this, struct efx_nic, netdev_notifier);
247 if (netdev_priv(net_dev) == efx && event == NETDEV_CHANGENAME)
248 ef100_update_name(efx);
253 int ef100_register_netdev(struct efx_nic *efx)
255 struct net_device *net_dev = efx->net_dev;
259 net_dev->irq = efx->pci_dev->irq;
270 ef100_update_name(efx);
279 efx->state = STATE_NET_DOWN;
281 efx_init_mcdi_logging(efx);
287 netif_err(efx, drv, efx->net_dev, "could not register net dev\n");
291 void ef100_unregister_netdev(struct efx_nic *efx)
293 if (efx_dev_registered(efx)) {
294 efx_fini_mcdi_logging(efx);
295 efx->state = STATE_UNINIT;
296 unregister_netdev(efx->net_dev);