]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Fix devlink NVRAM related byte order related issues.
authorMichael Chan <michael.chan@broadcom.com>
Mon, 21 Oct 2019 05:34:26 +0000 (01:34 -0400)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 22 Oct 2019 20:15:39 +0000 (13:15 -0700)
commitb7641ac3458527aa760e99ac59d481caae0cb8a3
treee362782c6b91e4cb6ebff7dba534dfcf8af2a203
parentecea07171e28f0370fee7589d31b316399c5d1f7
bnxt_en: Fix devlink NVRAM related byte order related issues.

The current code does not do endian swapping between the devlink
parameter and the internal NVRAM representation.  Define a union to
represent the little endian NVRAM data and add 2 helper functions to
copy to and from the NVRAM data with the proper byte swapping.

Fixes: 17bfdc4dd1eb ("bnxt_en: Add bnxt_en initial port params table and register it")
Cc: Jiri Pirko <jiri@mellanox.com>
Reviewed-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