* [PATCH v2] net: ethernet: ti: cpsw_ethtool: fix ethtool ring param set
@ 2019-05-31 13:47 Ivan Khoronzhuk
2019-06-01 10:36 ` grygorii
2019-06-03 21:34 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Ivan Khoronzhuk @ 2019-05-31 13:47 UTC (permalink / raw)
To: grygorii.strashko, davem
Cc: linux-omap, netdev, linux-kernel, Ivan Khoronzhuk
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: 37e2d99b59c476 ("ethtool: Ensure new ring parameters are within bounds during SRINGPARAM")
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
---
Based on net/master
drivers/net/ethernet/ti/cpsw_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/cpsw_ethtool.c b/drivers/net/ethernet/ti/cpsw_ethtool.c
index a4a7ec0d2531..6d1c9ebae7cc 100644
--- a/drivers/net/ethernet/ti/cpsw_ethtool.c
+++ b/drivers/net/ethernet/ti/cpsw_ethtool.c
@@ -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);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] net: ethernet: ti: cpsw_ethtool: fix ethtool ring param set
2019-05-31 13:47 [PATCH v2] net: ethernet: ti: cpsw_ethtool: fix ethtool ring param set Ivan Khoronzhuk
@ 2019-06-01 10:36 ` grygorii
2019-06-03 21:34 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: grygorii @ 2019-06-01 10:36 UTC (permalink / raw)
To: Ivan Khoronzhuk, davem; +Cc: linux-omap, netdev, linux-kernel
On 31/05/2019 16:47, Ivan Khoronzhuk wrote:
> 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: 37e2d99b59c476 ("ethtool: Ensure new ring parameters are within bounds during SRINGPARAM")
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
> ---
> Based on net/master
>
> drivers/net/ethernet/ti/cpsw_ethtool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/ti/cpsw_ethtool.c b/drivers/net/ethernet/ti/cpsw_ethtool.c
> index a4a7ec0d2531..6d1c9ebae7cc 100644
> --- a/drivers/net/ethernet/ti/cpsw_ethtool.c
> +++ b/drivers/net/ethernet/ti/cpsw_ethtool.c
> @@ -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);
>
Thank you.
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
--
Best regards,
grygorii
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] net: ethernet: ti: cpsw_ethtool: fix ethtool ring param set
2019-05-31 13:47 [PATCH v2] net: ethernet: ti: cpsw_ethtool: fix ethtool ring param set Ivan Khoronzhuk
2019-06-01 10:36 ` grygorii
@ 2019-06-03 21:34 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-06-03 21:34 UTC (permalink / raw)
To: ivan.khoronzhuk; +Cc: grygorii.strashko, linux-omap, netdev, linux-kernel
From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Date: Fri, 31 May 2019 16:47:25 +0300
> 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: 37e2d99b59c476 ("ethtool: Ensure new ring parameters are within bounds during SRINGPARAM")
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-03 21:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 13:47 [PATCH v2] net: ethernet: ti: cpsw_ethtool: fix ethtool ring param set Ivan Khoronzhuk
2019-06-01 10:36 ` grygorii
2019-06-03 21:34 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).