From 675f65dc660805eff1953e3dfb6242ec076a9444 Mon Sep 17 00:00:00 2001 From: Xiao Zhang Date: Wed, 11 Sep 2019 01:40:55 +0800 Subject: [PATCH] net/e1000: fix MAC type checking 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 Reported-by: Kevin Traynor Signed-off-by: Xiao Zhang Acked-by: Kevin Traynor Reviewed-by: Xiaolong Ye --- 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 20b5406237..fd44924285 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.20.1