aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb4vf
diff options
context:
space:
mode:
authorCasey Leedom <leedom@chelsio.com>2010-07-19 17:53:48 -0700
committerDavid S. Miller <davem@davemloft.net>2010-07-20 12:42:43 -0700
commitc8639a827fa48985432ad2e0e21b1280a1e3a65e (patch)
tree05f386d5f480f2c7598235b82474b0207258d16c /drivers/net/cxgb4vf
parent024e6293f959dc86827284bc1d7c93c8baed1ec6 (diff)
downloadkernel_samsung_smdk4412-c8639a827fa48985432ad2e0e21b1280a1e3a65e.tar.gz
kernel_samsung_smdk4412-c8639a827fa48985432ad2e0e21b1280a1e3a65e.tar.bz2
kernel_samsung_smdk4412-c8639a827fa48985432ad2e0e21b1280a1e3a65e.zip
cxgb4vf: Fix bug where we were only allocating one queue in MSI mode
Fix bug in setup_sge_queues() where we were incorrectly only allocating a single "Queue Set" for MSI mode. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb4vf')
-rw-r--r--drivers/net/cxgb4vf/cxgb4vf_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/cxgb4vf/cxgb4vf_main.c b/drivers/net/cxgb4vf/cxgb4vf_main.c
index d065516c0ff..a16563219ac 100644
--- a/drivers/net/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/cxgb4vf/cxgb4vf_main.c
@@ -533,10 +533,9 @@ static int setup_sge_queues(struct adapter *adapter)
struct port_info *pi = netdev_priv(dev);
struct sge_eth_rxq *rxq = &s->ethrxq[pi->first_qset];
struct sge_eth_txq *txq = &s->ethtxq[pi->first_qset];
- int nqsets = (adapter->flags & USING_MSIX) ? pi->nqsets : 1;
int qs;
- for (qs = 0; qs < nqsets; qs++, rxq++, txq++) {
+ for (qs = 0; qs < pi->nqsets; qs++, rxq++, txq++) {
err = t4vf_sge_alloc_rxq(adapter, &rxq->rspq, false,
dev, msix++,
&rxq->fl, t4vf_ethrx_handler);
@@ -565,10 +564,9 @@ static int setup_sge_queues(struct adapter *adapter)
struct port_info *pi = netdev_priv(dev);
struct sge_eth_rxq *rxq = &s->ethrxq[pi->first_qset];
struct sge_eth_txq *txq = &s->ethtxq[pi->first_qset];
- int nqsets = (adapter->flags & USING_MSIX) ? pi->nqsets : 1;
int qs;
- for (qs = 0; qs < nqsets; qs++, rxq++, txq++) {
+ for (qs = 0; qs < pi->nqsets; qs++, rxq++, txq++) {
IQ_MAP(s, rxq->rspq.abs_id) = &rxq->rspq;
EQ_MAP(s, txq->q.abs_id) = &txq->q;