aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_dbg.c
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2005-07-08 20:59:26 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-07-14 11:15:31 -0400
commit88c2666351f41a7d4459e79594f687a356f5e57c (patch)
treea07eb04ead61e0aa61d22cde8963f1b74f9b0891 /drivers/scsi/qla2xxx/qla_dbg.c
parentf0883ac6a74b403f0f2e91166ba06227cc4690e6 (diff)
[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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index a20450e9a479..72bbaa91dc77 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)
1526 1526
1527 WRT_REG_DWORD(&reg->ctrl_status, 1527 WRT_REG_DWORD(&reg->ctrl_status,
1528 CSRX_ISP_SOFT_RESET|CSRX_DMA_SHUTDOWN|MWB_4096_BYTES); 1528 CSRX_ISP_SOFT_RESET|CSRX_DMA_SHUTDOWN|MWB_4096_BYTES);
1529 RD_REG_DWORD(&reg->ctrl_status);
1530
1531 /* Wait for firmware to complete NVRAM accesses. */
1532 udelay(5);
1533 mb[0] = (uint32_t) RD_REG_WORD(&reg->mailbox0);
1534 for (cnt = 10000 ; cnt && mb[0]; cnt--) {
1535 udelay(5);
1536 mb[0] = (uint32_t) RD_REG_WORD(&reg->mailbox0);
1537 barrier();
1538 }
1539
1529 udelay(20); 1540 udelay(20);
1530 for (cnt = 0; cnt < 30000; cnt++) { 1541 for (cnt = 0; cnt < 30000; cnt++) {
1531 if ((RD_REG_DWORD(&reg->ctrl_status) & 1542 if ((RD_REG_DWORD(&reg->ctrl_status) &