]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Fix the size of devlink MSIX parameters.
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Mon, 21 Oct 2019 05:34:25 +0000 (01:34 -0400)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 22 Oct 2019 20:15:39 +0000 (13:15 -0700)
commit15e7a7ab8d9022b4a13aae7c2d86076dcf511dc0
treec5be412439b3c5dfb46a734f6a9333ec590417e1
parentfaf378e66e8d8738f122ab15302096dfb7e9a0db
bnxt_en: Fix the size of devlink MSIX parameters.

The current code that rounds up the NVRAM parameter bit size to the next
byte size for the devlink parameter is not always correct.  The MSIX
devlink parameters are 4 bytes and we don't get the correct size
using this method.

Fix it by adding a new dl_num_bytes member to the bnxt_dl_nvm_param
structure which statically provides bytesize information according
to the devlink parameter type definition.

Fixes: 3884ca8f2d71 ("bnxt_en: Add bnxt_en initial port params table and register it")
Cc: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h