Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: octeontx2-pf: let core reject the unsupported coalescing parameters

Set ethtool_ops->supported_coalesce_params to let
the core reject unsupported coalescing parameters.

This driver correctly rejects all unsupported
parameters, no functional changes.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jakub Kicinski and committed by
David S. Miller
af7fcbbd 078db9a3

+2 -11
+2 -11
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
··· 368 368 struct otx2_hw *hw = &pfvf->hw; 369 369 int qidx; 370 370 371 - if (ec->use_adaptive_rx_coalesce || ec->use_adaptive_tx_coalesce || 372 - ec->rx_coalesce_usecs_irq || ec->rx_max_coalesced_frames_irq || 373 - ec->tx_coalesce_usecs_irq || ec->tx_max_coalesced_frames_irq || 374 - ec->stats_block_coalesce_usecs || ec->pkt_rate_low || 375 - ec->rx_coalesce_usecs_low || ec->rx_max_coalesced_frames_low || 376 - ec->tx_coalesce_usecs_low || ec->tx_max_coalesced_frames_low || 377 - ec->pkt_rate_high || ec->rx_coalesce_usecs_high || 378 - ec->rx_max_coalesced_frames_high || ec->tx_coalesce_usecs_high || 379 - ec->tx_max_coalesced_frames_high || ec->rate_sample_interval) 380 - return -EOPNOTSUPP; 381 - 382 371 if (!ec->rx_max_coalesced_frames || !ec->tx_max_coalesced_frames) 383 372 return 0; 384 373 ··· 663 674 } 664 675 665 676 static const struct ethtool_ops otx2_ethtool_ops = { 677 + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | 678 + ETHTOOL_COALESCE_MAX_FRAMES, 666 679 .get_link = otx2_get_link, 667 680 .get_drvinfo = otx2_get_drvinfo, 668 681 .get_strings = otx2_get_strings,