Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1957174imn; Mon, 1 Aug 2022 06:16:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR72VBLZBsuvfpr+5Gmc3MZ5vqsstx3yOcUKbe9LrF94hWrk3JWbJ6q5oGOEXmZvGqwN3mfR X-Received: by 2002:a63:89c2:0:b0:41b:b485:79e8 with SMTP id v185-20020a6389c2000000b0041bb48579e8mr9941109pgd.343.1659359815485; Mon, 01 Aug 2022 06:16:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659359815; cv=none; d=google.com; s=arc-20160816; b=ffJ+VcLdUpIj6c48oQckMIgyiHsBvHHAhpdg39LO0lA7pvrrXEbmS1thkAb/f0s3J4 tpI5J0kHNrBcBktDXN+oL7KpcPZ4R7x3k67ea3iAVX/GRUfZEqGHJM3E0jTwRDutBKiD RsQU+YTh4M+/ltm/KPksgBeAZk22aWm1K29NHOajHD7rlsqPLMexuHCzCoroBLkZ515a 0WFaE9STQEfYGKrvBeB5lXy0NccTLfcefyAAFHsaMeldBQwRc17A9/RP8woz6gTDMNj7 k8J/NCofyC+x8Q3DBt+CiGP64a9Oh9Z541bJ1xwUiIgimNKcGA7Yht92oIrVIc+Zn/n9 1UbA== 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=S76jr3vvlPeZUOiV+9DC35rpMJnk4HwsRQyIemukAGM=; b=y9ov8qthj6EjrK81bD0BT687I/2NlPtOLIcA6Xq8sxqjruqUkVW3Apsi9FAz/JQE/I t9TyU32HYIwriLYemqItA6fljfWHUCRTuxHbd72mt/iiNLXDHczMAnWsFSPNBTqWYc9P 9GJyoGLB88mV0MVbWkQjXZUaJSQjkYh/3Sl/T2gPWpmOd6RhSKcgSCAFYMpNOBeXUxti 8mV2/O9+h5INP8W4kv+iySMjqkdbPX2Nb18iiAbgzRNFxyURFD17JTxELmhAnMUWNX2E FTGvkfSYyQ051sg668AXUUp1m0i6GKB/SEEgvlO//nlahdldm/Pp9IflzbkdwChJY4+X BKPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jPJxKDWC; 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 b13-20020a056a000a8d00b00528c2953d22si8249518pfl.157.2022.08.01.06.16.40; Mon, 01 Aug 2022 06:16:55 -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=jPJxKDWC; 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 S231816AbiHALuG (ORCPT + 99 others); Mon, 1 Aug 2022 07:50:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231721AbiHALtO (ORCPT ); Mon, 1 Aug 2022 07:49:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 038563ED67; Mon, 1 Aug 2022 04:48:44 -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 D84DA612C6; Mon, 1 Aug 2022 11:48:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB741C433C1; Mon, 1 Aug 2022 11:48:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1659354523; bh=UMWnBXZ/6z15jkJ5TpcjEq0X7QC9NJWGksPHannIGe0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jPJxKDWCjCURDSAuQ2SOa7rDthb004TNeRs1UgAAF95B7Mz9yCaT1YEcfneHWkG9T s/njbKJejOZxZXRPlXHHkcOaQl2EDMRuYBcKfO49nraLmhjArvxqTA2StR4Tyfwcz7 vtkHQ6a9YJ0Hzk+BaKw+6tx1DXz4OrnV2b0xWKlw= 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 5.4 25/34] i40e: Fix interface init with MSI interrupts (no MSI-X) Date: Mon, 1 Aug 2022 13:47:05 +0200 Message-Id: <20220801114128.986934341@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220801114128.025615151@linuxfoundation.org> References: <20220801114128.025615151@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 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 0610d344fdbf..637f6ed78b48 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -1821,11 +1821,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