net/e1000: fix i219 hang on reset/close
authorXiao Zhang <xiao.zhang@intel.com>
Mon, 22 Jul 2019 15:11:52 +0000 (23:11 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 24 Jul 2019 14:00:57 +0000 (16:00 +0200)
commit1fc9701238edcf0541289b9ae15565b6d9d7ab30
treef139053d15c3c30fd12aeb7a44d71afefabc7c75
parent760d966ab3b48ae13d01abc78456a94c6bbad7b2
net/e1000: fix i219 hang on reset/close

Unit hang may occur if multiple descriptors are available in the rings
during reset or close. This state can be detected by configure status
by bit 8 in register. If the bit is set and there are pending
descriptors in one of the rings, we must flush them before reset or
close.

Fixes: 805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/e1000/e1000_ethdev.h
drivers/net/e1000/em_ethdev.c
drivers/net/e1000/em_rxtx.c