Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2709540pxj; Mon, 31 May 2021 08:47:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxk3v1mSto/Nso+5BfgFVI8dyne3w6oIdKS7WFsq+v4fXkMMvz5dLovnOuTuBhwjYiZAh/c X-Received: by 2002:a05:6e02:1050:: with SMTP id p16mr7328638ilj.74.1622476067149; Mon, 31 May 2021 08:47:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622476067; cv=none; d=google.com; s=arc-20160816; b=GxLcFon9xPbUc0cqEwNbE8ubvfA31jqgT+VeywOOnxQ1DaSVgCQZjY+rlEpElyfLLD moIGN/JxhvE3r6IQ/4pVh9FurXHUatIGVfLv1oCPEZ/4WE4uWmR/QU5lptnNzprxXz6N n4GmVbAE/tA3LYSvGJyL/3GTn4TUR9VYZrSVlDWC9JOjJK2NkOIs4jaqvdIl5taBpG9T HvxEIT/1FO6wCTo7DTQgLd+BQ2YnYJJzGI4Za07vDXhFhbd8Ge8tv/S31Sb5NlfJ19jz CeOqcNDQcrpI7LRFGtapt29nByG5v8sfmLLf+m2cV2+S6gA8vVnGSR9b+3baXOohj7Rj 0tYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AWP4xyn9Y7R2X+oAceaj5AnUFGNVsf3mIaVrdY26CiI=; b=z8WeFyk1+/dYV6nHPwMPR08hFbWPed3hhcirC6CDikzI03bRYqG2pqjp9WH0OUStW5 Qx5T5i4J31carTChoWeFMwfGDXXpO+xyfCmLIYSB1ILk1YedPy8bPUK+/baNSg4yrst9 2cZOM141pSj8OuBPwPpdco+T9lLC07DYc/9JfYvBZ7PJ+nRpLa7XpR4tDaXL0h+jcoT5 ucCXbbH4cXu4aIVzyA6pqNdyjpCFk+5Sjk8GwRWWUYt6p0Hf1JQKMGu71sYzZjrHUGpy 3q67CU/GFLE5ofjsYW9mlyOFXcoEEvwbs2X0/Ggxn1qfD9E0aHXdLYV3bRmaWz7ikwZQ g4FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=icHXj552; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z22si14758281jal.117.2021.05.31.08.47.34; Mon, 31 May 2021 08:47:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=icHXj552; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232997AbhEaPsi (ORCPT + 99 others); Mon, 31 May 2021 11:48:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:56132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233793AbhEaO11 (ORCPT ); Mon, 31 May 2021 10:27:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 76A1D6161C; Mon, 31 May 2021 13:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468856; bh=sEfcnesrPRlbDo2cFYNq0uRXw0mNlM8JcxE+5scxdrQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=icHXj552Wh87XOByYDsCe1GSWJ6xw9UfPEhSDc2SJIecahBLBRTe39ajqlTp/nlBv 5fOiQ6rSb0ltQb0Cc8xE3kd84qvNQ/zRxqlxx/WJB/I+EFSH2A3qEvD1oX99Ot3YGQ zPkt1EYMFh4umw3U847O//QNdoHhH7Q6hN/2iUNs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Awogbemila , Willem de Bruijn , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 153/177] gve: Update mgmt_msix_idx if num_ntfy changes Date: Mon, 31 May 2021 15:15:10 +0200 Message-Id: <20210531130653.212537921@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130647.887605866@linuxfoundation.org> References: <20210531130647.887605866@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Awogbemila [ Upstream commit e96b491a0ffa35a8a9607c193fa4d894ca9fb32f ] If we do not get the expected number of vectors from pci_enable_msix_range, we update priv->num_ntfy_blks but not priv->mgmt_msix_idx. This patch fixes this so that priv->mgmt_msix_idx is updated accordingly. Fixes: f5cedc84a30d ("gve: Add transmit and receive support") Signed-off-by: David Awogbemila Acked-by: Willem de Bruijn Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/google/gve/gve_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c index 9b7a8db9860f..9c74251f9b6a 100644 --- a/drivers/net/ethernet/google/gve/gve_main.c +++ b/drivers/net/ethernet/google/gve/gve_main.c @@ -161,6 +161,7 @@ static int gve_alloc_notify_blocks(struct gve_priv *priv) int vecs_left = new_num_ntfy_blks % 2; priv->num_ntfy_blks = new_num_ntfy_blks; + priv->mgmt_msix_idx = priv->num_ntfy_blks; priv->tx_cfg.max_queues = min_t(int, priv->tx_cfg.max_queues, vecs_per_type); priv->rx_cfg.max_queues = min_t(int, priv->rx_cfg.max_queues, -- 2.30.2