aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_common.c
diff options
context:
space:
mode:
authorVictor Raj <victor.raj@intel.com>2019-02-08 15:50:39 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2019-02-25 11:56:01 -0500
commit6e9650d533dda4acf8baff7ac4bb5d8193148c37 (patch)
treefe1904685732e59dbb95e3bda6ad6bc16f3d4bba /drivers/net/ethernet/intel/ice/ice_common.c
parent82ba01282cf857f98d3c622a2780051a2147ae61 (diff)
ice: flush Tx pipe on disable queue timeout
Set the flush Tx pipe flag instead of getting an EAGAIN error when FW times out in processing the disable Tx queue command. Signed-off-by: Victor Raj <victor.raj@intel.com> Reviewed-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@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/ice/ice_common.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_common.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index b17ade424423..63f003441300 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -2450,6 +2450,7 @@ ice_aq_dis_lan_txq(struct ice_hw *hw, u8 num_qgrps,
2450{ 2450{
2451 struct ice_aqc_dis_txqs *cmd; 2451 struct ice_aqc_dis_txqs *cmd;
2452 struct ice_aq_desc desc; 2452 struct ice_aq_desc desc;
2453 enum ice_status status;
2453 u16 i, sz = 0; 2454 u16 i, sz = 0;
2454 2455
2455 cmd = &desc.params.dis_txqs; 2456 cmd = &desc.params.dis_txqs;
@@ -2485,6 +2486,8 @@ ice_aq_dis_lan_txq(struct ice_hw *hw, u8 num_qgrps,
2485 break; 2486 break;
2486 } 2487 }
2487 2488
2489 /* flush pipe on time out */
2490 cmd->cmd_type |= ICE_AQC_Q_DIS_CMD_FLUSH_PIPE;
2488 /* If no queue group info, we are in a reset flow. Issue the AQ */ 2491 /* If no queue group info, we are in a reset flow. Issue the AQ */
2489 if (!qg_list) 2492 if (!qg_list)
2490 goto do_aq; 2493 goto do_aq;
@@ -2510,7 +2513,17 @@ ice_aq_dis_lan_txq(struct ice_hw *hw, u8 num_qgrps,
2510 return ICE_ERR_PARAM; 2513 return ICE_ERR_PARAM;
2511 2514
2512do_aq: 2515do_aq:
2513 return ice_aq_send_cmd(hw, &desc, qg_list, buf_size, cd); 2516 status = ice_aq_send_cmd(hw, &desc, qg_list, buf_size, cd);
2517 if (status) {
2518 if (!qg_list)
2519 ice_debug(hw, ICE_DBG_SCHED, "VM%d disable failed %d\n",
2520 vmvf_num, hw->adminq.sq_last_status);
2521 else
2522 ice_debug(hw, ICE_DBG_SCHED, "disable Q %d failed %d\n",
2523 le16_to_cpu(qg_list[0].q_id[0]),
2524 hw->adminq.sq_last_status);
2525 }
2526 return status;
2514} 2527}
2515 2528
2516/* End of FW Admin Queue command wrappers */ 2529/* End of FW Admin Queue command wrappers */
@@ -2796,8 +2809,12 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_qgrps,
2796 2809
2797 /* add the lan q */ 2810 /* add the lan q */
2798 status = ice_aq_add_lan_txq(hw, num_qgrps, buf, buf_size, cd); 2811 status = ice_aq_add_lan_txq(hw, num_qgrps, buf, buf_size, cd);
2799 if (status) 2812 if (status) {
2813 ice_debug(hw, ICE_DBG_SCHED, "enable Q %d failed %d\n",
2814 le16_to_cpu(buf->txqs[0].txq_id),
2815 hw->adminq.sq_last_status);
2800 goto ena_txq_exit; 2816 goto ena_txq_exit;
2817 }
2801 2818
2802 node.node_teid = buf->txqs[0].q_teid; 2819 node.node_teid = buf->txqs[0].q_teid;
2803 node.data.elem_type = ICE_AQC_ELEM_TYPE_LEAF; 2820 node.data.elem_type = ICE_AQC_ELEM_TYPE_LEAF;