hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
....@@ -1,24 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2003 - 2009 NetXen, Inc.
34 * Copyright (C) 2009 - QLogic Corporation.
45 * All rights reserved.
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * as published by the Free Software Foundation; either version 2
9
- * of the License, or (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful, but
12
- * WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
18
- *
19
- * The full GNU General Public License is included in this distribution
20
- * in the file called "COPYING".
21
- *
226 */
237
248 #include <linux/types.h>
....@@ -169,7 +153,7 @@
169153 case NETXEN_BRDTYPE_P3_4_GB_MM:
170154 supported |= SUPPORTED_Autoneg;
171155 advertising |= ADVERTISED_Autoneg;
172
- /* fall through */
156
+ fallthrough;
173157 case NETXEN_BRDTYPE_P2_SB31_10G_CX4:
174158 case NETXEN_BRDTYPE_P3_10G_CX4:
175159 case NETXEN_BRDTYPE_P3_10G_CX4_LP:
....@@ -198,7 +182,7 @@
198182 supported |= SUPPORTED_TP;
199183 check_sfp_module = netif_running(dev) &&
200184 adapter->has_link_events;
201
- /* fall through */
185
+ fallthrough;
202186 case NETXEN_BRDTYPE_P2_SB31_10G:
203187 case NETXEN_BRDTYPE_P3_10G_XFP:
204188 supported |= SUPPORTED_FIBRE;
....@@ -764,24 +748,7 @@
764748 if (ethcoal->rx_coalesce_usecs > 0xffff ||
765749 ethcoal->rx_max_coalesced_frames > 0xffff ||
766750 ethcoal->tx_coalesce_usecs > 0xffff ||
767
- ethcoal->tx_max_coalesced_frames > 0xffff ||
768
- ethcoal->rx_coalesce_usecs_irq ||
769
- ethcoal->rx_max_coalesced_frames_irq ||
770
- ethcoal->tx_coalesce_usecs_irq ||
771
- ethcoal->tx_max_coalesced_frames_irq ||
772
- ethcoal->stats_block_coalesce_usecs ||
773
- ethcoal->use_adaptive_rx_coalesce ||
774
- ethcoal->use_adaptive_tx_coalesce ||
775
- ethcoal->pkt_rate_low ||
776
- ethcoal->rx_coalesce_usecs_low ||
777
- ethcoal->rx_max_coalesced_frames_low ||
778
- ethcoal->tx_coalesce_usecs_low ||
779
- ethcoal->tx_max_coalesced_frames_low ||
780
- ethcoal->pkt_rate_high ||
781
- ethcoal->rx_coalesce_usecs_high ||
782
- ethcoal->rx_max_coalesced_frames_high ||
783
- ethcoal->tx_coalesce_usecs_high ||
784
- ethcoal->tx_max_coalesced_frames_high)
751
+ ethcoal->tx_max_coalesced_frames > 0xffff)
785752 return -EINVAL;
786753
787754 if (!ethcoal->rx_coalesce_usecs ||
....@@ -846,6 +813,9 @@
846813 dump->version = adapter->fw_version;
847814 return 0;
848815 }
816
+
817
+/* Fw dump levels */
818
+static const u32 FW_DUMP_LEVELS[] = { 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff };
849819
850820 static int
851821 netxen_set_dump(struct net_device *netdev, struct ethtool_dump *val)
....@@ -939,6 +909,8 @@
939909 }
940910
941911 const struct ethtool_ops netxen_nic_ethtool_ops = {
912
+ .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
913
+ ETHTOOL_COALESCE_MAX_FRAMES,
942914 .get_drvinfo = netxen_nic_get_drvinfo,
943915 .get_regs_len = netxen_nic_get_regs_len,
944916 .get_regs = netxen_nic_get_regs,