aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYitchak Gertner <gertner@broadcom.com>2008-08-25 18:27:06 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-25 18:27:06 -0400
commit231fd58a4d21aa633db734274a27a67395155e51 (patch)
tree9a28f6ad792f1bd922835d16c01e09a26cfff1dc
parent65abd74dd52a79226070904f138f3f8cbcdcf10b (diff)
bnx2x: Multi Queue
The multi queue support is still disabled by default for the bnx2x (needs some more testing and validation), but there are 2 obvious bug in it which are fixed in this patch Signed-off-by: Yitchak Gertner <gertner@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/bnx2x_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index f0b04c98e45e..95e058238afe 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -6492,7 +6492,7 @@ static int bnx2x_stop_multi(struct bnx2x *bp, int index)
6492 6492
6493 /* halt the connection */ 6493 /* halt the connection */
6494 bp->fp[index].state = BNX2X_FP_STATE_HALTING; 6494 bp->fp[index].state = BNX2X_FP_STATE_HALTING;
6495 bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_HALT, index, 0, 0, 0); 6495 bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_HALT, index, 0, index, 0);
6496 6496
6497 /* Wait for completion */ 6497 /* Wait for completion */
6498 rc = bnx2x_wait_ramrod(bp, BNX2X_FP_STATE_HALTED, index, 6498 rc = bnx2x_wait_ramrod(bp, BNX2X_FP_STATE_HALTED, index,
@@ -9492,8 +9492,7 @@ static int bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
9492 fp_index = (smp_processor_id() % bp->num_queues); 9492 fp_index = (smp_processor_id() % bp->num_queues);
9493 fp = &bp->fp[fp_index]; 9493 fp = &bp->fp[fp_index];
9494 9494
9495 if (unlikely(bnx2x_tx_avail(bp->fp) < 9495 if (unlikely(bnx2x_tx_avail(fp) < (skb_shinfo(skb)->nr_frags + 3))) {
9496 (skb_shinfo(skb)->nr_frags + 3))) {
9497 bp->eth_stats.driver_xoff++, 9496 bp->eth_stats.driver_xoff++,
9498 netif_stop_queue(dev); 9497 netif_stop_queue(dev);
9499 BNX2X_ERR("BUG! Tx ring full when queue awake!\n"); 9498 BNX2X_ERR("BUG! Tx ring full when queue awake!\n");
@@ -9556,7 +9555,6 @@ static int bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
9556 tx_bd->vlan = cpu_to_le16(pkt_prod); 9555 tx_bd->vlan = cpu_to_le16(pkt_prod);
9557 9556
9558 if (xmit_type) { 9557 if (xmit_type) {
9559
9560 /* turn on parsing and get a BD */ 9558 /* turn on parsing and get a BD */
9561 bd_prod = TX_BD(NEXT_TX_IDX(bd_prod)); 9559 bd_prod = TX_BD(NEXT_TX_IDX(bd_prod));
9562 pbd = (void *)&fp->tx_desc_ring[bd_prod]; 9560 pbd = (void *)&fp->tx_desc_ring[bd_prod];