From: Wang Xiao W Date: Fri, 31 Jul 2015 05:05:47 +0000 (+0800) Subject: fm10k: fix queue disabling X-Git-Tag: spdx-start~8571 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=aa868640859c72517db55b724fd7e18ee1f35482;p=dpdk.git fm10k: fix queue disabling 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 Acked-by: Jing Chen --- diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 5159cc8cd1..e91cc2de4d 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -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; }