diff options
author | Tej Parkash <tej.parkash@qlogic.com> | 2013-12-16 06:49:44 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2014-03-15 13:19:14 -0400 |
commit | 58e2bbe9851668a031afc678433040f6eaea4cb3 (patch) | |
tree | 7ae31c4c299f9607e834c2b72aae30351c1a74d9 | |
parent | 61d9a2b61490f6e121abbe6275ac93cf608f087e (diff) |
[SCSI] qla4xxx: Driver not able to collect minidump for ISP84xx
Issue:
minidump data collection fails as driver reports data mismatch
Fix:
When the driver encounters a new entry type that it cannot process,
it should just skip the entry and adjust the total buffer size by
subtracting the skipped bytes from it. This is to ensure that there
is no data mismatch because of the new entries.
Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_def.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_nx.c | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h index c2deaa008558..73a502288bde 100644 --- a/drivers/scsi/qla4xxx/ql4_def.h +++ b/drivers/scsi/qla4xxx/ql4_def.h | |||
@@ -769,6 +769,7 @@ struct scsi_qla_host { | |||
769 | uint32_t fw_dump_capture_mask; | 769 | uint32_t fw_dump_capture_mask; |
770 | void *fw_dump_tmplt_hdr; | 770 | void *fw_dump_tmplt_hdr; |
771 | uint32_t fw_dump_tmplt_size; | 771 | uint32_t fw_dump_tmplt_size; |
772 | uint32_t fw_dump_skip_size; | ||
772 | 773 | ||
773 | struct completion mbx_intr_comp; | 774 | struct completion mbx_intr_comp; |
774 | 775 | ||
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c index bcf3e43e024a..d2040b49120a 100644 --- a/drivers/scsi/qla4xxx/ql4_nx.c +++ b/drivers/scsi/qla4xxx/ql4_nx.c | |||
@@ -2383,6 +2383,11 @@ static void qla4_8xxx_mark_entry_skipped(struct scsi_qla_host *ha, | |||
2383 | "scsi(%ld): Skipping entry[%d]: ETYPE[0x%x]-ELEVEL[0x%x]\n", | 2383 | "scsi(%ld): Skipping entry[%d]: ETYPE[0x%x]-ELEVEL[0x%x]\n", |
2384 | ha->host_no, index, entry_hdr->entry_type, | 2384 | ha->host_no, index, entry_hdr->entry_type, |
2385 | entry_hdr->d_ctrl.entry_capture_mask)); | 2385 | entry_hdr->d_ctrl.entry_capture_mask)); |
2386 | /* If driver encounters a new entry type that it cannot process, | ||
2387 | * it should just skip the entry and adjust the total buffer size by | ||
2388 | * from subtracting the skipped bytes from it | ||
2389 | */ | ||
2390 | ha->fw_dump_skip_size += entry_hdr->entry_capture_size; | ||
2386 | } | 2391 | } |
2387 | 2392 | ||
2388 | /* ISP83xx functions to process new minidump entries... */ | 2393 | /* ISP83xx functions to process new minidump entries... */ |
@@ -2590,6 +2595,7 @@ static int qla4_8xxx_collect_md_data(struct scsi_qla_host *ha) | |||
2590 | uint64_t now; | 2595 | uint64_t now; |
2591 | uint32_t timestamp; | 2596 | uint32_t timestamp; |
2592 | 2597 | ||
2598 | ha->fw_dump_skip_size = 0; | ||
2593 | if (!ha->fw_dump) { | 2599 | if (!ha->fw_dump) { |
2594 | ql4_printk(KERN_INFO, ha, "%s(%ld) No buffer to dump\n", | 2600 | ql4_printk(KERN_INFO, ha, "%s(%ld) No buffer to dump\n", |
2595 | __func__, ha->host_no); | 2601 | __func__, ha->host_no); |
@@ -2761,7 +2767,7 @@ skip_nxt_entry: | |||
2761 | entry_hdr->entry_size); | 2767 | entry_hdr->entry_size); |
2762 | } | 2768 | } |
2763 | 2769 | ||
2764 | if (data_collected != ha->fw_dump_size) { | 2770 | if ((data_collected + ha->fw_dump_skip_size) != ha->fw_dump_size) { |
2765 | ql4_printk(KERN_INFO, ha, | 2771 | ql4_printk(KERN_INFO, ha, |
2766 | "Dump data mismatch: Data collected: [0x%x], total_data_size:[0x%x]\n", | 2772 | "Dump data mismatch: Data collected: [0x%x], total_data_size:[0x%x]\n", |
2767 | data_collected, ha->fw_dump_size); | 2773 | data_collected, ha->fw_dump_size); |