[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>

authored by

Andrew Vasquez and committed by
James Bottomley
bbfb21da 024e8ac0

-3
-3
drivers/scsi/qla2xxx/qla_sup.c
··· 869 869 uint32_t i; 870 870 uint32_t *dwptr; 871 871 struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; 872 - unsigned long flags; 873 872 874 873 ret = QLA_SUCCESS; 875 874 876 - spin_lock_irqsave(&ha->hardware_lock, flags); 877 875 /* Enable flash write. */ 878 876 WRT_REG_DWORD(&reg->ctrl_status, 879 877 RD_REG_DWORD(&reg->ctrl_status) | CSRX_FLASH_ENABLE); ··· 905 907 WRT_REG_DWORD(&reg->ctrl_status, 906 908 RD_REG_DWORD(&reg->ctrl_status) & ~CSRX_FLASH_ENABLE); 907 909 RD_REG_DWORD(&reg->ctrl_status); /* PCI Posting. */ 908 - spin_unlock_irqrestore(&ha->hardware_lock, flags); 909 910 910 911 return ret; 911 912 }