| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /**************************************************************************** |
|---|
| 2 | 3 | * Driver for Solarflare network controllers and boards |
|---|
| 3 | 4 | * Copyright 2005-2006 Fen Systems Ltd. |
|---|
| 4 | 5 | * 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. |
|---|
| 9 | 6 | */ |
|---|
| 10 | 7 | |
|---|
| 11 | 8 | #include <linux/netdevice.h> |
|---|
| .. | .. |
|---|
| 517 | 514 | /* We need rx buffers and interrupts. */ |
|---|
| 518 | 515 | already_up = (efx->net_dev->flags & IFF_UP); |
|---|
| 519 | 516 | if (!already_up) { |
|---|
| 520 | | - rc = dev_open(efx->net_dev); |
|---|
| 517 | + rc = dev_open(efx->net_dev, NULL); |
|---|
| 521 | 518 | if (rc) { |
|---|
| 522 | 519 | netif_err(efx, drv, efx->net_dev, |
|---|
| 523 | 520 | "failed opening device.\n"); |
|---|
| .. | .. |
|---|
| 605 | 602 | unsigned int tx_usecs, rx_usecs; |
|---|
| 606 | 603 | bool adaptive, rx_may_override_tx; |
|---|
| 607 | 604 | int rc; |
|---|
| 608 | | - |
|---|
| 609 | | - if (coalesce->use_adaptive_tx_coalesce) |
|---|
| 610 | | - return -EINVAL; |
|---|
| 611 | 605 | |
|---|
| 612 | 606 | ef4_get_irq_moderation(efx, &tx_usecs, &rx_usecs, &adaptive); |
|---|
| 613 | 607 | |
|---|
| .. | .. |
|---|
| 963 | 957 | switch (info->flow_type) { |
|---|
| 964 | 958 | case TCP_V4_FLOW: |
|---|
| 965 | 959 | info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; |
|---|
| 966 | | - /* Fall through */ |
|---|
| 960 | + fallthrough; |
|---|
| 967 | 961 | case UDP_V4_FLOW: |
|---|
| 968 | 962 | case SCTP_V4_FLOW: |
|---|
| 969 | 963 | case AH_ESP_V4_FLOW: |
|---|
| .. | .. |
|---|
| 1314 | 1308 | } |
|---|
| 1315 | 1309 | |
|---|
| 1316 | 1310 | 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, |
|---|
| 1317 | 1314 | .get_drvinfo = ef4_ethtool_get_drvinfo, |
|---|
| 1318 | 1315 | .get_regs_len = ef4_ethtool_get_regs_len, |
|---|
| 1319 | 1316 | .get_regs = ef4_ethtool_get_regs, |
|---|