]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Fix the logic that creates the health reporters.
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Tue, 10 Dec 2019 07:49:12 +0000 (02:49 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Dec 2019 01:37:14 +0000 (17:37 -0800)
commit635589fb0eef68743940174408d825acb0e3e6c2
treefff2be98cc9f39c892ebba9d43f416c7ddebaa4e
parent649a01efdeb3dc4caa05d18c8a08cc01b4c637ed
bnxt_en: Fix the logic that creates the health reporters.

Fix the logic to properly check the fw capabilities and create the
devlink health reporters only when needed.  The current code creates
the reporters unconditionally as long as bp->fw_health is valid, and
that's not correct.

Call bnxt_dl_fw_reporters_create() directly from the init and reset
code path instead of from bnxt_dl_register().  This allows the
reporters to be adjusted when capabilities change.  The same
applies to bnxt_dl_fw_reporters_destroy().

Fixes: 4057b29afa33 ("bnxt_en: Add new FW devlink_health_reporter")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h