net/hns3: fix triggering reset procedure in slave process
authorChengwen Feng <fengchengwen@huawei.com>
Thu, 9 Jan 2020 03:15:59 +0000 (11:15 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:46:26 +0000 (19:46 +0100)
commita1f381ad5349af335bda4b7152b7c6fd5f56573a
treec8b394331c798bda6996d585d18ca5f9ad990259
parenteee015976b46af8cc218263b97f90e8a5937707c
net/hns3: fix triggering reset procedure in slave process

Currently, reset related operations can only be performed in the primary
process and are not allowed in the slave process in hns3 PMD driver.

In the internal function interface named hns3_cmd_send used for
communication between driver and firmware, if the wrong head value is
detected in the static subfunction hns3_cmd_csq_clean, driver will
trigger a function level reset to make the hardware work normally again.

This patch adds check condition to prevent triggering reset procedure in
the slave process to avoid failure.

Fixes: 2790c6464725 ("net/hns3: support device reset")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
drivers/net/hns3/hns3_cmd.c