Skip to content

Commit 002870e

Browse files
Vasundhara Volamdavem330
authored andcommitted
bnxt_en: Register devlink irrespective of firmware spec version
This will allow to register for devlink port and use port features. Also register params only if firmware spec version is at least 0x10600 which will support reading/setting numbered variables in NVRAM. Signed-off-by: Vasundhara Volam <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d6292ad commit 002870e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,9 @@ static int bnxt_dl_params_register(struct bnxt *bp)
489489
{
490490
int rc;
491491

492+
if (bp->hwrm_spec_code < 0x10600)
493+
return 0;
494+
492495
rc = devlink_params_register(bp->dl, bnxt_dl_params,
493496
ARRAY_SIZE(bnxt_dl_params));
494497
if (rc) {
@@ -511,6 +514,9 @@ static int bnxt_dl_params_register(struct bnxt *bp)
511514

512515
static void bnxt_dl_params_unregister(struct bnxt *bp)
513516
{
517+
if (bp->hwrm_spec_code < 0x10600)
518+
return;
519+
514520
devlink_params_unregister(bp->dl, bnxt_dl_params,
515521
ARRAY_SIZE(bnxt_dl_params));
516522
devlink_port_params_unregister(&bp->dl_port, bnxt_dl_port_params,
@@ -522,11 +528,6 @@ int bnxt_dl_register(struct bnxt *bp)
522528
struct devlink *dl;
523529
int rc;
524530

525-
if (bp->hwrm_spec_code < 0x10600) {
526-
netdev_warn(bp->dev, "Firmware does not support NVM params");
527-
return -ENOTSUPP;
528-
}
529-
530531
if (BNXT_PF(bp))
531532
dl = devlink_alloc(&bnxt_dl_ops, sizeof(struct bnxt_dl));
532533
else

0 commit comments

Comments
 (0)