|
8 | 8 | * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. |
9 | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
10 | 10 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH |
| 11 | + * Copyright(c) 2018 Intel Corporation |
11 | 12 | * |
12 | 13 | * This program is free software; you can redistribute it and/or modify |
13 | 14 | * it under the terms of version 2 of the GNU General Public License as |
|
33 | 34 | * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. |
34 | 35 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
35 | 36 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH |
| 37 | + * Copyright(c) 2018 Intel Corporation |
36 | 38 | * All rights reserved. |
37 | 39 | * |
38 | 40 | * Redistribution and use in source and binary forms, with or without |
@@ -942,7 +944,6 @@ void iwl_fw_error_dump(struct iwl_fw_runtime *fwrt) |
942 | 944 |
|
943 | 945 | out: |
944 | 946 | iwl_fw_free_dump_desc(fwrt); |
945 | | - fwrt->dump.trig = NULL; |
946 | 947 | clear_bit(IWL_FWRT_STATUS_DUMPING, &fwrt->status); |
947 | 948 | IWL_DEBUG_INFO(fwrt, "WRT dump done\n"); |
948 | 949 | } |
@@ -1112,6 +1113,14 @@ void iwl_fw_error_dump_wk(struct work_struct *work) |
1112 | 1113 | fwrt->ops->dump_start(fwrt->ops_ctx)) |
1113 | 1114 | return; |
1114 | 1115 |
|
| 1116 | + if (fwrt->ops && fwrt->ops->fw_running && |
| 1117 | + !fwrt->ops->fw_running(fwrt->ops_ctx)) { |
| 1118 | + IWL_ERR(fwrt, "Firmware not running - cannot dump error\n"); |
| 1119 | + iwl_fw_free_dump_desc(fwrt); |
| 1120 | + clear_bit(IWL_FWRT_STATUS_DUMPING, &fwrt->status); |
| 1121 | + goto out; |
| 1122 | + } |
| 1123 | + |
1115 | 1124 | if (fwrt->trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) { |
1116 | 1125 | /* stop recording */ |
1117 | 1126 | iwl_fw_dbg_stop_recording(fwrt); |
@@ -1145,7 +1154,7 @@ void iwl_fw_error_dump_wk(struct work_struct *work) |
1145 | 1154 | iwl_write_prph(fwrt->trans, DBGC_OUT_CTRL, out_ctrl); |
1146 | 1155 | } |
1147 | 1156 | } |
1148 | | - |
| 1157 | +out: |
1149 | 1158 | if (fwrt->ops && fwrt->ops->dump_end) |
1150 | 1159 | fwrt->ops->dump_end(fwrt->ops_ctx); |
1151 | 1160 | } |
|
0 commit comments