summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLalit Chandivade2012-02-13 14:00:42 +0100
committerJames Bottomley2012-02-19 16:31:46 +0100
commit20e835b43f3f81e29f34e06099a47285ffebe688 (patch)
treef0c82c1b7bf68d7496369b0480e92d720e9bb092
parent[SCSI] qla4xxx: Fix un-necessary delay on invalid DDB (diff)
downloadkernel-qcow2-linux-20e835b43f3f81e29f34e06099a47285ffebe688.tar.gz
kernel-qcow2-linux-20e835b43f3f81e29f34e06099a47285ffebe688.tar.xz
kernel-qcow2-linux-20e835b43f3f81e29f34e06099a47285ffebe688.zip
[SCSI] qla4xxx: Fix verify boot idx correctly
qla4xxx_verify_boot_idx can falsely report a DDB to be boot target if ha->pri_ddb_idx and ha->sec_ddb_idx are not initialized correctly. What this could cause is if there is DDB entry in FLash at index 0, then qla4xxx_verify_boot_idx would return wrong result as ha->pri_ddb_idx is not set correctly. Fixed the qla4xxx_get_boot_info to set the ha->pri_ddb_idx and ha->sec_ddb_idx correctly. Signed-off-by: Lalit Chandivade <lalit.chandivade@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_os.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 089443add47f..a9ff05e24f34 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -3463,12 +3463,11 @@ static int get_fw_boot_info(struct scsi_qla_host *ha, uint16_t ddb_index[])
" target ID %d\n", __func__, ddb_index[0],
ddb_index[1]));
- ha->pri_ddb_idx = ddb_index[0];
- ha->sec_ddb_idx = ddb_index[1];
-
exit_boot_info_free:
dma_free_coherent(&ha->pdev->dev, size, buf, buf_dma);
exit_boot_info:
+ ha->pri_ddb_idx = ddb_index[0];
+ ha->sec_ddb_idx = ddb_index[1];
return ret;
}