aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2008-07-10 19:55:46 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-26 15:14:35 -0400
commitbbfb21daa320c9eb327d63734f295fa50ba93826 (patch)
tree530d732437ca5b450ad08acd8895d9a160b59f01 /drivers/scsi/qla2xxx
parent024e8ac04453b3525448c31ef39848cf675ba6db (diff)
[SCSI] qla2xxx: Correct locking during NVRAM manipulation.
Commit 2c96d8d0c17978bbf5eb82314d488f46d4a51280 pushed the acquisition of hardware_lock to too fine a level, which in turn will cause problems with cond_resched()s added with 40a2e34a94c336b716f631b2952d233e1ba76e3c. 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.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
index 1728ab3ccb20..ebea62246c80 100644
--- a/drivers/scsi/qla2xxx/qla_sup.c
+++ b/drivers/scsi/qla2xxx/qla_sup.c
@@ -869,11 +869,9 @@ qla24xx_write_nvram_data(scsi_qla_host_t *ha, uint8_t *buf, uint32_t naddr,
869 uint32_t i; 869 uint32_t i;
870 uint32_t *dwptr; 870 uint32_t *dwptr;
871 struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; 871 struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
872 unsigned long flags;
873 872
874 ret = QLA_SUCCESS; 873 ret = QLA_SUCCESS;
875 874
876 spin_lock_irqsave(&ha->hardware_lock, flags);
877 /* Enable flash write. */ 875 /* Enable flash write. */
878 WRT_REG_DWORD(&reg->ctrl_status, 876 WRT_REG_DWORD(&reg->ctrl_status,
879 RD_REG_DWORD(&reg->ctrl_status) | CSRX_FLASH_ENABLE); 877 RD_REG_DWORD(&reg->ctrl_status) | CSRX_FLASH_ENABLE);
@@ -907,7 +905,6 @@ qla24xx_write_nvram_data(scsi_qla_host_t *ha, uint8_t *buf, uint32_t naddr,
907 WRT_REG_DWORD(&reg->ctrl_status, 905 WRT_REG_DWORD(&reg->ctrl_status,
908 RD_REG_DWORD(&reg->ctrl_status) & ~CSRX_FLASH_ENABLE); 906 RD_REG_DWORD(&reg->ctrl_status) & ~CSRX_FLASH_ENABLE);
909 RD_REG_DWORD(&reg->ctrl_status); /* PCI Posting. */ 907 RD_REG_DWORD(&reg->ctrl_status); /* PCI Posting. */
910 spin_unlock_irqrestore(&ha->hardware_lock, flags);
911 908
912 return ret; 909 return ret;
913} 910}