Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214810
b: refs/heads/master
c: 8681dc3
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Kravkov authored and David S. Miller committed Sep 30, 2010
1 parent 8e90e4c commit 73d6b12
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b9f409293529da4630bfc5d6d8e7d7451a6ccb5
refs/heads/master: 8681dc3abd54e845a2effab441921b4c4457c241
17 changes: 11 additions & 6 deletions trunk/drivers/net/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,8 +1185,10 @@ static int bnx2x_set_num_queues(struct bnx2x *bp)
int rc = 0;

switch (bp->int_mode) {
case INT_MODE_INTx:
case INT_MODE_MSI:
bnx2x_enable_msi(bp);
/* falling through... */
case INT_MODE_INTx:
bp->num_queues = 1;
DP(NETIF_MSG_IFUP, "set number of queues to 1\n");
break;
Expand All @@ -1202,9 +1204,16 @@ static int bnx2x_set_num_queues(struct bnx2x *bp)
* and fallback to MSI or legacy INTx with one fp
*/
rc = bnx2x_enable_msix(bp);
if (rc)
if (rc) {
/* failed to enable MSI-X */
bp->num_queues = 1;

/* Fall to INTx if failed to enable MSI-X due to lack of
* memory (in bnx2x_set_num_queues()) */
if ((rc != -ENOMEM) && (bp->int_mode != INT_MODE_INTx))
bnx2x_enable_msi(bp);
}

break;
}
netif_set_real_num_tx_queues(bp->dev, bp->num_queues);
Expand Down Expand Up @@ -1265,10 +1274,6 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
goto load_error1;
}
} else {
/* Fall to INTx if failed to enable MSI-X due to lack of
memory (in bnx2x_set_num_queues()) */
if ((rc != -ENOMEM) && (bp->int_mode != INT_MODE_INTx))
bnx2x_enable_msi(bp);
bnx2x_ack_int(bp);
rc = bnx2x_req_irq(bp);
if (rc) {
Expand Down

0 comments on commit 73d6b12

Please sign in to comment.