hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/net/ethernet/sfc/siena.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /****************************************************************************
23 * Driver for Solarflare network controllers and boards
34 * Copyright 2005-2006 Fen Systems Ltd.
45 * 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.
96 */
107
118 #include <linux/bitops.h>
....@@ -17,12 +14,15 @@
1714 #include "net_driver.h"
1815 #include "bitfield.h"
1916 #include "efx.h"
17
+#include "efx_common.h"
2018 #include "nic.h"
2119 #include "farch_regs.h"
2220 #include "io.h"
2321 #include "workarounds.h"
2422 #include "mcdi.h"
2523 #include "mcdi_pcol.h"
24
+#include "mcdi_port.h"
25
+#include "mcdi_port_common.h"
2626 #include "selftest.h"
2727 #include "siena_sriov.h"
2828
....@@ -277,7 +277,9 @@
277277 }
278278
279279 efx->max_channels = EFX_MAX_CHANNELS;
280
+ efx->max_vis = EFX_MAX_CHANNELS;
280281 efx->max_tx_channels = EFX_MAX_CHANNELS;
282
+ efx->tx_queues_per_channel = 4;
281283
282284 efx_reado(efx, &reg, FR_AZ_CS_DEBUG);
283285 efx->port_num = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1;
....@@ -632,7 +634,7 @@
632634 return SIENA_STAT_COUNT;
633635 }
634636
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)
636638 {
637639 MCDI_DECLARE_BUF(inbuf, MC_CMD_SET_MCAST_HASH_IN_LEN);
638640 int rc;
....@@ -949,6 +951,13 @@
949951
950952 #endif /* CONFIG_SFC_MTD */
951953
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
+
952961 /**************************************************************************
953962 *
954963 * Revision-dependent attributes used by efx.c and nic.c
....@@ -985,7 +994,6 @@
985994 .start_stats = efx_mcdi_mac_start_stats,
986995 .pull_stats = efx_mcdi_mac_pull_stats,
987996 .stop_stats = efx_mcdi_mac_stop_stats,
988
- .set_id_led = efx_mcdi_set_id_led,
989997 .push_irq_moderation = siena_push_irq_moderation,
990998 .reconfigure_mac = siena_mac_reconfigure,
991999 .check_mac_fault = efx_mcdi_mac_check_fault,
....@@ -1009,6 +1017,7 @@
10091017 .tx_remove = efx_farch_tx_remove,
10101018 .tx_write = efx_farch_tx_write,
10111019 .tx_limit_len = efx_farch_tx_limit_len,
1020
+ .tx_enqueue = __efx_enqueue_skb,
10121021 .rx_push_rss_config = siena_rx_push_rss_config,
10131022 .rx_pull_rss_config = siena_rx_pull_rss_config,
10141023 .rx_probe = efx_farch_rx_probe,
....@@ -1016,6 +1025,7 @@
10161025 .rx_remove = efx_farch_rx_remove,
10171026 .rx_write = efx_farch_rx_write,
10181027 .rx_defer_refill = efx_farch_rx_defer_refill,
1028
+ .rx_packet = __efx_rx_packet,
10191029 .ev_probe = efx_farch_ev_probe,
10201030 .ev_init = efx_farch_ev_init,
10211031 .ev_fini = efx_farch_ev_fini,
....@@ -1077,7 +1087,6 @@
10771087 .can_rx_scatter = true,
10781088 .option_descriptors = false,
10791089 .min_interrupt_mode = EFX_INT_MODE_LEGACY,
1080
- .max_interrupt_mode = EFX_INT_MODE_MSIX,
10811090 .timer_period_max = 1 << FRF_CZ_TC_TIMER_VAL_WIDTH,
10821091 .offload_features = (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
10831092 NETIF_F_RXHASH | NETIF_F_NTUPLE),
....@@ -1087,4 +1096,6 @@
10871096 1 << HWTSTAMP_FILTER_PTP_V1_L4_EVENT |
10881097 1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT),
10891098 .rx_hash_key_size = 16,
1099
+ .check_caps = siena_check_caps,
1100
+ .sensor_event = efx_mcdi_sensor_event,
10901101 };