aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeerav Parikh <neerav.parikh@intel.com>2014-11-11 19:18:20 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-11-18 04:08:56 -0500
commit2fd75f31f6bacaed38061f95f0fee26de3e01170 (patch)
tree2d7b9b141688509c4ce267f2366caea007ae897e
parent7bda87c7fb2eaab8e144d6d0a2638099d7b6e5f5 (diff)
i40e: Resume Port Tx after DCB event
When there are DCB configuration changes based on DCBX the firmware suspends the port's Tx and generates an event to the PF. The PF is then responsible to reconfigure the PF VSIs and switching topology as per the updated DCB configuration and then resume the port's Tx by calling the "Resume Port Tx" AQ command. This patch adds this call to the flow that handles DCB re-configuration in the PF. Change-ID: I5b860ad48abfbf379b003143c4d3453e2ed5cc1c Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-By: Jack Morgan <jack.morgan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_common.c20
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c31
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_prototype.h2
3 files changed, 52 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index c49416cfe616..76735d5f34eb 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -3217,6 +3217,26 @@ i40e_status i40e_aq_add_rem_control_packet_filter(struct i40e_hw *hw,
3217} 3217}
3218 3218
3219/** 3219/**
3220 * i40e_aq_resume_port_tx
3221 * @hw: pointer to the hardware structure
3222 * @cmd_details: pointer to command details structure or NULL
3223 *
3224 * Resume port's Tx traffic
3225 **/
3226i40e_status i40e_aq_resume_port_tx(struct i40e_hw *hw,
3227 struct i40e_asq_cmd_details *cmd_details)
3228{
3229 struct i40e_aq_desc desc;
3230 i40e_status status;
3231
3232 i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_resume_port_tx);
3233
3234 status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
3235
3236 return status;
3237}
3238
3239/**
3220 * i40e_set_pci_config_data - store PCI bus info 3240 * i40e_set_pci_config_data - store PCI bus info
3221 * @hw: pointer to hardware structure 3241 * @hw: pointer to hardware structure
3222 * @link_status: the link status word from PCI config space 3242 * @link_status: the link status word from PCI config space
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 68c19c87ebed..185f977e8a98 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -4382,6 +4382,31 @@ static void i40e_dcb_reconfigure(struct i40e_pf *pf)
4382} 4382}
4383 4383
4384/** 4384/**
4385 * i40e_resume_port_tx - Resume port Tx
4386 * @pf: PF struct
4387 *
4388 * Resume a port's Tx and issue a PF reset in case of failure to
4389 * resume.
4390 **/
4391static int i40e_resume_port_tx(struct i40e_pf *pf)
4392{
4393 struct i40e_hw *hw = &pf->hw;
4394 int ret;
4395
4396 ret = i40e_aq_resume_port_tx(hw, NULL);
4397 if (ret) {
4398 dev_info(&pf->pdev->dev,
4399 "AQ command Resume Port Tx failed = %d\n",
4400 pf->hw.aq.asq_last_status);
4401 /* Schedule PF reset to recover */
4402 set_bit(__I40E_PF_RESET_REQUESTED, &pf->state);
4403 i40e_service_event_schedule(pf);
4404 }
4405
4406 return ret;
4407}
4408
4409/**
4385 * i40e_init_pf_dcb - Initialize DCB configuration 4410 * i40e_init_pf_dcb - Initialize DCB configuration
4386 * @pf: PF being configured 4411 * @pf: PF being configured
4387 * 4412 *
@@ -5075,7 +5100,11 @@ static int i40e_handle_lldp_event(struct i40e_pf *pf,
5075 /* Changes in configuration update VEB/VSI */ 5100 /* Changes in configuration update VEB/VSI */
5076 i40e_dcb_reconfigure(pf); 5101 i40e_dcb_reconfigure(pf);
5077 5102
5078 i40e_pf_unquiesce_all_vsi(pf); 5103 ret = i40e_resume_port_tx(pf);
5104
5105 /* In case of error no point in resuming VSIs */
5106 if (!ret)
5107 i40e_pf_unquiesce_all_vsi(pf);
5079exit: 5108exit:
5080 return ret; 5109 return ret;
5081} 5110}
diff --git a/drivers/net/ethernet/intel/i40e/i40e_prototype.h b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
index 246c27869a63..98a735cdf038 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_prototype.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
@@ -230,6 +230,8 @@ i40e_status i40e_aq_query_switch_comp_bw_config(struct i40e_hw *hw,
230 u16 seid, 230 u16 seid,
231 struct i40e_aqc_query_switching_comp_bw_config_resp *bw_data, 231 struct i40e_aqc_query_switching_comp_bw_config_resp *bw_data,
232 struct i40e_asq_cmd_details *cmd_details); 232 struct i40e_asq_cmd_details *cmd_details);
233i40e_status i40e_aq_resume_port_tx(struct i40e_hw *hw,
234 struct i40e_asq_cmd_details *cmd_details);
233/* i40e_common */ 235/* i40e_common */
234i40e_status i40e_init_shared_code(struct i40e_hw *hw); 236i40e_status i40e_init_shared_code(struct i40e_hw *hw);
235i40e_status i40e_pf_reset(struct i40e_hw *hw); 237i40e_status i40e_pf_reset(struct i40e_hw *hw);