Skip to content

Commit

Permalink
Merge branch 'sfc-driver-for-EF100-family-NICs-part-2'
Browse files Browse the repository at this point in the history
Edward Cree says:

====================
sfc: driver for EF100 family NICs, part 2

This series implements the data path and various other functionality
 for Xilinx/Solarflare EF100 NICs.

Changed from v2:
 * Improved error handling of design params (patch #3)
 * Removed 'inline' from .c file in patch #4
 * Don't report common stats to ethtool -S (patch #8)

Changed from v1:
 * Fixed build errors on CONFIG_RFS_ACCEL=n (patch #5) and 32-bit
   (patch #8)
 * Dropped patch #10 (ethtool ops) as it's buggy and will need a
   bigger rework to fix.
====================

Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
davem330 committed Aug 4, 2020
2 parents 215602a + d61592a commit c4b8306
Show file tree
Hide file tree
Showing 10 changed files with 1,255 additions and 12 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/sfc/ef100.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ static int ef100_pci_probe(struct pci_dev *pci_dev,
static const struct pci_device_id ef100_pci_table[] = {
{PCI_DEVICE(PCI_VENDOR_ID_XILINX, 0x0100), /* Riverhead PF */
.driver_data = (unsigned long) &ef100_pf_nic_type },
{PCI_DEVICE(PCI_VENDOR_ID_XILINX, 0x1100), /* Riverhead VF */
.driver_data = (unsigned long) &ef100_vf_nic_type },
{0} /* end of list */
};

Expand Down
16 changes: 16 additions & 0 deletions drivers/net/ethernet/sfc/ef100_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ static int ef100_net_stop(struct net_device *net_dev)

netif_stop_queue(net_dev);
efx_stop_all(efx);
efx_mcdi_mac_fini_stats(efx);
efx_disable_interrupts(efx);
efx_clear_interrupt_affinity(efx);
efx_nic_fini_interrupt(efx);
efx_remove_filters(efx);
efx_fini_napi(efx);
efx_remove_channels(efx);
efx_mcdi_free_vis(efx);
Expand Down Expand Up @@ -138,6 +140,10 @@ static int ef100_net_open(struct net_device *net_dev)

efx_init_napi(efx);

rc = efx_probe_filters(efx);
if (rc)
goto fail;

rc = efx_nic_init_interrupt(efx);
if (rc)
goto fail;
Expand All @@ -152,6 +158,10 @@ static int ef100_net_open(struct net_device *net_dev)
*/
(void) efx_mcdi_poll_reboot(efx);

rc = efx_mcdi_mac_init_stats(efx);
if (rc)
goto fail;

efx_start_all(efx);

/* Link state detection is normally event-driven; we have
Expand Down Expand Up @@ -207,8 +217,14 @@ static const struct net_device_ops ef100_netdev_ops = {
.ndo_open = ef100_net_open,
.ndo_stop = ef100_net_stop,
.ndo_start_xmit = ef100_hard_start_xmit,
.ndo_get_stats64 = efx_net_stats,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_rx_mode = efx_set_rx_mode, /* Lookout */
.ndo_get_phys_port_id = efx_get_phys_port_id,
.ndo_get_phys_port_name = efx_get_phys_port_name,
#ifdef CONFIG_RFS_ACCEL
.ndo_rx_flow_steer = efx_filter_rfs,
#endif
};

/* Netdev registration
Expand Down
Loading

0 comments on commit c4b8306

Please sign in to comment.