aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic.h
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit@netxen.com>2009-10-24 12:03:58 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-28 07:10:16 -0400
commitf50330f90b9aa42b7058650ce66b85f1b443ab11 (patch)
treed980282844c3636e60d6408984a52e613a88a530 /drivers/net/netxen/netxen_nic.h
parent516b4df1ce49304c188704decf60275c72d4cae1 (diff)
netxen: support for new firmware file format
Add support for extracting firmware from a unified file format which embeds firmware images for all chip revisions. Fallback to orginal file formats if new image is not found. Signed-off-by: Amit Kumar Salecha <amit@netxen.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen/netxen_nic.h')
-rw-r--r--drivers/net/netxen/netxen_nic.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index e98cfa6baa8f..5ba923bd9d77 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -421,6 +421,34 @@ struct status_desc {
421 __le64 status_desc_data[2]; 421 __le64 status_desc_data[2];
422} __attribute__ ((aligned(16))); 422} __attribute__ ((aligned(16)));
423 423
424/* UNIFIED ROMIMAGE *************************/
425#define NX_UNI_FW_MIN_SIZE 0x3eb000
426#define NX_UNI_DIR_SECT_PRODUCT_TBL 0x0
427#define NX_UNI_DIR_SECT_BOOTLD 0x6
428#define NX_UNI_DIR_SECT_FW 0x7
429
430/*Offsets */
431#define NX_UNI_CHIP_REV_OFF 10
432#define NX_UNI_FLAGS_OFF 11
433#define NX_UNI_BIOS_VERSION_OFF 12
434#define NX_UNI_BOOTLD_IDX_OFF 27
435#define NX_UNI_FIRMWARE_IDX_OFF 29
436
437struct uni_table_desc{
438 uint32_t findex;
439 uint32_t num_entries;
440 uint32_t entry_size;
441 uint32_t reserved[5];
442};
443
444struct uni_data_desc{
445 uint32_t findex;
446 uint32_t size;
447 uint32_t reserved[5];
448};
449
450/* UNIFIED ROMIMAGE *************************/
451
424/* The version of the main data structure */ 452/* The version of the main data structure */
425#define NETXEN_BDINFO_VERSION 1 453#define NETXEN_BDINFO_VERSION 1
426 454
@@ -487,7 +515,9 @@ struct status_desc {
487#define NX_P2_MN_ROMIMAGE 0 515#define NX_P2_MN_ROMIMAGE 0
488#define NX_P3_CT_ROMIMAGE 1 516#define NX_P3_CT_ROMIMAGE 1
489#define NX_P3_MN_ROMIMAGE 2 517#define NX_P3_MN_ROMIMAGE 2
490#define NX_FLASH_ROMIMAGE 3 518#define NX_UNIFIED_ROMIMAGE 3
519#define NX_FLASH_ROMIMAGE 4
520#define NX_UNKNOWN_ROMIMAGE 0xff
491 521
492extern char netxen_nic_driver_name[]; 522extern char netxen_nic_driver_name[];
493 523
@@ -1210,7 +1240,7 @@ struct netxen_adapter {
1210 nx_nic_intr_coalesce_t coal; 1240 nx_nic_intr_coalesce_t coal;
1211 1241
1212 unsigned long state; 1242 unsigned long state;
1213 u32 resv5; 1243 __le32 file_prd_off; /*File fw product offset*/
1214 u32 fw_version; 1244 u32 fw_version;
1215 const struct firmware *fw; 1245 const struct firmware *fw;
1216}; 1246};