aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorSathya Perla <sathya.perla@emulex.com>2011-12-12 19:58:49 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-13 13:34:26 -0500
commit110b82bc6265a48c1a0bf198109bed325ed055e2 (patch)
tree39577d0cc66d9a769ec2ee4d20bdd30b66312b88 /drivers/net/ethernet
parent036d2df9b3167598a9c9f1c13d9039f7e6cb0083 (diff)
be2net: fix ethtool ringparam reporting
The ethtool "-g" option is supposed to report the max queue length and user modified queue length for RX and TX queues. be2net doesn't support user modification of queue lengths. So, the correct values for these would be the max numbers. be2net incorrectly reports the queue used values for these fields. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_ethtool.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c
index 575c78306313..6ba2dc6bdf7b 100644
--- a/drivers/net/ethernet/emulex/benet/be_ethtool.c
+++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c
@@ -520,16 +520,13 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
520 return 0; 520 return 0;
521} 521}
522 522
523static void 523static void be_get_ringparam(struct net_device *netdev,
524be_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring) 524 struct ethtool_ringparam *ring)
525{ 525{
526 struct be_adapter *adapter = netdev_priv(netdev); 526 struct be_adapter *adapter = netdev_priv(netdev);
527 527
528 ring->rx_max_pending = adapter->rx_obj[0].q.len; 528 ring->rx_max_pending = ring->rx_pending = adapter->rx_obj[0].q.len;
529 ring->tx_max_pending = adapter->tx_obj[0].q.len; 529 ring->tx_max_pending = ring->tx_pending = adapter->tx_obj[0].q.len;
530
531 ring->rx_pending = atomic_read(&adapter->rx_obj[0].q.used);
532 ring->tx_pending = atomic_read(&adapter->tx_obj[0].q.used);
533} 530}
534 531
535static void 532static void