.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /**************************************************************************** |
---|
2 | 3 | * Driver for Solarflare network controllers and boards |
---|
3 | 4 | * Copyright 2005-2006 Fen Systems Ltd. |
---|
4 | 5 | * Copyright 2006-2013 Solarflare Communications Inc. |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify it |
---|
7 | | - * under the terms of the GNU General Public License version 2 as published |
---|
8 | | - * by the Free Software Foundation, incorporated herein by reference. |
---|
9 | 6 | */ |
---|
10 | 7 | |
---|
11 | 8 | #include <linux/bitops.h> |
---|
.. | .. |
---|
17 | 14 | #include "net_driver.h" |
---|
18 | 15 | #include "bitfield.h" |
---|
19 | 16 | #include "efx.h" |
---|
| 17 | +#include "efx_common.h" |
---|
20 | 18 | #include "nic.h" |
---|
21 | 19 | #include "farch_regs.h" |
---|
22 | 20 | #include "io.h" |
---|
23 | 21 | #include "workarounds.h" |
---|
24 | 22 | #include "mcdi.h" |
---|
25 | 23 | #include "mcdi_pcol.h" |
---|
| 24 | +#include "mcdi_port.h" |
---|
| 25 | +#include "mcdi_port_common.h" |
---|
26 | 26 | #include "selftest.h" |
---|
27 | 27 | #include "siena_sriov.h" |
---|
28 | 28 | |
---|
.. | .. |
---|
277 | 277 | } |
---|
278 | 278 | |
---|
279 | 279 | efx->max_channels = EFX_MAX_CHANNELS; |
---|
| 280 | + efx->max_vis = EFX_MAX_CHANNELS; |
---|
280 | 281 | efx->max_tx_channels = EFX_MAX_CHANNELS; |
---|
| 282 | + efx->tx_queues_per_channel = 4; |
---|
281 | 283 | |
---|
282 | 284 | efx_reado(efx, ®, FR_AZ_CS_DEBUG); |
---|
283 | 285 | efx->port_num = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1; |
---|
.. | .. |
---|
632 | 634 | return SIENA_STAT_COUNT; |
---|
633 | 635 | } |
---|
634 | 636 | |
---|
635 | | -static int siena_mac_reconfigure(struct efx_nic *efx) |
---|
| 637 | +static int siena_mac_reconfigure(struct efx_nic *efx, bool mtu_only __always_unused) |
---|
636 | 638 | { |
---|
637 | 639 | MCDI_DECLARE_BUF(inbuf, MC_CMD_SET_MCAST_HASH_IN_LEN); |
---|
638 | 640 | int rc; |
---|
.. | .. |
---|
949 | 951 | |
---|
950 | 952 | #endif /* CONFIG_SFC_MTD */ |
---|
951 | 953 | |
---|
| 954 | +static unsigned int siena_check_caps(const struct efx_nic *efx, |
---|
| 955 | + u8 flag, u32 offset) |
---|
| 956 | +{ |
---|
| 957 | + /* Siena did not support MC_CMD_GET_CAPABILITIES */ |
---|
| 958 | + return 0; |
---|
| 959 | +} |
---|
| 960 | + |
---|
952 | 961 | /************************************************************************** |
---|
953 | 962 | * |
---|
954 | 963 | * Revision-dependent attributes used by efx.c and nic.c |
---|
.. | .. |
---|
985 | 994 | .start_stats = efx_mcdi_mac_start_stats, |
---|
986 | 995 | .pull_stats = efx_mcdi_mac_pull_stats, |
---|
987 | 996 | .stop_stats = efx_mcdi_mac_stop_stats, |
---|
988 | | - .set_id_led = efx_mcdi_set_id_led, |
---|
989 | 997 | .push_irq_moderation = siena_push_irq_moderation, |
---|
990 | 998 | .reconfigure_mac = siena_mac_reconfigure, |
---|
991 | 999 | .check_mac_fault = efx_mcdi_mac_check_fault, |
---|
.. | .. |
---|
1009 | 1017 | .tx_remove = efx_farch_tx_remove, |
---|
1010 | 1018 | .tx_write = efx_farch_tx_write, |
---|
1011 | 1019 | .tx_limit_len = efx_farch_tx_limit_len, |
---|
| 1020 | + .tx_enqueue = __efx_enqueue_skb, |
---|
1012 | 1021 | .rx_push_rss_config = siena_rx_push_rss_config, |
---|
1013 | 1022 | .rx_pull_rss_config = siena_rx_pull_rss_config, |
---|
1014 | 1023 | .rx_probe = efx_farch_rx_probe, |
---|
.. | .. |
---|
1016 | 1025 | .rx_remove = efx_farch_rx_remove, |
---|
1017 | 1026 | .rx_write = efx_farch_rx_write, |
---|
1018 | 1027 | .rx_defer_refill = efx_farch_rx_defer_refill, |
---|
| 1028 | + .rx_packet = __efx_rx_packet, |
---|
1019 | 1029 | .ev_probe = efx_farch_ev_probe, |
---|
1020 | 1030 | .ev_init = efx_farch_ev_init, |
---|
1021 | 1031 | .ev_fini = efx_farch_ev_fini, |
---|
.. | .. |
---|
1077 | 1087 | .can_rx_scatter = true, |
---|
1078 | 1088 | .option_descriptors = false, |
---|
1079 | 1089 | .min_interrupt_mode = EFX_INT_MODE_LEGACY, |
---|
1080 | | - .max_interrupt_mode = EFX_INT_MODE_MSIX, |
---|
1081 | 1090 | .timer_period_max = 1 << FRF_CZ_TC_TIMER_VAL_WIDTH, |
---|
1082 | 1091 | .offload_features = (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | |
---|
1083 | 1092 | NETIF_F_RXHASH | NETIF_F_NTUPLE), |
---|
.. | .. |
---|
1087 | 1096 | 1 << HWTSTAMP_FILTER_PTP_V1_L4_EVENT | |
---|
1088 | 1097 | 1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT), |
---|
1089 | 1098 | .rx_hash_key_size = 16, |
---|
| 1099 | + .check_caps = siena_check_caps, |
---|
| 1100 | + .sensor_event = efx_mcdi_sensor_event, |
---|
1090 | 1101 | }; |
---|