From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bn3nam01on0092.outbound.protection.outlook.com ([104.47.33.92]:62923 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753744AbeDIASp (ORCPT ); Sun, 8 Apr 2018 20:18:45 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Amritha Nambiar , Jeff Kirsher , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 080/189] i40e: Fix channel addition in reset flow Date: Mon, 9 Apr 2018 00:17:48 +0000 Message-ID: <20180409001637.162453-80-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Amritha Nambiar [ Upstream commit bbf0bdd41fbf71a008325bdcf0df63ab088bf532 ] Fix recreating the channel VSIs during the reset flow to reconfigure the Tx rings and the queue context associated with the channel VSI. Also update the next_base_queue for the VSI while rebuilding the channel VSIs after a reset. Signed-off-by: Amritha Nambiar Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethe= rnet/intel/i40e/i40e_main.c index af792112a2d3..973bad818e81 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -9077,6 +9077,17 @@ static int i40e_rebuild_channels(struct i40e_vsi *vs= i) vsi->uplink_seid); return ret; } + /* Reconfigure TX queues using QTX_CTL register */ + ret =3D i40e_channel_config_tx_ring(vsi->back, vsi, ch); + if (ret) { + dev_info(&vsi->back->pdev->dev, + "failed to configure TX rings for channel %u\n", + ch->seid); + return ret; + } + /* update 'next_base_queue' */ + vsi->next_base_queue =3D vsi->next_base_queue + + ch->num_queue_pairs; if (ch->max_tx_rate) { u64 credits =3D ch->max_tx_rate; =20 --=20 2.15.1