Skip to content

Commit

Permalink
i40e/i40evf: save aq writeback for future inspection
Browse files Browse the repository at this point in the history
Add the ability to save the AdminQ write back descriptor if a
caller supplies a buffer for it to be saved into.

Change-ID: I3d1301d26360b39a2d66dc8569e851f54133a3af
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Shannon Nelson authored and Jeff Kirsher committed Sep 18, 2015
1 parent 79afe83 commit 87db27a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/intel/i40e/i40e_adminq.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,10 @@ i40e_status i40e_asq_send_command(struct i40e_hw *hw,
"AQTX: desc and buffer writeback:\n");
i40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, buff, buff_size);

/* save writeback aq if requested */
if (details->wb_desc)
*details->wb_desc = *desc_on_ring;

/* update the error if time out occurred */
if ((!cmd_completed) &&
(!details->async && !details->postpone)) {
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/i40e/i40e_adminq.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ struct i40e_asq_cmd_details {
u16 flags_dis;
bool async;
bool postpone;
struct i40e_aq_desc *wb_desc;
};

#define I40E_ADMINQ_DETAILS(R, i) \
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/ethernet/intel/i40evf/i40e_adminq.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,10 @@ i40e_status i40evf_asq_send_command(struct i40e_hw *hw,
i40evf_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, buff,
buff_size);

/* save writeback aq if requested */
if (details->wb_desc)
*details->wb_desc = *desc_on_ring;

/* update the error if time out occurred */
if ((!cmd_completed) &&
(!details->async && !details->postpone)) {
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/i40evf/i40e_adminq.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ struct i40e_asq_cmd_details {
u16 flags_dis;
bool async;
bool postpone;
struct i40e_aq_desc *wb_desc;
};

#define I40E_ADMINQ_DETAILS(R, i) \
Expand Down

0 comments on commit 87db27a

Please sign in to comment.