diff options
author | Vipul Pandya <vipul@chelsio.com> | 2012-09-26 02:39:42 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-27 17:55:51 -0400 |
commit | 26f7cbc0a5a42d8cc0c7725d10317089a8215f97 (patch) | |
tree | ea8498d1b103a49406e535bf14c0458a0f10fb81 /drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | |
parent | 1648a22b16ab05bd99dd8e2f33ca80bbcea60031 (diff) | |
download | lwn-26f7cbc0a5a42d8cc0c7725d10317089a8215f97.tar.gz lwn-26f7cbc0a5a42d8cc0c7725d10317089a8215f97.zip |
cxgb4: Don't attempt to upgrade T4 firmware when cxgb4 will end up as a slave
This patch adds a new common code routine to upgrade an adapter's
firmware. This routine handles all of the complexities of working with the
the existing adapter firmware in order to quiesce the adapter and uP, etc.
For an automatic upgrade it will send a HELLO command to check if cxgb4
want/can upgrade firmware, i.e. if cxgb4 is MASTER and has newer firmware
that it wants to load and call the new common code routine t4_fw_upgrade.
Note that it should not issue a RESET command after a successful firmware
upgrade.
Signed-off-by: Jay Hernandez <jay@chelsio.com>
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h b/drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h index b1d556128f84..a6364632b490 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h +++ b/drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h @@ -317,9 +317,15 @@ struct fw_reset_cmd { __be32 op_to_write; __be32 retval_len16; __be32 val; - __be32 r3; + __be32 halt_pkd; }; +#define FW_RESET_CMD_HALT_SHIFT 31 +#define FW_RESET_CMD_HALT_MASK 0x1 +#define FW_RESET_CMD_HALT(x) ((x) << FW_RESET_CMD_HALT_SHIFT) +#define FW_RESET_CMD_HALT_GET(x) \ + (((x) >> FW_RESET_CMD_HALT_SHIFT) & FW_RESET_CMD_HALT_MASK) + enum fw_hellow_cmd { fw_hello_cmd_stage_os = 0x0 }; @@ -1648,6 +1654,7 @@ struct fw_debug_cmd { #define FW_PCIE_FW_ERR (1U << 31) #define FW_PCIE_FW_INIT (1U << 30) +#define FW_PCIE_FW_HALT (1U << 29) #define FW_PCIE_FW_MASTER_VLD (1U << 15) #define FW_PCIE_FW_MASTER_MASK 0x7 #define FW_PCIE_FW_MASTER_SHIFT 12 @@ -1669,7 +1676,11 @@ struct fw_hdr { u8 intfver_iscsi; u8 intfver_fcoe; u8 reserved2; - __be32 reserved3[27]; + __u32 reserved3; + __u32 reserved4; + __u32 reserved5; + __be32 flags; + __be32 reserved6[23]; }; #define FW_HDR_FW_VER_MAJOR_GET(x) (((x) >> 24) & 0xff) @@ -1677,4 +1688,8 @@ struct fw_hdr { #define FW_HDR_FW_VER_MICRO_GET(x) (((x) >> 8) & 0xff) #define FW_HDR_FW_VER_BUILD_GET(x) (((x) >> 0) & 0xff) +enum fw_hdr_flags { + FW_HDR_FLAGS_RESET_HALT = 0x00000001, +}; + #endif /* _T4FW_INTERFACE_H_ */ |