Commit 9f85ee9c authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller

sfc: Correct error code for unsupported interrupt coalescing parameters

Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e3b37a1b
...@@ -628,12 +628,12 @@ static int efx_ethtool_set_coalesce(struct net_device *net_dev, ...@@ -628,12 +628,12 @@ static int efx_ethtool_set_coalesce(struct net_device *net_dev,
unsigned tx_usecs, rx_usecs, adaptive; unsigned tx_usecs, rx_usecs, adaptive;
if (coalesce->use_adaptive_tx_coalesce) if (coalesce->use_adaptive_tx_coalesce)
return -EOPNOTSUPP; return -EINVAL;
if (coalesce->rx_coalesce_usecs || coalesce->tx_coalesce_usecs) { if (coalesce->rx_coalesce_usecs || coalesce->tx_coalesce_usecs) {
netif_err(efx, drv, efx->net_dev, "invalid coalescing setting. " netif_err(efx, drv, efx->net_dev, "invalid coalescing setting. "
"Only rx/tx_coalesce_usecs_irq are supported\n"); "Only rx/tx_coalesce_usecs_irq are supported\n");
return -EOPNOTSUPP; return -EINVAL;
} }
rx_usecs = coalesce->rx_coalesce_usecs_irq; rx_usecs = coalesce->rx_coalesce_usecs_irq;
...@@ -647,7 +647,7 @@ static int efx_ethtool_set_coalesce(struct net_device *net_dev, ...@@ -647,7 +647,7 @@ static int efx_ethtool_set_coalesce(struct net_device *net_dev,
tx_usecs) { tx_usecs) {
netif_err(efx, drv, efx->net_dev, "Channel is shared. " netif_err(efx, drv, efx->net_dev, "Channel is shared. "
"Only RX coalescing may be set\n"); "Only RX coalescing may be set\n");
return -EOPNOTSUPP; return -EINVAL;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment