diff options
-rw-r--r-- | drivers/scsi/qla2xxx/qla_sup.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index ad2fa01bd233..af16c55b47a7 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
@@ -550,7 +550,7 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, | |||
550 | int ret; | 550 | int ret; |
551 | uint32_t liter, miter; | 551 | uint32_t liter, miter; |
552 | uint32_t sec_mask, rest_addr, conf_addr; | 552 | uint32_t sec_mask, rest_addr, conf_addr; |
553 | uint32_t fdata, findex ; | 553 | uint32_t fdata, findex, cnt; |
554 | uint8_t man_id, flash_id; | 554 | uint8_t man_id, flash_id; |
555 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; | 555 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; |
556 | dma_addr_t optrom_dma; | 556 | dma_addr_t optrom_dma; |
@@ -690,8 +690,14 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, | |||
690 | 0xff0000) | ((fdata >> 16) & 0xff)); | 690 | 0xff0000) | ((fdata >> 16) & 0xff)); |
691 | } | 691 | } |
692 | 692 | ||
693 | /* Enable flash write-protection. */ | 693 | /* Enable flash write-protection and wait for completion. */ |
694 | qla24xx_write_flash_dword(ha, flash_conf_to_access_addr(0x101), 0x9c); | 694 | qla24xx_write_flash_dword(ha, flash_conf_to_access_addr(0x101), 0x9c); |
695 | for (cnt = 300; cnt && | ||
696 | qla24xx_read_flash_dword(ha, | ||
697 | flash_conf_to_access_addr(0x005)) & BIT_0; | ||
698 | cnt--) { | ||
699 | udelay(10); | ||
700 | } | ||
695 | 701 | ||
696 | /* Disable flash write. */ | 702 | /* Disable flash write. */ |
697 | WRT_REG_DWORD(®->ctrl_status, | 703 | WRT_REG_DWORD(®->ctrl_status, |