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

sfc: remove 'log-tc-errors' ethtool private flag

It no longer does anything now that we're using formatted extacks instead.
So we can remove the driver's whole get/set priv_flags implementation.

Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Edward Cree and committed by
Jakub Kicinski
b799f052 ad1c80d5

-43
-2
drivers/net/ethernet/sfc/ef100_ethtool.c
··· 43 43 .get_pauseparam = efx_ethtool_get_pauseparam, 44 44 .set_pauseparam = efx_ethtool_set_pauseparam, 45 45 .get_sset_count = efx_ethtool_get_sset_count, 46 - .get_priv_flags = efx_ethtool_get_priv_flags, 47 - .set_priv_flags = efx_ethtool_set_priv_flags, 48 46 .self_test = efx_ethtool_self_test, 49 47 .get_strings = efx_ethtool_get_strings, 50 48 .get_link_ksettings = efx_ethtool_get_link_ksettings,
-37
drivers/net/ethernet/sfc/ethtool_common.c
··· 101 101 102 102 #define EFX_ETHTOOL_SW_STAT_COUNT ARRAY_SIZE(efx_sw_stat_desc) 103 103 104 - static const char efx_ethtool_priv_flags_strings[][ETH_GSTRING_LEN] = { 105 - "log-tc-errors", 106 - }; 107 - 108 - #define EFX_ETHTOOL_PRIV_FLAGS_LOG_TC_ERRS BIT(0) 109 - 110 - #define EFX_ETHTOOL_PRIV_FLAGS_COUNT ARRAY_SIZE(efx_ethtool_priv_flags_strings) 111 - 112 104 void efx_ethtool_get_drvinfo(struct net_device *net_dev, 113 105 struct ethtool_drvinfo *info) 114 106 { ··· 452 460 efx_ptp_describe_stats(efx, NULL); 453 461 case ETH_SS_TEST: 454 462 return efx_ethtool_fill_self_tests(efx, NULL, NULL, NULL); 455 - case ETH_SS_PRIV_FLAGS: 456 - return EFX_ETHTOOL_PRIV_FLAGS_COUNT; 457 463 default: 458 464 return -EINVAL; 459 465 } ··· 478 488 case ETH_SS_TEST: 479 489 efx_ethtool_fill_self_tests(efx, NULL, strings, NULL); 480 490 break; 481 - case ETH_SS_PRIV_FLAGS: 482 - for (i = 0; i < EFX_ETHTOOL_PRIV_FLAGS_COUNT; i++) 483 - strscpy(strings + i * ETH_GSTRING_LEN, 484 - efx_ethtool_priv_flags_strings[i], 485 - ETH_GSTRING_LEN); 486 - break; 487 491 default: 488 492 /* No other string sets */ 489 493 break; 490 494 } 491 - } 492 - 493 - u32 efx_ethtool_get_priv_flags(struct net_device *net_dev) 494 - { 495 - struct efx_nic *efx = efx_netdev_priv(net_dev); 496 - u32 ret_flags = 0; 497 - 498 - if (efx->log_tc_errs) 499 - ret_flags |= EFX_ETHTOOL_PRIV_FLAGS_LOG_TC_ERRS; 500 - 501 - return ret_flags; 502 - } 503 - 504 - int efx_ethtool_set_priv_flags(struct net_device *net_dev, u32 flags) 505 - { 506 - struct efx_nic *efx = efx_netdev_priv(net_dev); 507 - 508 - efx->log_tc_errs = 509 - !!(flags & EFX_ETHTOOL_PRIV_FLAGS_LOG_TC_ERRS); 510 - 511 - return 0; 512 495 } 513 496 514 497 void efx_ethtool_get_stats(struct net_device *net_dev,
-2
drivers/net/ethernet/sfc/ethtool_common.h
··· 27 27 int efx_ethtool_get_sset_count(struct net_device *net_dev, int string_set); 28 28 void efx_ethtool_get_strings(struct net_device *net_dev, u32 string_set, 29 29 u8 *strings); 30 - u32 efx_ethtool_get_priv_flags(struct net_device *net_dev); 31 - int efx_ethtool_set_priv_flags(struct net_device *net_dev, u32 flags); 32 30 void efx_ethtool_get_stats(struct net_device *net_dev, 33 31 struct ethtool_stats *stats __attribute__ ((unused)), 34 32 u64 *data);
-2
drivers/net/ethernet/sfc/net_driver.h
··· 855 855 * @timer_max_ns: Interrupt timer maximum value, in nanoseconds 856 856 * @irq_rx_adaptive: Adaptive IRQ moderation enabled for RX event queues 857 857 * @irqs_hooked: Channel interrupts are hooked 858 - * @log_tc_errs: Error logging for TC filter insertion is enabled 859 858 * @irq_rx_mod_step_us: Step size for IRQ moderation for RX event queues 860 859 * @irq_rx_moderation_us: IRQ moderation time for RX event queues 861 860 * @msg_enable: Log message enable flags ··· 1017 1018 unsigned int timer_max_ns; 1018 1019 bool irq_rx_adaptive; 1019 1020 bool irqs_hooked; 1020 - bool log_tc_errs; 1021 1021 unsigned int irq_mod_step_us; 1022 1022 unsigned int irq_rx_moderation_us; 1023 1023 u32 msg_enable;