net/iavf/base: fix adminq return
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 3 Dec 2019 07:03:16 +0000 (15:03 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:46:01 +0000 (19:46 +0100)
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")
Cc: stable@dpdk.org
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/iavf/base/iavf_adminq.c

index 0a5b2b2..c1668d2 100644 (file)
@@ -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;