diff options
author | Divy Le Ray <divy@chelsio.com> | 2007-03-18 16:10:01 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-23 01:48:33 -0400 |
commit | 05b97b30b09ed245d376035cddf669532e5cca67 (patch) | |
tree | b59cbea846c46cc58ee33afd45f408ffad0b13d0 /drivers/net/cxgb3 | |
parent | 5c4851ccb6b12ff29e28b84e7515a18006b19fdf (diff) |
cxgb3 - fix ethtool cmd on multiple queues port
Limit ethtool -g/-G to the given port's queues.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/cxgb3')
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index 7ff834e45d6b..eb0a4e068200 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -1362,23 +1362,27 @@ static int set_rx_csum(struct net_device *dev, u32 data) | |||
1362 | 1362 | ||
1363 | static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e) | 1363 | static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e) |
1364 | { | 1364 | { |
1365 | struct adapter *adapter = dev->priv; | 1365 | const struct adapter *adapter = dev->priv; |
1366 | const struct port_info *pi = netdev_priv(dev); | ||
1367 | const struct qset_params *q = &adapter->params.sge.qset[pi->first_qset]; | ||
1366 | 1368 | ||
1367 | e->rx_max_pending = MAX_RX_BUFFERS; | 1369 | e->rx_max_pending = MAX_RX_BUFFERS; |
1368 | e->rx_mini_max_pending = 0; | 1370 | e->rx_mini_max_pending = 0; |
1369 | e->rx_jumbo_max_pending = MAX_RX_JUMBO_BUFFERS; | 1371 | e->rx_jumbo_max_pending = MAX_RX_JUMBO_BUFFERS; |
1370 | e->tx_max_pending = MAX_TXQ_ENTRIES; | 1372 | e->tx_max_pending = MAX_TXQ_ENTRIES; |
1371 | 1373 | ||
1372 | e->rx_pending = adapter->params.sge.qset[0].fl_size; | 1374 | e->rx_pending = q->fl_size; |
1373 | e->rx_mini_pending = adapter->params.sge.qset[0].rspq_size; | 1375 | e->rx_mini_pending = q->rspq_size; |
1374 | e->rx_jumbo_pending = adapter->params.sge.qset[0].jumbo_size; | 1376 | e->rx_jumbo_pending = q->jumbo_size; |
1375 | e->tx_pending = adapter->params.sge.qset[0].txq_size[0]; | 1377 | e->tx_pending = q->txq_size[0]; |
1376 | } | 1378 | } |
1377 | 1379 | ||
1378 | static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e) | 1380 | static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e) |
1379 | { | 1381 | { |
1380 | int i; | 1382 | int i; |
1383 | struct qset_params *q; | ||
1381 | struct adapter *adapter = dev->priv; | 1384 | struct adapter *adapter = dev->priv; |
1385 | const struct port_info *pi = netdev_priv(dev); | ||
1382 | 1386 | ||
1383 | if (e->rx_pending > MAX_RX_BUFFERS || | 1387 | if (e->rx_pending > MAX_RX_BUFFERS || |
1384 | e->rx_jumbo_pending > MAX_RX_JUMBO_BUFFERS || | 1388 | e->rx_jumbo_pending > MAX_RX_JUMBO_BUFFERS || |
@@ -1393,9 +1397,8 @@ static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e) | |||
1393 | if (adapter->flags & FULL_INIT_DONE) | 1397 | if (adapter->flags & FULL_INIT_DONE) |
1394 | return -EBUSY; | 1398 | return -EBUSY; |
1395 | 1399 | ||
1396 | for (i = 0; i < SGE_QSETS; ++i) { | 1400 | q = &adapter->params.sge.qset[pi->first_qset]; |
1397 | struct qset_params *q = &adapter->params.sge.qset[i]; | 1401 | for (i = 0; i < pi->nqsets; ++i, ++q) { |
1398 | |||
1399 | q->rspq_size = e->rx_mini_pending; | 1402 | q->rspq_size = e->rx_mini_pending; |
1400 | q->fl_size = e->rx_pending; | 1403 | q->fl_size = e->rx_pending; |
1401 | q->jumbo_size = e->rx_jumbo_pending; | 1404 | q->jumbo_size = e->rx_jumbo_pending; |