Skip to content

Commit c4b8306

Browse files
committed
Merge branch 'sfc-driver-for-EF100-family-NICs-part-2'
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2 parents 215602a + d61592a commit c4b8306

File tree

10 files changed

+1255
-12
lines changed

10 files changed

+1255
-12
lines changed

drivers/net/ethernet/sfc/ef100.c

+2
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,8 @@ static int ef100_pci_probe(struct pci_dev *pci_dev,
527527
static const struct pci_device_id ef100_pci_table[] = {
528528
{PCI_DEVICE(PCI_VENDOR_ID_XILINX, 0x0100), /* Riverhead PF */
529529
.driver_data = (unsigned long) &ef100_pf_nic_type },
530+
{PCI_DEVICE(PCI_VENDOR_ID_XILINX, 0x1100), /* Riverhead VF */
531+
.driver_data = (unsigned long) &ef100_vf_nic_type },
530532
{0} /* end of list */
531533
};
532534

drivers/net/ethernet/sfc/ef100_netdev.c

+16
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ static int ef100_net_stop(struct net_device *net_dev)
8686

8787
netif_stop_queue(net_dev);
8888
efx_stop_all(efx);
89+
efx_mcdi_mac_fini_stats(efx);
8990
efx_disable_interrupts(efx);
9091
efx_clear_interrupt_affinity(efx);
9192
efx_nic_fini_interrupt(efx);
93+
efx_remove_filters(efx);
9294
efx_fini_napi(efx);
9395
efx_remove_channels(efx);
9496
efx_mcdi_free_vis(efx);
@@ -138,6 +140,10 @@ static int ef100_net_open(struct net_device *net_dev)
138140

139141
efx_init_napi(efx);
140142

143+
rc = efx_probe_filters(efx);
144+
if (rc)
145+
goto fail;
146+
141147
rc = efx_nic_init_interrupt(efx);
142148
if (rc)
143149
goto fail;
@@ -152,6 +158,10 @@ static int ef100_net_open(struct net_device *net_dev)
152158
*/
153159
(void) efx_mcdi_poll_reboot(efx);
154160

161+
rc = efx_mcdi_mac_init_stats(efx);
162+
if (rc)
163+
goto fail;
164+
155165
efx_start_all(efx);
156166

157167
/* Link state detection is normally event-driven; we have
@@ -207,8 +217,14 @@ static const struct net_device_ops ef100_netdev_ops = {
207217
.ndo_open = ef100_net_open,
208218
.ndo_stop = ef100_net_stop,
209219
.ndo_start_xmit = ef100_hard_start_xmit,
220+
.ndo_get_stats64 = efx_net_stats,
221+
.ndo_validate_addr = eth_validate_addr,
222+
.ndo_set_rx_mode = efx_set_rx_mode, /* Lookout */
210223
.ndo_get_phys_port_id = efx_get_phys_port_id,
211224
.ndo_get_phys_port_name = efx_get_phys_port_name,
225+
#ifdef CONFIG_RFS_ACCEL
226+
.ndo_rx_flow_steer = efx_filter_rfs,
227+
#endif
212228
};
213229

214230
/* Netdev registration

0 commit comments

Comments
 (0)