|
19 | 19 | #include <linux/bcd.h>
|
20 | 20 | #include <linux/reboot.h>
|
21 | 21 | #include <linux/cciss_ioctl.h>
|
| 22 | +#include <linux/crash_dump.h> |
22 | 23 | #include <scsi/scsi_host.h>
|
23 | 24 | #include <scsi/scsi_cmnd.h>
|
24 | 25 | #include <scsi/scsi_device.h>
|
@@ -5246,7 +5247,7 @@ static void pqi_calculate_io_resources(struct pqi_ctrl_info *ctrl_info)
|
5246 | 5247 | ctrl_info->error_buffer_length =
|
5247 | 5248 | ctrl_info->max_io_slots * PQI_ERROR_BUFFER_ELEMENT_LENGTH;
|
5248 | 5249 |
|
5249 |
| - if (reset_devices) |
| 5250 | + if (is_kdump_kernel()) |
5250 | 5251 | max_transfer_size = min(ctrl_info->max_transfer_size,
|
5251 | 5252 | PQI_MAX_TRANSFER_SIZE_KDUMP);
|
5252 | 5253 | else
|
@@ -5275,7 +5276,7 @@ static void pqi_calculate_queue_resources(struct pqi_ctrl_info *ctrl_info)
|
5275 | 5276 | u16 num_elements_per_iq;
|
5276 | 5277 | u16 num_elements_per_oq;
|
5277 | 5278 |
|
5278 |
| - if (reset_devices) { |
| 5279 | + if (is_kdump_kernel()) { |
5279 | 5280 | num_queue_groups = 1;
|
5280 | 5281 | } else {
|
5281 | 5282 | int num_cpus;
|
@@ -8288,12 +8289,12 @@ static int pqi_ctrl_init(struct pqi_ctrl_info *ctrl_info)
|
8288 | 8289 | u32 product_id;
|
8289 | 8290 |
|
8290 | 8291 | if (reset_devices) {
|
8291 |
| - if (pqi_is_fw_triage_supported(ctrl_info)) { |
| 8292 | + if (is_kdump_kernel() && pqi_is_fw_triage_supported(ctrl_info)) { |
8292 | 8293 | rc = sis_wait_for_fw_triage_completion(ctrl_info);
|
8293 | 8294 | if (rc)
|
8294 | 8295 | return rc;
|
8295 | 8296 | }
|
8296 |
| - if (sis_is_ctrl_logging_supported(ctrl_info)) { |
| 8297 | + if (is_kdump_kernel() && sis_is_ctrl_logging_supported(ctrl_info)) { |
8297 | 8298 | sis_notify_kdump(ctrl_info);
|
8298 | 8299 | rc = sis_wait_for_ctrl_logging_completion(ctrl_info);
|
8299 | 8300 | if (rc)
|
@@ -8344,7 +8345,7 @@ static int pqi_ctrl_init(struct pqi_ctrl_info *ctrl_info)
|
8344 | 8345 | ctrl_info->product_id = (u8)product_id;
|
8345 | 8346 | ctrl_info->product_revision = (u8)(product_id >> 8);
|
8346 | 8347 |
|
8347 |
| - if (reset_devices) { |
| 8348 | + if (is_kdump_kernel()) { |
8348 | 8349 | if (ctrl_info->max_outstanding_requests >
|
8349 | 8350 | PQI_MAX_OUTSTANDING_REQUESTS_KDUMP)
|
8350 | 8351 | ctrl_info->max_outstanding_requests =
|
@@ -8480,7 +8481,7 @@ static int pqi_ctrl_init(struct pqi_ctrl_info *ctrl_info)
|
8480 | 8481 | if (rc)
|
8481 | 8482 | return rc;
|
8482 | 8483 |
|
8483 |
| - if (ctrl_info->ctrl_logging_supported && !reset_devices) { |
| 8484 | + if (ctrl_info->ctrl_logging_supported && !is_kdump_kernel()) { |
8484 | 8485 | pqi_host_setup_buffer(ctrl_info, &ctrl_info->ctrl_log_memory, PQI_CTRL_LOG_TOTAL_SIZE, PQI_CTRL_LOG_MIN_SIZE);
|
8485 | 8486 | pqi_host_memory_update(ctrl_info, &ctrl_info->ctrl_log_memory, PQI_VENDOR_GENERAL_CTRL_LOG_MEMORY_UPDATE);
|
8486 | 8487 | }
|
|
0 commit comments