From patchwork Tue Jul 12 02:26:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 12914471 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46415C433EF for ; Tue, 12 Jul 2022 02:26:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230040AbiGLC0p (ORCPT ); Mon, 11 Jul 2022 22:26:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229926AbiGLC0l (ORCPT ); Mon, 11 Jul 2022 22:26:41 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F03CA32D8C for ; Mon, 11 Jul 2022 19:26:40 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id j3so6308506pfb.6 for ; Mon, 11 Jul 2022 19:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=d80lBoqTD646qmPEFeNUy2KDmedKwGNs/biUYzcz2gk=; b=VyN1OVd+NsiyWFaGLy5hh8eUD0gyl/vo7oOPy3bCuv8aH5qUyrG0NR1PGrmHx/2vwU GvKioDJr4PvJp0ctgWghhPg3Qj31qG5QfDLTz0MYmyrr1KZ8jvNh8ACoL8GndS6IOCTx cVldxHWQKEYqGm5jHq6XYklBM5Xj/7vqa9sg4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=d80lBoqTD646qmPEFeNUy2KDmedKwGNs/biUYzcz2gk=; b=6HLNPsKF9nQONA2vC5jjyZYQruff/Vy9NJJwjb/5bSQipTm22qzhq1zvxntVbcbE2p Um4AKlPcC5wn5k6y1Z7rPL5S7o/a0hjRH8xn02PVUXFyskMjdOH1xjSZCp+UPrC2CtVq ZErj8ZDt8eCAi7h9tub0G1B/YkrqLfmCjZbFv8CD59JvotdtZ7jIJG8HYkq6qMpHhsxv Aa21DcDJFVtWqavcu3koS2i+NAFdaBZFOG0mQcZR8Jxpmi3skFagDevdeuKbBmoH/LFN 6qnwjgQaKhnBUncIvzp458NpeK66k+coAHYZiBAQtcxYaWeirzPBqv++8JN5VHIQrgQk oi/Q== X-Gm-Message-State: AJIora/KjtjC0c6qcuMKuxJRacY8HkB5mlb3vAJ766v2715BAgK0EmSR VFcrKRCv2r1orRPtUHz41oWexQ== X-Google-Smtp-Source: AGRyM1tx/qJWY5P0MLYrgKr2ELfBv4H3VjRvd+nbqPkorK81FpbHVSJb5TAyGvamQGFzaziK57xKbA== X-Received: by 2002:a63:6c81:0:b0:3fd:4be3:8ee9 with SMTP id h123-20020a636c81000000b003fd4be38ee9mr17870494pgc.188.1657592800411; Mon, 11 Jul 2022 19:26:40 -0700 (PDT) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id p4-20020a62d004000000b0052878f66f8asm5443049pfg.132.2022.07.11.19.26.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jul 2022 19:26:39 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, kuba@kernel.org, gospo@broadcom.com, Vikas Gupta Subject: [PATCH net 3/5] bnxt_en: fix livepatch query Date: Mon, 11 Jul 2022 22:26:16 -0400 Message-Id: <1657592778-12730-4-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1657592778-12730-1-git-send-email-michael.chan@broadcom.com> References: <1657592778-12730-1-git-send-email-michael.chan@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Vikas Gupta In the livepatch query fw_target BNXT_FW_SRT_PATCH is applicable for P5 chips only. Fixes: 3c4153394e2c ("bnxt_en: implement firmware live patching") Reviewed-by: Saravanan Vajravel Reviewed-by: Somnath Kotur Signed-off-by: Vikas Gupta Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c index 3528ce9849e6..6b3d4f4c2a75 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c @@ -979,9 +979,11 @@ static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req, if (rc) return rc; - rc = bnxt_dl_livepatch_info_put(bp, req, BNXT_FW_SRT_PATCH); - if (rc) - return rc; + if (BNXT_CHIP_P5(bp)) { + rc = bnxt_dl_livepatch_info_put(bp, req, BNXT_FW_SRT_PATCH); + if (rc) + return rc; + } return bnxt_dl_livepatch_info_put(bp, req, BNXT_FW_CRT_PATCH); }