diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2005-07-08 17:59:26 -0700 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-07-14 11:15:31 -0400 |
commit | 88c2666351f41a7d4459e79594f687a356f5e57c (patch) | |
tree | a07eb04ead61e0aa61d22cde8963f1b74f9b0891 /drivers/scsi/qla2xxx/qla_dbg.c | |
parent | f0883ac6a74b403f0f2e91166ba06227cc4690e6 (diff) | |
download | op-kernel-dev-88c2666351f41a7d4459e79594f687a356f5e57c.zip op-kernel-dev-88c2666351f41a7d4459e79594f687a356f5e57c.tar.gz |
[SCSI] qla2xxx: Consolidate ISP24xx chip reset logic.
Consolidate ISP24xx chip reset logic.
Consolidate near-duplicate RISC reset logic from
qla24xx_reset_chip() and qla24xx_chip_diag(). Also, after
initiating a soft-reset, insure the firmware has completed
all NVRAM accesses before continuing.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_dbg.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dbg.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index a20450e..72bbaa9 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c @@ -1526,6 +1526,17 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked) WRT_REG_DWORD(®->ctrl_status, CSRX_ISP_SOFT_RESET|CSRX_DMA_SHUTDOWN|MWB_4096_BYTES); + RD_REG_DWORD(®->ctrl_status); + + /* Wait for firmware to complete NVRAM accesses. */ + udelay(5); + mb[0] = (uint32_t) RD_REG_WORD(®->mailbox0); + for (cnt = 10000 ; cnt && mb[0]; cnt--) { + udelay(5); + mb[0] = (uint32_t) RD_REG_WORD(®->mailbox0); + barrier(); + } + udelay(20); for (cnt = 0; cnt < 30000; cnt++) { if ((RD_REG_DWORD(®->ctrl_status) & |