aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 659261218d9f..a2551bcd1027 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -14012,6 +14012,7 @@ static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec)
14012 if ((ec->rx_coalesce_usecs > MAX_RXCOL_TICKS) || 14012 if ((ec->rx_coalesce_usecs > MAX_RXCOL_TICKS) ||
14013 (!ec->rx_coalesce_usecs) || 14013 (!ec->rx_coalesce_usecs) ||
14014 (ec->tx_coalesce_usecs > MAX_TXCOL_TICKS) || 14014 (ec->tx_coalesce_usecs > MAX_TXCOL_TICKS) ||
14015 (!ec->tx_coalesce_usecs) ||
14015 (ec->rx_max_coalesced_frames > MAX_RXMAX_FRAMES) || 14016 (ec->rx_max_coalesced_frames > MAX_RXMAX_FRAMES) ||
14016 (ec->tx_max_coalesced_frames > MAX_TXMAX_FRAMES) || 14017 (ec->tx_max_coalesced_frames > MAX_TXMAX_FRAMES) ||
14017 (ec->rx_coalesce_usecs_irq > max_rxcoal_tick_int) || 14018 (ec->rx_coalesce_usecs_irq > max_rxcoal_tick_int) ||
@@ -14022,16 +14023,6 @@ static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec)
14022 (ec->stats_block_coalesce_usecs < min_stat_coal_ticks)) 14023 (ec->stats_block_coalesce_usecs < min_stat_coal_ticks))
14023 return -EINVAL; 14024 return -EINVAL;
14024 14025
14025 /* No rx interrupts will be generated if both are zero */
14026 if ((ec->rx_coalesce_usecs == 0) &&
14027 (ec->rx_max_coalesced_frames == 0))
14028 return -EINVAL;
14029
14030 /* No tx interrupts will be generated if both are zero */
14031 if ((ec->tx_coalesce_usecs == 0) &&
14032 (ec->tx_max_coalesced_frames == 0))
14033 return -EINVAL;
14034
14035 /* Only copy relevant parameters, ignore all others. */ 14026 /* Only copy relevant parameters, ignore all others. */
14036 tp->coal.rx_coalesce_usecs = ec->rx_coalesce_usecs; 14027 tp->coal.rx_coalesce_usecs = ec->rx_coalesce_usecs;
14037 tp->coal.tx_coalesce_usecs = ec->tx_coalesce_usecs; 14028 tp->coal.tx_coalesce_usecs = ec->tx_coalesce_usecs;