]> git.baikalelectronics.ru Git - kernel.git/commitdiff
bnxt_en: fix livepatch query
authorVikas Gupta <vikas.gupta@broadcom.com>
Tue, 12 Jul 2022 02:26:16 +0000 (22:26 -0400)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Jul 2022 03:35:55 +0000 (20:35 -0700)
In the livepatch query fw_target BNXT_FW_SRT_PATCH is
applicable for P5 chips only.

Fixes: 4fe42bdf4f21 ("bnxt_en: implement firmware live patching")
Reviewed-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c

index 3528ce9849e6f45654c7026a82661f7eaf9b2a01..6b3d4f4c2a75f3425ed9e515c05ac9a3c5d53d52 100644 (file)
@@ -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);
 
 }