]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
i40e: Add additional return code to i40e_asq_send_command
authorPiotr Azarewicz <piotr.azarewicz@intel.com>
Tue, 31 Jul 2018 10:41:46 +0000 (03:41 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 7 Aug 2018 19:20:38 +0000 (12:20 -0700)
Firmware can return a busy state, so the function return
I40E_ERR_NOT_READY.

Signed-off-by: Piotr Azarewicz <piotr.azarewicz@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_adminq.c
drivers/net/ethernet/intel/i40evf/i40e_adminq.c

index ddbea79d18e5fdfac88031e21c3d8d88678b06e0..501ee718177fa83dbdbcedd99ebf569d8786e1b6 100644 (file)
@@ -868,6 +868,8 @@ i40e_status i40e_asq_send_command(struct i40e_hw *hw,
                cmd_completed = true;
                if ((enum i40e_admin_queue_err)retval == I40E_AQ_RC_OK)
                        status = 0;
+               else if ((enum i40e_admin_queue_err)retval == I40E_AQ_RC_EBUSY)
+                       status = I40E_ERR_NOT_READY;
                else
                        status = I40E_ERR_ADMIN_QUEUE_ERROR;
                hw->aq.asq_last_status = (enum i40e_admin_queue_err)retval;
index c355120dfdfd30d1d8ccdfecd04925588e48b845..21a0dbf6ccf613dd2b9a5d79b81ebb34bf346a14 100644 (file)
@@ -797,6 +797,8 @@ i40e_status i40evf_asq_send_command(struct i40e_hw *hw,
                cmd_completed = true;
                if ((enum i40e_admin_queue_err)retval == I40E_AQ_RC_OK)
                        status = 0;
+               else if ((enum i40e_admin_queue_err)retval == I40E_AQ_RC_EBUSY)
+                       status = I40E_ERR_NOT_READY;
                else
                        status = I40E_ERR_ADMIN_QUEUE_ERROR;
                hw->aq.asq_last_status = (enum i40e_admin_queue_err)retval;