[15/17] net/iavf/base: fix send adminq return value
diff mbox series

Message ID 20191203070318.39620-16-qi.z.zhang@intel.com
State Accepted, archived
Delegated to: xiaolong ye
Headers show
Series
  • iavf base code update
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Zhang, Qi Z Dec. 3, 2019, 7:03 a.m. UTC
When send a adminq, if get IAVF_AQ_RC_BUSY, we should return
IAVF_ERR_NOT_READY.

Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/base/iavf_adminq.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Yang, Qiming Jan. 2, 2020, 2:48 a.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qi Zhang
> Sent: Tuesday, December 3, 2019 3:03 PM
> To: Ye, Xiaolong <xiaolong.ye@intel.com>
> Cc: Wang, Haiyue <haiyue.wang@intel.com>; dev@dpdk.org; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Stillwell Jr, Paul M <paul.m.stillwell.jr@intel.com>
> Subject: [dpdk-dev] [PATCH 15/17] net/iavf/base: fix send adminq return
> value
> 
> When send a adminq, if get IAVF_AQ_RC_BUSY, we should return
> IAVF_ERR_NOT_READY.
> 
> Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")
> 
Lack of CC stable

> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>  drivers/net/iavf/base/iavf_adminq.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/iavf/base/iavf_adminq.c
> b/drivers/net/iavf/base/iavf_adminq.c
> index 0a5b2b281..c1668d228 100644
> --- a/drivers/net/iavf/base/iavf_adminq.c
> +++ b/drivers/net/iavf/base/iavf_adminq.c
> @@ -803,6 +803,8 @@ enum iavf_status iavf_asq_send_command(struct
> iavf_hw *hw,
>  		cmd_completed = true;
>  		if ((enum iavf_admin_queue_err)retval == IAVF_AQ_RC_OK)
>  			status = IAVF_SUCCESS;
> +		else if ((enum iavf_admin_queue_err)retval ==
> IAVF_AQ_RC_EBUSY)
> +			status = IAVF_ERR_NOT_READY;
>  		else
>  			status = IAVF_ERR_ADMIN_QUEUE_ERROR;
>  		hw->aq.asq_last_status = (enum
> iavf_admin_queue_err)retval;
> --
> 2.13.6

Patch
diff mbox series

diff --git a/drivers/net/iavf/base/iavf_adminq.c b/drivers/net/iavf/base/iavf_adminq.c
index 0a5b2b281..c1668d228 100644
--- a/drivers/net/iavf/base/iavf_adminq.c
+++ b/drivers/net/iavf/base/iavf_adminq.c
@@ -803,6 +803,8 @@  enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,
 		cmd_completed = true;
 		if ((enum iavf_admin_queue_err)retval == IAVF_AQ_RC_OK)
 			status = IAVF_SUCCESS;
+		else if ((enum iavf_admin_queue_err)retval == IAVF_AQ_RC_EBUSY)
+			status = IAVF_ERR_NOT_READY;
 		else
 			status = IAVF_ERR_ADMIN_QUEUE_ERROR;
 		hw->aq.asq_last_status = (enum iavf_admin_queue_err)retval;