Commit 231fd58a authored by Yitchak Gertner's avatar Yitchak Gertner Committed by David S. Miller

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: default avatarYitchak Gertner <gertner@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 65abd74d
...@@ -6492,7 +6492,7 @@ static int bnx2x_stop_multi(struct bnx2x *bp, int index) ...@@ -6492,7 +6492,7 @@ static int bnx2x_stop_multi(struct bnx2x *bp, int index)
/* halt the connection */ /* halt the connection */
bp->fp[index].state = BNX2X_FP_STATE_HALTING; bp->fp[index].state = BNX2X_FP_STATE_HALTING;
bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_HALT, index, 0, 0, 0); bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_HALT, index, 0, index, 0);
/* Wait for completion */ /* Wait for completion */
rc = bnx2x_wait_ramrod(bp, BNX2X_FP_STATE_HALTED, index, 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,8 +9492,7 @@ static int bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
fp_index = (smp_processor_id() % bp->num_queues); fp_index = (smp_processor_id() % bp->num_queues);
fp = &bp->fp[fp_index]; fp = &bp->fp[fp_index];
if (unlikely(bnx2x_tx_avail(bp->fp) < if (unlikely(bnx2x_tx_avail(fp) < (skb_shinfo(skb)->nr_frags + 3))) {
(skb_shinfo(skb)->nr_frags + 3))) {
bp->eth_stats.driver_xoff++, bp->eth_stats.driver_xoff++,
netif_stop_queue(dev); netif_stop_queue(dev);
BNX2X_ERR("BUG! Tx ring full when queue awake!\n"); 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,7 +9555,6 @@ static int bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
tx_bd->vlan = cpu_to_le16(pkt_prod); tx_bd->vlan = cpu_to_le16(pkt_prod);
if (xmit_type) { if (xmit_type) {
/* turn on parsing and get a BD */ /* turn on parsing and get a BD */
bd_prod = TX_BD(NEXT_TX_IDX(bd_prod)); bd_prod = TX_BD(NEXT_TX_IDX(bd_prod));
pbd = (void *)&fp->tx_desc_ring[bd_prod]; pbd = (void *)&fp->tx_desc_ring[bd_prod];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment