aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorJoe Carnuccio <joe.carnuccio@qlogic.com>2009-01-22 12:45:36 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-01-25 08:58:37 -0500
commitb872ca4081c480e3d76443282ffd7f206321f50f (patch)
treeb44b7f7bb71ff181103d6e92ed07b9b8532ab2dd /drivers/scsi/qla2xxx
parent2ac4b64f7483f3684a423b21ac4e687827f7eb62 (diff)
[SCSI] qla2xxx: Correct descriptions in flash manipulation routines.
When clearing the flash device's SR, the comment is incorrect... clearing the SR is 2 steps: 1. the SR protect bit is 1, so the first write zero clears only that bit, 2. the SR protect bit is now 0, so the next write zero clears the remaining bits. The sector erase debug print more correctly identifies that the erase failed. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_sup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
index ed9582603afa..9c3b694c049d 100644
--- a/drivers/scsi/qla2xxx/qla_sup.c
+++ b/drivers/scsi/qla2xxx/qla_sup.c
@@ -944,9 +944,9 @@ qla24xx_unprotect_flash(struct qla_hw_data *ha)
944 if (!ha->fdt_wrt_disable) 944 if (!ha->fdt_wrt_disable)
945 return; 945 return;
946 946
947 /* Disable flash write-protection. */ 947 /* Disable flash write-protection, first clear SR protection bit */
948 qla24xx_write_flash_dword(ha, flash_conf_addr(ha, 0x101), 0); 948 qla24xx_write_flash_dword(ha, flash_conf_addr(ha, 0x101), 0);
949 /* Some flash parts need an additional zero-write to clear bits.*/ 949 /* Then write zero again to clear remaining SR bits.*/
950 qla24xx_write_flash_dword(ha, flash_conf_addr(ha, 0x101), 0); 950 qla24xx_write_flash_dword(ha, flash_conf_addr(ha, 0x101), 0);
951} 951}
952 952
@@ -1021,7 +1021,7 @@ qla24xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,
1021 (fdata & 0xff00) |((fdata << 16) & 1021 (fdata & 0xff00) |((fdata << 16) &
1022 0xff0000) | ((fdata >> 16) & 0xff)); 1022 0xff0000) | ((fdata >> 16) & 0xff));
1023 if (ret != QLA_SUCCESS) { 1023 if (ret != QLA_SUCCESS) {
1024 DEBUG9(qla_printk("Unable to flash sector: " 1024 DEBUG9(qla_printk("Unable to erase sector: "
1025 "address=%x.\n", faddr)); 1025 "address=%x.\n", faddr));
1026 break; 1026 break;
1027 } 1027 }