From: Xiao Zhang Date: Tue, 10 Sep 2019 17:40:55 +0000 (+0800) Subject: net/e1000: fix MAC type checking X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=675f65dc660805eff1953e3dfb6242ec076a9444;p=dpdk.git 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 --- 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)