From 5d3acd0d161012caee0a8be2d03ac04ba901df09 Mon Sep 17 00:00:00 2001 From: Vasundhara Volam Date: Fri, 6 Feb 2015 08:18:37 -0500 Subject: be2net: refactor code that checks flash file compatibility This patch re-factors the code that checks for flash file compatibility with the chip type, for better readability, as follows: - be_get_ufi_type() returns the UFI type from the flash file - be_check_ufi_compatibility() checks if the UFI type is compatible with the adapter/chip that is being flashed Signed-off-by: Vasundhara Volam Signed-off-by: Sathya Perla Signed-off-by: David S. Miller --- drivers/net/ethernet/emulex/benet/be_cmds.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/net/ethernet/emulex/benet/be_cmds.h') diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.h b/drivers/net/ethernet/emulex/benet/be_cmds.h index c231e45e7070..bed4a32c41f3 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.h +++ b/drivers/net/ethernet/emulex/benet/be_cmds.h @@ -1091,6 +1091,9 @@ struct be_cmd_req_query_fw_cfg { u32 rsvd[31]; }; +/* ASIC revisions */ +#define ASIC_REV_B0 0x10 + struct be_cmd_resp_query_fw_cfg { struct be_cmd_resp_hdr hdr; u32 be_config_number; @@ -1260,6 +1263,11 @@ struct flash_file_hdr_g2 { u8 build[24]; }; +/* First letter of the build version of the image */ +#define BLD_STR_UFI_TYPE_BE2 '2' +#define BLD_STR_UFI_TYPE_BE3 '3' +#define BLD_STR_UFI_TYPE_SH '4' + struct flash_file_hdr_g3 { u8 sign[52]; u8 ufi_version[4]; -- cgit v1.2.3-59-g8ed1b