diff options
author | Claudiu Manoil <claudiu.manoil@freescale.com> | 2013-04-03 14:13:55 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-04-05 20:26:27 (GMT) |
commit | e6a4c9ef97c7416a015d81f4b2222297c27285c2 (patch) | |
tree | 1422b6fcc8872024c15dcca75cf1ebe38567424f /drivers | |
parent | ac6b4740fa657fa20aef62fc66acbae8986cc1ee (diff) | |
download | linux-fsl-qoriq-e6a4c9ef97c7416a015d81f4b2222297c27285c2.tar.xz |
gianfar: Fix Rx/Tx ring sizes setup by ethtool -G
Remove the assumption that num_rx_queues==num_tx_queues
from ethtool -G option. Rx and Tx ring sizes shall be
configured independently by ethtool, according to the
corresponding num_rx_queues and resp. num_tx_queues values.
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Change-Id: I0e2af163eb37637b373e2fe49d14bfe2bfdfbd68
Reviewed-on: http://git.am.freescale.net:8181/983
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar_ethtool.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c index 031771c..424984a 100644 --- a/drivers/net/ethernet/freescale/gianfar_ethtool.c +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c @@ -520,8 +520,10 @@ static int gfar_sringparam(struct net_device *dev, } /* Change the size */ - for (i = 0; i < priv->num_rx_queues; i++) { + for (i = 0; i < priv->num_rx_queues; i++) priv->rx_queue[i]->rx_ring_size = rvals->rx_pending; + + for (i = 0; i < priv->num_tx_queues; i++) { priv->tx_queue[i]->tx_ring_size = rvals->tx_pending; priv->tx_queue[i]->num_txbdfree = priv->tx_queue[i]->tx_ring_size; |