static void wxvf_up_complete(struct wx *wx)
{
wx_configure_msix_vf(wx);
+ smp_mb__before_atomic();
+ wx_napi_enable_all(wx);
/* clear any pending interrupts, may auto mask */
wr32(wx, WX_VXICR, U32_MAX);
wxvf_irq_enable(wx);
+ /* enable transmits */
+ netif_tx_start_all_queues(wx->netdev);
}
int wxvf_open(struct net_device *netdev)
struct wx *wx = netdev_priv(netdev);
int err;
- err = wx_request_msix_irqs_vf(wx);
+ err = wx_setup_resources(wx);
if (err)
goto err_reset;
+ wx_configure_vf(wx);
+
+ err = wx_request_msix_irqs_vf(wx);
+ if (err)
+ goto err_free_resources;
+
+ /* Notify the stack of the actual queue counts. */
+ err = netif_set_real_num_tx_queues(netdev, wx->num_tx_queues);
+ if (err)
+ goto err_free_irq;
+
+ err = netif_set_real_num_rx_queues(netdev, wx->num_rx_queues);
+ if (err)
+ goto err_free_irq;
wxvf_up_complete(wx);
return 0;
+err_free_irq:
+ wx_free_irq(wx);
+err_free_resources:
+ wx_free_resources(wx);
err_reset:
wx_reset_vf(wx);
return err;
wxvf_down(wx);
wx_free_irq(wx);
+ wx_free_resources(wx);
return 0;
}
static const struct net_device_ops txgbevf_netdev_ops = {
.ndo_open = wxvf_open,
.ndo_stop = wxvf_close,
+ .ndo_start_xmit = wx_xmit_frame,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = wx_set_mac_vf,
};
goto err_register;
pci_set_drvdata(pdev, wx);
+ netif_tx_stop_all_queues(netdev);
return 0;