net/e1000: fix MAC type checking
authorXiao Zhang <xiao.zhang@intel.com>
Tue, 10 Sep 2019 17:40:55 +0000 (01:40 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 20 Sep 2019 08:19:41 +0000 (10:19 +0200)
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 <ktraynor@redhat.com>
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/e1000/em_ethdev.c

index 20b5406..fd44924 100644 (file)
@@ -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)