From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bn3nam01on0108.outbound.protection.outlook.com ([104.47.33.108]:54803 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753116AbeDIAVT (ORCPT ); Sun, 8 Apr 2018 20:21:19 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Thomas Falcon , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 175/189] ibmvnic: Reset long term map ID counter Date: Mon, 9 Apr 2018 00:19:07 +0000 Message-ID: <20180409001637.162453-175-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: Thomas Falcon [ Upstream commit faefaa97215a0c05105d7ae180fe1a3b5979ad1f ] When allocating RX or TX buffer pools, the driver needs to provide a unique mapping ID to firmware for each pool. This value is assigned using a counter which is incremented after a new pool is created. The ID can be an integer ranging from 1-255. When migrating to a device that requests a different number of queues, this value was not being reset properly. As a result, after enough migrations, the counter exceeded the upper bound and pool creation failed. This is fixed by resetting the counter to one in this case. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/= ibmvnic.c index 4ba49a98c689..297007678584 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1634,6 +1634,7 @@ static int do_reset(struct ibmvnic_adapter *adapter, return rc; } else if (adapter->req_rx_queues !=3D old_num_rx_queues || adapter->req_tx_queues !=3D old_num_tx_queues) { + adapter->map_id =3D 1; release_rx_pools(adapter); release_tx_pools(adapter); init_rx_pools(netdev); --=20 2.15.1