Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2323304imm; Mon, 28 May 2018 06:04:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZotvohrouzuT476pXwJ4reXJ7ViptOmD7cTx/1Ph572ZMtfjMRXpNIIx5rwIseizx9CAb8z X-Received: by 2002:a65:65d2:: with SMTP id y18-v6mr10281048pgv.186.1527512682326; Mon, 28 May 2018 06:04:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527512682; cv=none; d=google.com; s=arc-20160816; b=QjZ8d0kDsNRTqChHD9VkaQ3xpN0O6CB7N3Z2E22XCvGWB1ZgpQV00UT7Z7QXBDr52c RArkI5jlDsCoqn4gxy/keVDdyWKvECuyKcX7V/ihip75BSw+l0kf+08QV83NRm1NLIVZ ErjZmiqCQzVB/BYMW4k0cSLVMo1cGoaAHBHLedGWZ9I7v586LMigIqo+pcaPQ6TfU15n v5FhX+wwsQ4+9jOs4lrWFiVELAiGGVk5xzX80SosakOyDgDJOf8ozwjkSrqTyOseF57T oVCveLxmpVYyzEtXHRDpIzp+PXj3JejODE+ZVrdfwU4LwamNrWo2HGSAqE66B1/swY+J EElw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=qNZz4QqSKFNq0iNlT3jhQZvad7jE3lfjEH9xs9jD7IU=; b=fAx1Tdr9Vq2e3otMhyh0f/AcJG2oZlyRHZQgZAOmCybAVmDm8IUCY+VWvBMo35kVYF lGSoWW/nC2MiYg1knNwzkCddqpi4odw227gkDrj5pW4ae/vfqsdpJ4bqb07pa6WRtVhs rCsqK0NrCuhE9Hn56KPape+Rq7sUHKYhaY6YpMAzza6dnyq+SPWBMBfdTFGKmwYkNLiH MrTl2o9pvJ14/ydhrV0sYKL5MieLbYK23814otA2gzrSQ9dcGPNnj8bHSQ9K66klgSZz 7yNeM3bLsrGhI8nyCif2DyG4XKTRfMPDJEjIPA+jXGv69rTaoyh5VNj/fxoM1oj7rWEX biqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Mc4f1n43; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f69-v6si284336pgc.551.2018.05.28.06.04.14; Mon, 28 May 2018 06:04:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Mc4f1n43; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1165120AbeE1NDa (ORCPT + 99 others); Mon, 28 May 2018 09:03:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:42288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164074AbeE1KxD (ORCPT ); Mon, 28 May 2018 06:53:03 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A65DF204EE; Mon, 28 May 2018 10:53:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504783; bh=iG4ALx5yGwtRr76GKDVOgDcn2U5k0H0WztzbqhI7V7g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mc4f1n43tunDS08W4Y/AuVpL7aMjJD44rDfDJc4m1/hjU/TdigMdiDVGdUos9aro3 1am1VZjkC7ofd6Yj83VM+1bKN1QQqX2M59UnRx2oeE3JpkOeYaGI0GRdxkbz1aNVBd GUmwXihYDLkWB+qNpWvK58XxmAJsNNcK4r2CZ6co= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 245/496] bnxt_en: Check valid VNIC ID in bnxt_hwrm_vnic_set_tpa(). Date: Mon, 28 May 2018 12:00:30 +0200 Message-Id: <20180528100330.224375339@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Chan [ Upstream commit 3c4fe80b32c685bdc02b280814d0cfe80d441c72 ] During initialization, if we encounter errors, there is a code path that calls bnxt_hwrm_vnic_set_tpa() with invalid VNIC ID. This may cause a warning in firmware logs. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -3808,6 +3808,9 @@ static int bnxt_hwrm_vnic_set_tpa(struct struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id]; struct hwrm_vnic_tpa_cfg_input req = {0}; + if (vnic->fw_vnic_id == INVALID_HW_RING_ID) + return 0; + bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_TPA_CFG, -1, -1); if (tpa_flags) {