Skip to content

Commit

Permalink
sfc: Correct error code for unsupported interrupt coalescing parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Sep 16, 2011
1 parent e3b37a1 commit 9f85ee9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/sfc/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,12 +628,12 @@ static int efx_ethtool_set_coalesce(struct net_device *net_dev,
unsigned tx_usecs, rx_usecs, adaptive;

if (coalesce->use_adaptive_tx_coalesce)
return -EOPNOTSUPP;
return -EINVAL;

if (coalesce->rx_coalesce_usecs || coalesce->tx_coalesce_usecs) {
netif_err(efx, drv, efx->net_dev, "invalid coalescing setting. "
"Only rx/tx_coalesce_usecs_irq are supported\n");
return -EOPNOTSUPP;
return -EINVAL;
}

rx_usecs = coalesce->rx_coalesce_usecs_irq;
Expand All @@ -647,7 +647,7 @@ static int efx_ethtool_set_coalesce(struct net_device *net_dev,
tx_usecs) {
netif_err(efx, drv, efx->net_dev, "Channel is shared. "
"Only RX coalescing may be set\n");
return -EOPNOTSUPP;
return -EINVAL;
}
}

Expand Down

0 comments on commit 9f85ee9

Please sign in to comment.