summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/i40e/i40e_adminq.c
diff options
context:
space:
mode:
authorMichal Kosiarz <michal.kosiarz@intel.com>2017-12-27 16:14:40 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-01-27 00:22:56 +0300
commitf34e308b671cbd9293da3bad82efe177822fe93f (patch)
treeffd751207536c98933ae2c7874081506a1c01f87 /drivers/net/ethernet/intel/i40e/i40e_adminq.c
parent9515a2e082f91457db0ecff4b65371d0fb5d9aad (diff)
downloadlinux-f34e308b671cbd9293da3bad82efe177822fe93f.tar.xz
i40e: Add returning AQ critical error to SW
The FW has the ability to return a critical error on every AQ command. When this critical error occurs then we need to send the correct response to the caller. Signed-off-by: Michal Kosiarz <michal.kosiarz@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_adminq.c')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_adminq.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
index d9670cd8743f..c4fa06dd0a2e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
@@ -907,10 +907,15 @@ i40e_status i40e_asq_send_command(struct i40e_hw *hw,
/* update the error if time out occurred */
if ((!cmd_completed) &&
(!details->async && !details->postpone)) {
- i40e_debug(hw,
- I40E_DEBUG_AQ_MESSAGE,
- "AQTX: Writeback timeout.\n");
- status = I40E_ERR_ADMIN_QUEUE_TIMEOUT;
+ if (rd32(hw, hw->aq.asq.len) & I40E_GL_ATQLEN_ATQCRIT_MASK) {
+ i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,
+ "AQTX: AQ Critical error.\n");
+ status = I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR;
+ } else {
+ i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,
+ "AQTX: Writeback timeout.\n");
+ status = I40E_ERR_ADMIN_QUEUE_TIMEOUT;
+ }
}
asq_send_command_error: