net/hns3: fix FLR miss detection
authorHongbo Zheng <zhenghongbo3@huawei.com>
Wed, 31 Mar 2021 10:01:37 +0000 (18:01 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 8 Apr 2021 16:57:09 +0000 (18:57 +0200)
commit32040ae365735f94253ce317b4b01e8bc4ea9c6b
tree5290520b572023118c171f7a7c3940e6d1038fa9
parent76a3836b98c4af6b9aaeaaa50907fe6143d31c55
net/hns3: fix FLR miss detection

When FLR occurs, the head pointer register of
the command queue will be cleared, resulting in
abnormal detection of the head pointer register
of the command queue. At present, FLR is detected
in this way, and the reset recovery process is
executed.

However, when FLR occurs, the header pointer
register of the command queue is not necessarily
abnormal. For example, when the driver runs
normally, the value of the header pointer register
of the command queue may also be 0, which will
lead to the miss detection of FLR.

Therefore, the judgment that whether the base
address register of command queue is 0 is added
to ensure that FLR not miss detection.

Fixes: 2790c6464725 ("net/hns3: support device reset")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
drivers/net/hns3/hns3_cmd.c