mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
net: ethernet: ti: cpsw_ethtool: fix ethtool ring param set
Fix ability to set RX descriptor number, the reason - initially
"tx_max_pending" was set incorrectly, but the issue appears after
adding sanity check, so fix is for "sanity" patch.
Fixes: 37e2d99b59
("ethtool: Ensure new ring parameters are within bounds during SRINGPARAM")
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
afa0925c6f
commit
09faf5a7d7
@ -643,7 +643,7 @@ void cpsw_get_ringparam(struct net_device *ndev,
|
||||
struct cpsw_common *cpsw = priv->cpsw;
|
||||
|
||||
/* not supported */
|
||||
ering->tx_max_pending = 0;
|
||||
ering->tx_max_pending = cpsw->descs_pool_size - CPSW_MAX_QUEUES;
|
||||
ering->tx_pending = cpdma_get_num_tx_descs(cpsw->dma);
|
||||
ering->rx_max_pending = cpsw->descs_pool_size - CPSW_MAX_QUEUES;
|
||||
ering->rx_pending = cpdma_get_num_rx_descs(cpsw->dma);
|
||||
|
Loading…
Reference in New Issue
Block a user