Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6267963rwb; Tue, 9 Aug 2022 12:05:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR5+eGEC4PER1zSx17Zhtqhr8Tr/e8jYEHA06CY7xZakNlZkk7zBSeoEx+1KSepOSg3Z+wr5 X-Received: by 2002:a05:6402:42cb:b0:43d:bf29:cf89 with SMTP id i11-20020a05640242cb00b0043dbf29cf89mr22899662edc.400.1660071928538; Tue, 09 Aug 2022 12:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660071928; cv=none; d=google.com; s=arc-20160816; b=AnHLFw5ZUvmj3exUJi+QPz8eGOL8DXrzbsNqLath2o3uwTfgB/K+iwUdO3foMKEhum u/WUiIHerixYsGV+QiT8vD2HMc3ozjWJLzQro96F1reoSwETK7ULqIvA7aPM8Bp0XNEc MdUHTgYzfY+cNdE7PkCiFSK5cPcdTqhT8VRRPwe9KyacSqho4fG65qDZa3G72ogIu+W1 SsqX4I+zjqw/kxTgCFa/6rWtQxaUbH0C+PlM1M3ODlJL1MDQkLqygC7tx/YZrqYPWi+1 VrFQmDy0yl6ybzlVHe6CIKFQs6igFjmP606MVBnuu6bK7k3KXy1NLrdwlgXNHQ95Xz+g faAg== 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=cBGtxnqHEIa8TnytXu03GhoFPotvdcUcUW8Ug/35UpY=; b=oMbdcbO7gdfJoetViU8iJe1rANLEQvUsH9PnPOUmvoxbUVm9zEAaLXMKrsaZ03S+i9 1w8XgfGCojpcKoorFKRmxVHnJsd9KYPXQQkUShAbRiBWxI28UV/NdFmLlx8ngY8tQIdN IGtFy1kdE0o0hePCCTGDx/vH7AChq7yOl1AXhyDSOJS6VGqlM/2tKd1Y/WgEkgCy2Zjt +RRaxlcDuT2yrLmE8wPKleK2cUnvfl2fko8BSk1eJ7H9XyyGr5t8CyywJu4LUAmGtroC 5oUHutkoJE/eG0/tW6JIw37b0QbVznvfHqQsCRcimqD2Jd/vyFx6VgqM+yI7jU+4ZUXH MOzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EArP4kQi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr6-20020a1709073f8600b007310a9ad201si2888303ejc.130.2022.08.09.12.04.50; Tue, 09 Aug 2022 12:05:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EArP4kQi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1344675AbiHISGc (ORCPT + 99 others); Tue, 9 Aug 2022 14:06:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344757AbiHISFo (ORCPT ); Tue, 9 Aug 2022 14:05:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E7E127CD9; Tue, 9 Aug 2022 11:02:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A11CD6106C; Tue, 9 Aug 2022 18:02:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACC5FC433C1; Tue, 9 Aug 2022 18:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660068156; bh=iJ3n/ovvuywHeUCdRoL+0FiyTg+YR+72DqrzGIc88cA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EArP4kQimPVZOHgd6z7Mnb8LkVKWd9bDiiOPy5Av8loHnFq0Aou5rGXJafUtOmzz5 R1LKSQu8wMzg5UhoiuyamXDYN+ACnss+LN218gFodTUrhIkWR6pq/XHTTkRjKtq72z EPvqU2ITBlUZMpJOMVeUYeYx7cSlhG4QWiOa1hSs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dawid Lukwinski , Michal Maloszewski , Dave Switzer , Tony Nguyen , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.19 21/32] i40e: Fix interface init with MSI interrupts (no MSI-X) Date: Tue, 9 Aug 2022 20:00:12 +0200 Message-Id: <20220809175513.753445598@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220809175513.082573955@linuxfoundation.org> References: <20220809175513.082573955@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michal Maloszewski [ Upstream commit 5fcbb711024aac6d4db385623e6f2fdf019f7782 ] Fix the inability to bring an interface up on a setup with only MSI interrupts enabled (no MSI-X). Solution is to add a default number of QPs = 1. This is enough, since without MSI-X support driver enables only a basic feature set. Fixes: bc6d33c8d93f ("i40e: Fix the number of queues available to be mapped for use") Signed-off-by: Dawid Lukwinski Signed-off-by: Michal Maloszewski Tested-by: Dave Switzer Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20220722175401.112572-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 3615c6533cf4..2f3b393e5506 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -1808,11 +1808,15 @@ static void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi, * non-zero req_queue_pairs says that user requested a new * queue count via ethtool's set_channels, so use this * value for queues distribution across traffic classes + * We need at least one queue pair for the interface + * to be usable as we see in else statement. */ if (vsi->req_queue_pairs > 0) vsi->num_queue_pairs = vsi->req_queue_pairs; else if (pf->flags & I40E_FLAG_MSIX_ENABLED) vsi->num_queue_pairs = pf->num_lan_msix; + else + vsi->num_queue_pairs = 1; } /* Number of queues per enabled TC */ -- 2.35.1