[2/4] net/hns3: change the return value of firmware processing timeout from -EBADE to -ETIME

Message ID 20191009141653.39364-3-xavier.huwei@tom.com
State Changes Requested
Delegated to: Ferruh Yigit
Headers show
Series
  • updates for hns3 ethernet pmd driver
Related show

Checks

Context Check Description
ci/Intel-compilation fail apply issues
ci/checkpatch success coding style OK

Commit Message

Wei Hu (Xavier) Oct. 9, 2019, 2:16 p.m.
From: Hongbo Zheng <zhenghongbo3@huawei.com>

Configuration commands are sent to firmware for processing.
When firmware processing timeout, the corresponding error
code is returned. Considering that it is more reasonable to
use error code -ETIME for timeout error, the error code for
processing timeout is changed from -EBADE to -ETIME.

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index 3eebfdd42..58776c2ec 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -359,7 +359,7 @@  static int hns3_cmd_poll_reply(struct hns3_hw *hw)
 		timeout++;
 	} while (timeout < hw->cmq.tx_timeout);
 	hns3_err(hw, "Wait for reply timeout");
-	return -EBADE;
+	return -ETIME;
 }
 
 /*