forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/net/ethernet/sfc/falcon/ethtool.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/netdevice.h>
....@@ -517,7 +514,7 @@
517514 /* We need rx buffers and interrupts. */
518515 already_up = (efx->net_dev->flags & IFF_UP);
519516 if (!already_up) {
520
- rc = dev_open(efx->net_dev);
517
+ rc = dev_open(efx->net_dev, NULL);
521518 if (rc) {
522519 netif_err(efx, drv, efx->net_dev,
523520 "failed opening device.\n");
....@@ -605,9 +602,6 @@
605602 unsigned int tx_usecs, rx_usecs;
606603 bool adaptive, rx_may_override_tx;
607604 int rc;
608
-
609
- if (coalesce->use_adaptive_tx_coalesce)
610
- return -EINVAL;
611605
612606 ef4_get_irq_moderation(efx, &tx_usecs, &rx_usecs, &adaptive);
613607
....@@ -963,7 +957,7 @@
963957 switch (info->flow_type) {
964958 case TCP_V4_FLOW:
965959 info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
966
- /* Fall through */
960
+ fallthrough;
967961 case UDP_V4_FLOW:
968962 case SCTP_V4_FLOW:
969963 case AH_ESP_V4_FLOW:
....@@ -1314,6 +1308,9 @@
13141308 }
13151309
13161310 const struct ethtool_ops ef4_ethtool_ops = {
1311
+ .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
1312
+ ETHTOOL_COALESCE_USECS_IRQ |
1313
+ ETHTOOL_COALESCE_USE_ADAPTIVE_RX,
13171314 .get_drvinfo = ef4_ethtool_get_drvinfo,
13181315 .get_regs_len = ef4_ethtool_get_regs_len,
13191316 .get_regs = ef4_ethtool_get_regs,