Commit c3b058af authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[SCSI] qla2xxx: Correct staging of RISC while attempting to pause.

There's no need to reset the RISC prior to pausing.
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 05236a05
...@@ -172,20 +172,17 @@ qla24xx_pause_risc(struct device_reg_24xx __iomem *reg) ...@@ -172,20 +172,17 @@ qla24xx_pause_risc(struct device_reg_24xx __iomem *reg)
int rval = QLA_SUCCESS; int rval = QLA_SUCCESS;
uint32_t cnt; uint32_t cnt;
if ((RD_REG_DWORD(&reg->hccr) & HCCRX_RISC_PAUSE) == 0) { if (RD_REG_DWORD(&reg->hccr) & HCCRX_RISC_PAUSE)
WRT_REG_DWORD(&reg->hccr, HCCRX_SET_RISC_RESET | return rval;
HCCRX_CLR_HOST_INT);
RD_REG_DWORD(&reg->hccr); /* PCI Posting. */
WRT_REG_DWORD(&reg->hccr, HCCRX_SET_RISC_PAUSE); WRT_REG_DWORD(&reg->hccr, HCCRX_SET_RISC_PAUSE);
for (cnt = 30000; for (cnt = 30000; (RD_REG_DWORD(&reg->hccr) & HCCRX_RISC_PAUSE) == 0 &&
(RD_REG_DWORD(&reg->hccr) & HCCRX_RISC_PAUSE) == 0 &&
rval == QLA_SUCCESS; cnt--) { rval == QLA_SUCCESS; cnt--) {
if (cnt) if (cnt)
udelay(100); udelay(100);
else else
rval = QLA_FUNCTION_TIMEOUT; rval = QLA_FUNCTION_TIMEOUT;
} }
}
return rval; return rval;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment