diff options
author | Rajesh Borundia <rajesh.borundia@qlogic.com> | 2013-06-22 04:12:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-23 21:29:59 -0400 |
commit | 486a5bc77a4a83d29b72b17fde229e45a2428194 (patch) | |
tree | e722558c9c9f650cb0df41ccf884396aadff6a7b /drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | |
parent | 8af3f33db05c6d0146ad14905145a5c923770856 (diff) |
qlcnic: Add support for 83xx suspend and resume.
o Implement shutdown and resume handlers for 83xx.
o Refactor 82xx shutdown and resume handlers.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c index e2d04d5cb9b0..f41dfab1e9a3 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | |||
@@ -606,7 +606,7 @@ static int qlcnic_83xx_idc_check_fan_failure(struct qlcnic_adapter *adapter) | |||
606 | return 0; | 606 | return 0; |
607 | } | 607 | } |
608 | 608 | ||
609 | static int qlcnic_83xx_idc_reattach_driver(struct qlcnic_adapter *adapter) | 609 | int qlcnic_83xx_idc_reattach_driver(struct qlcnic_adapter *adapter) |
610 | { | 610 | { |
611 | int err; | 611 | int err; |
612 | 612 | ||
@@ -1135,7 +1135,7 @@ qlcnic_83xx_idc_first_to_load_function_handler(struct qlcnic_adapter *adapter) | |||
1135 | return 0; | 1135 | return 0; |
1136 | } | 1136 | } |
1137 | 1137 | ||
1138 | static int qlcnic_83xx_idc_init(struct qlcnic_adapter *adapter) | 1138 | int qlcnic_83xx_idc_init(struct qlcnic_adapter *adapter) |
1139 | { | 1139 | { |
1140 | int ret = -EIO; | 1140 | int ret = -EIO; |
1141 | 1141 | ||
@@ -1554,9 +1554,18 @@ static int qlcnic_83xx_reset_template_checksum(struct qlcnic_adapter *p_dev) | |||
1554 | 1554 | ||
1555 | int qlcnic_83xx_get_reset_instruction_template(struct qlcnic_adapter *p_dev) | 1555 | int qlcnic_83xx_get_reset_instruction_template(struct qlcnic_adapter *p_dev) |
1556 | { | 1556 | { |
1557 | u8 *p_buff; | ||
1558 | u32 addr, count; | ||
1559 | struct qlcnic_hardware_context *ahw = p_dev->ahw; | 1557 | struct qlcnic_hardware_context *ahw = p_dev->ahw; |
1558 | u32 addr, count, prev_ver, curr_ver; | ||
1559 | u8 *p_buff; | ||
1560 | |||
1561 | if (ahw->reset.buff != NULL) { | ||
1562 | prev_ver = p_dev->fw_version; | ||
1563 | curr_ver = qlcnic_83xx_get_fw_version(p_dev); | ||
1564 | if (curr_ver > prev_ver) | ||
1565 | kfree(ahw->reset.buff); | ||
1566 | else | ||
1567 | return 0; | ||
1568 | } | ||
1560 | 1569 | ||
1561 | ahw->reset.seq_error = 0; | 1570 | ahw->reset.seq_error = 0; |
1562 | ahw->reset.buff = kzalloc(QLC_83XX_RESTART_TEMPLATE_SIZE, GFP_KERNEL); | 1571 | ahw->reset.buff = kzalloc(QLC_83XX_RESTART_TEMPLATE_SIZE, GFP_KERNEL); |