diff options
author | Santosh Vernekar <santosh.vernekar@qlogic.com> | 2013-08-23 03:40:19 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-09-03 10:27:57 -0400 |
commit | 4812d070f31badeae26aebc90856553a39539517 (patch) | |
tree | dce64dbb302c17b4b386c5d9f98ad4e8cf0a030c | |
parent | 41f79bde1d4e18fcd336dd5b6999ab9588daea54 (diff) |
[SCSI] qla4xxx: Fix the minidump data collection check in for loop
Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_nx.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c index c41362c29fc8..53c759fc48a0 100644 --- a/drivers/scsi/qla4xxx/ql4_nx.c +++ b/drivers/scsi/qla4xxx/ql4_nx.c | |||
@@ -2628,7 +2628,7 @@ static int qla4_8xxx_collect_md_data(struct scsi_qla_host *ha) | |||
2628 | 2628 | ||
2629 | /* Walk through the entry headers - validate/perform required action */ | 2629 | /* Walk through the entry headers - validate/perform required action */ |
2630 | for (i = 0; i < num_entry_hdr; i++) { | 2630 | for (i = 0; i < num_entry_hdr; i++) { |
2631 | if (data_collected >= ha->fw_dump_size) { | 2631 | if (data_collected > ha->fw_dump_size) { |
2632 | ql4_printk(KERN_INFO, ha, | 2632 | ql4_printk(KERN_INFO, ha, |
2633 | "Data collected: [0x%x], Total Dump size: [0x%x]\n", | 2633 | "Data collected: [0x%x], Total Dump size: [0x%x]\n", |
2634 | data_collected, ha->fw_dump_size); | 2634 | data_collected, ha->fw_dump_size); |
@@ -2753,9 +2753,7 @@ static int qla4_8xxx_collect_md_data(struct scsi_qla_host *ha) | |||
2753 | break; | 2753 | break; |
2754 | } | 2754 | } |
2755 | 2755 | ||
2756 | data_collected = (uint8_t *)data_ptr - | 2756 | data_collected = (uint8_t *)data_ptr - (uint8_t *)ha->fw_dump; |
2757 | ((uint8_t *)((uint8_t *)ha->fw_dump + | ||
2758 | ha->fw_dump_tmplt_size)); | ||
2759 | skip_nxt_entry: | 2757 | skip_nxt_entry: |
2760 | /* next entry in the template */ | 2758 | /* next entry in the template */ |
2761 | entry_hdr = (struct qla8xxx_minidump_entry_hdr *) | 2759 | entry_hdr = (struct qla8xxx_minidump_entry_hdr *) |
@@ -2763,7 +2761,7 @@ skip_nxt_entry: | |||
2763 | entry_hdr->entry_size); | 2761 | entry_hdr->entry_size); |
2764 | } | 2762 | } |
2765 | 2763 | ||
2766 | if ((data_collected + ha->fw_dump_tmplt_size) != ha->fw_dump_size) { | 2764 | if (data_collected != ha->fw_dump_size) { |
2767 | ql4_printk(KERN_INFO, ha, | 2765 | ql4_printk(KERN_INFO, ha, |
2768 | "Dump data mismatch: Data collected: [0x%x], total_data_size:[0x%x]\n", | 2766 | "Dump data mismatch: Data collected: [0x%x], total_data_size:[0x%x]\n", |
2769 | data_collected, ha->fw_dump_size); | 2767 | data_collected, ha->fw_dump_size); |