net/e1000: fix wrong mac type checking
diff mbox series

Message ID 1568137255-10014-1-git-send-email-xiao.zhang@intel.com
State Accepted, archived
Delegated to: xiaolong ye
Headers show
Series
  • net/e1000: fix wrong mac type checking
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-dpdk_compile_ovs success Compile Testing PASS
ci/iol-dpdk_compile success Compile Testing PASS
ci/iol-dpdk_compile_spdk success Compile Testing PASS
ci/intel-Performance success Performance Testing PASS
ci/mellanox-Performance success Performance Testing PASS

Commit Message

Xiao Zhang Sept. 10, 2019, 5:40 p.m. UTC
The mac types of i219 are e1000_pch_spt and e1000_pch_cnp, correct the
checking code of mac type when flushing i219 descriptor rings.

Fixes: 1fc9701238ed ("net/e1000: fix i219 hang on reset/close")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/e1000/em_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kevin Traynor Sept. 10, 2019, 9:17 a.m. UTC | #1
On 10/09/2019 18:40, Xiao Zhang wrote:
> The mac types of i219 are e1000_pch_spt and e1000_pch_cnp, correct the
> checking code of mac type when flushing i219 descriptor rings.
> 
> Fixes: 1fc9701238ed ("net/e1000: fix i219 hang on reset/close")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reported-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>

> ---
>  drivers/net/e1000/em_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
> index 20b5406..fd44924 100644
> --- a/drivers/net/e1000/em_ethdev.c
> +++ b/drivers/net/e1000/em_ethdev.c
> @@ -739,7 +739,7 @@ eth_em_stop(struct rte_eth_dev *dev)
>  	e1000_reset_hw(hw);
>  
>  	/* Flush desc rings for i219 */
> -	if (hw->mac.type >= e1000_pch_spt)
> +	if (hw->mac.type == e1000_pch_spt || hw->mac.type == e1000_pch_cnp)
>  		em_flush_desc_rings(dev);
>  
>  	if (hw->mac.type >= e1000_82544)
>
Ye Xiaolong Sept. 11, 2019, 9:31 a.m. UTC | #2
On 09/11, Xiao Zhang wrote:
>The mac types of i219 are e1000_pch_spt and e1000_pch_cnp, correct the
>checking code of mac type when flushing i219 descriptor rings.
>
>Fixes: 1fc9701238ed ("net/e1000: fix i219 hang on reset/close")
>Cc: stable@dpdk.org
>
>Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
>---
> drivers/net/e1000/em_ethdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
>index 20b5406..fd44924 100644
>--- a/drivers/net/e1000/em_ethdev.c
>+++ b/drivers/net/e1000/em_ethdev.c
>@@ -739,7 +739,7 @@ eth_em_stop(struct rte_eth_dev *dev)
> 	e1000_reset_hw(hw);
> 
> 	/* Flush desc rings for i219 */
>-	if (hw->mac.type >= e1000_pch_spt)
>+	if (hw->mac.type == e1000_pch_spt || hw->mac.type == e1000_pch_cnp)
> 		em_flush_desc_rings(dev);
> 
> 	if (hw->mac.type >= e1000_82544)
>-- 
>2.7.4
>

Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel with Kevin's tags.

Patch
diff mbox series

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 20b5406..fd44924 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -739,7 +739,7 @@  eth_em_stop(struct rte_eth_dev *dev)
 	e1000_reset_hw(hw);
 
 	/* Flush desc rings for i219 */
-	if (hw->mac.type >= e1000_pch_spt)
+	if (hw->mac.type == e1000_pch_spt || hw->mac.type == e1000_pch_cnp)
 		em_flush_desc_rings(dev);
 
 	if (hw->mac.type >= e1000_82544)