fm10k: fix queue disabling
authorWang Xiao W <xiao.w.wang@intel.com>
Fri, 31 Jul 2015 05:05:47 +0000 (13:05 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 3 Aug 2015 14:50:21 +0000 (16:50 +0200)
In Rx and Tx queue_disable functions, the index of queue should
be qnum other than i which is the iteration of time expiration.

Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
drivers/net/fm10k/fm10k_ethdev.c

index 5159cc8..e91cc2d 100644 (file)
@@ -182,7 +182,7 @@ rx_queue_disable(struct fm10k_hw *hw, uint16_t qnum)
        /* Wait 100us at most */
        for (i = 0; i < FM10K_QUEUE_DISABLE_TIMEOUT; i++) {
                rte_delay_us(1);
-               reg = FM10K_READ_REG(hw, FM10K_RXQCTL(i));
+               reg = FM10K_READ_REG(hw, FM10K_RXQCTL(qnum));
                if (!(reg & FM10K_RXQCTL_ENABLE))
                        break;
        }
@@ -271,7 +271,7 @@ tx_queue_disable(struct fm10k_hw *hw, uint16_t qnum)
        /* Wait 100us at most */
        for (i = 0; i < FM10K_QUEUE_DISABLE_TIMEOUT; i++) {
                rte_delay_us(1);
-               reg = FM10K_READ_REG(hw, FM10K_TXDCTL(i));
+               reg = FM10K_READ_REG(hw, FM10K_TXDCTL(qnum));
                if (!(reg & FM10K_TXDCTL_ENABLE))
                        break;
        }