.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2003 - 2009 NetXen, Inc. |
---|
3 | 4 | * Copyright (C) 2009 - QLogic Corporation. |
---|
4 | 5 | * 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 | | - * |
---|
22 | 6 | */ |
---|
23 | 7 | |
---|
24 | 8 | #include <linux/types.h> |
---|
.. | .. |
---|
169 | 153 | case NETXEN_BRDTYPE_P3_4_GB_MM: |
---|
170 | 154 | supported |= SUPPORTED_Autoneg; |
---|
171 | 155 | advertising |= ADVERTISED_Autoneg; |
---|
172 | | - /* fall through */ |
---|
| 156 | + fallthrough; |
---|
173 | 157 | case NETXEN_BRDTYPE_P2_SB31_10G_CX4: |
---|
174 | 158 | case NETXEN_BRDTYPE_P3_10G_CX4: |
---|
175 | 159 | case NETXEN_BRDTYPE_P3_10G_CX4_LP: |
---|
.. | .. |
---|
198 | 182 | supported |= SUPPORTED_TP; |
---|
199 | 183 | check_sfp_module = netif_running(dev) && |
---|
200 | 184 | adapter->has_link_events; |
---|
201 | | - /* fall through */ |
---|
| 185 | + fallthrough; |
---|
202 | 186 | case NETXEN_BRDTYPE_P2_SB31_10G: |
---|
203 | 187 | case NETXEN_BRDTYPE_P3_10G_XFP: |
---|
204 | 188 | supported |= SUPPORTED_FIBRE; |
---|
.. | .. |
---|
764 | 748 | if (ethcoal->rx_coalesce_usecs > 0xffff || |
---|
765 | 749 | ethcoal->rx_max_coalesced_frames > 0xffff || |
---|
766 | 750 | 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) |
---|
785 | 752 | return -EINVAL; |
---|
786 | 753 | |
---|
787 | 754 | if (!ethcoal->rx_coalesce_usecs || |
---|
.. | .. |
---|
846 | 813 | dump->version = adapter->fw_version; |
---|
847 | 814 | return 0; |
---|
848 | 815 | } |
---|
| 816 | + |
---|
| 817 | +/* Fw dump levels */ |
---|
| 818 | +static const u32 FW_DUMP_LEVELS[] = { 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff }; |
---|
849 | 819 | |
---|
850 | 820 | static int |
---|
851 | 821 | netxen_set_dump(struct net_device *netdev, struct ethtool_dump *val) |
---|
.. | .. |
---|
939 | 909 | } |
---|
940 | 910 | |
---|
941 | 911 | const struct ethtool_ops netxen_nic_ethtool_ops = { |
---|
| 912 | + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | |
---|
| 913 | + ETHTOOL_COALESCE_MAX_FRAMES, |
---|
942 | 914 | .get_drvinfo = netxen_nic_get_drvinfo, |
---|
943 | 915 | .get_regs_len = netxen_nic_get_regs_len, |
---|
944 | 916 | .get_regs = netxen_nic_get_regs, |
---|