diff options
author | Sony Chacko <sony.chacko@qlogic.com> | 2013-01-01 03:20:25 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-02 02:43:27 -0800 |
commit | 81d0aeb0a4fff6c274f956644a837caac14a7c21 (patch) | |
tree | 1e6c0714c981a94bbadaa3981fa3897f94fd688f /drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | |
parent | 629263acaea3613a7da4d602ac1d143533d251cc (diff) |
qlcnic: flash template based firmware reset recovery
Flash template provides instructions to stop, restart and initalize the
firmware. These instructions are abstracted as a series of read, write and
poll operations on hardware registers. Register information and operation
specifics are not exposed to the driver. Driver reads the template from
flash and executes the instructions located at pre-defined offsets.
Template based firmware reset recovery and initialization mechanism minimize
driver changes as firmware evolves.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h index 99b84277b86..969bda8e32c 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h @@ -77,6 +77,8 @@ #define QLC_83XX_BOOT_FROM_FLASH 0 #define QLC_83XX_BOOT_FROM_FILE 0x12345678 +#define QLC_83XX_MAX_RESET_SEQ_ENTRIES 16 + struct qlcnic_intrpt_config { u8 type; u8 enabled; @@ -98,6 +100,20 @@ struct qlc_83xx_fw_info { u8 load_from_file; }; +struct qlc_83xx_reset { + struct qlc_83xx_reset_hdr *hdr; + int seq_index; + int seq_error; + int array_index; + u32 array[QLC_83XX_MAX_RESET_SEQ_ENTRIES]; + u8 *buff; + u8 *stop_offset; + u8 *start_offset; + u8 *init_offset; + u8 seq_end; + u8 template_end; +}; + #define QLC_83XX_IDC_DISABLE_FW_RESET_RECOVERY 0x1 #define QLC_83XX_IDC_GRACEFULL_RESET 0x2 #define QLC_83XX_IDC_TIMESTAMP 0 @@ -377,6 +393,7 @@ int qlcnic_83xx_init(struct qlcnic_adapter *); int qlcnic_83xx_idc_ready_state_entry(struct qlcnic_adapter *); int qlcnic_83xx_check_hw_status(struct qlcnic_adapter *p_dev); void qlcnic_83xx_idc_poll_dev_state(struct work_struct *); +int qlcnic_83xx_get_reset_instruction_template(struct qlcnic_adapter *); void qlcnic_83xx_idc_exit(struct qlcnic_adapter *); void qlcnic_83xx_idc_request_reset(struct qlcnic_adapter *, u32); int qlcnic_83xx_lock_driver(struct qlcnic_adapter *); |