Skip to content

Commit

Permalink
cxgb4vf: Fix bug where we were only allocating one queue in MSI mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Casey Leedom authored and David S. Miller committed Jul 20, 2010
1 parent 024e629 commit c8639a8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/cxgb4vf/cxgb4vf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit c8639a8

Please sign in to comment.