forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/net/ethernet/cisco/enic/enic_ethtool.c
....@@ -1,4 +1,4 @@
1
-/**
1
+/*
22 * Copyright 2013 Cisco Systems, Inc. All rights reserved.
33 *
44 * This program is free software; you may redistribute it and/or modify
....@@ -147,7 +147,6 @@
147147 return;
148148
149149 strlcpy(drvinfo->driver, DRV_NAME, sizeof(drvinfo->driver));
150
- strlcpy(drvinfo->version, DRV_VERSION, sizeof(drvinfo->version));
151150 strlcpy(drvinfo->fw_version, fw_info->fw_version,
152151 sizeof(drvinfo->fw_version));
153152 strlcpy(drvinfo->bus_info, pci_name(enic->pdev),
....@@ -241,7 +240,7 @@
241240 }
242241 enic_init_vnic_resources(enic);
243242 if (running) {
244
- err = dev_open(netdev);
243
+ err = dev_open(netdev, NULL);
245244 if (err)
246245 goto err_out;
247246 }
....@@ -323,25 +322,6 @@
323322 ec->rx_coalesce_usecs_high);
324323 u32 rx_coalesce_usecs_low = min_t(u32, coalesce_usecs_max,
325324 ec->rx_coalesce_usecs_low);
326
-
327
- if (ec->rx_max_coalesced_frames ||
328
- ec->rx_coalesce_usecs_irq ||
329
- ec->rx_max_coalesced_frames_irq ||
330
- ec->tx_max_coalesced_frames ||
331
- ec->tx_coalesce_usecs_irq ||
332
- ec->tx_max_coalesced_frames_irq ||
333
- ec->stats_block_coalesce_usecs ||
334
- ec->use_adaptive_tx_coalesce ||
335
- ec->pkt_rate_low ||
336
- ec->rx_max_coalesced_frames_low ||
337
- ec->tx_coalesce_usecs_low ||
338
- ec->tx_max_coalesced_frames_low ||
339
- ec->pkt_rate_high ||
340
- ec->rx_max_coalesced_frames_high ||
341
- ec->tx_coalesce_usecs_high ||
342
- ec->tx_max_coalesced_frames_high ||
343
- ec->rate_sample_interval)
344
- return -EINVAL;
345325
346326 if ((vnic_dev_get_intr_mode(enic->vdev) != VNIC_DEV_INTR_MODE_MSIX) &&
347327 ec->tx_coalesce_usecs)
....@@ -454,7 +434,6 @@
454434 break;
455435 default:
456436 return -EINVAL;
457
- break;
458437 }
459438
460439 fsp->h_u.tcp_ip4_spec.ip4src = flow_get_u32_src(&n->keys);
....@@ -636,6 +615,10 @@
636615 }
637616
638617 static const struct ethtool_ops enic_ethtool_ops = {
618
+ .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
619
+ ETHTOOL_COALESCE_USE_ADAPTIVE_RX |
620
+ ETHTOOL_COALESCE_RX_USECS_LOW |
621
+ ETHTOOL_COALESCE_RX_USECS_HIGH,
639622 .get_drvinfo = enic_get_drvinfo,
640623 .get_msglevel = enic_get_msglevel,
641624 .set_msglevel = enic_set_msglevel,