diff options
author | mav <mav@FreeBSD.org> | 2015-11-30 21:33:30 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-11-30 21:33:30 +0000 |
commit | 8228b0d4952d96ca197b65f2fd257949ce04253c (patch) | |
tree | c12bce720bceb89f2ff8545b8ce44cb1b78799f9 /sys/dev/isp/isp.c | |
parent | e464444925c3b292794d30c7ae3e52c6353830e3 (diff) | |
download | FreeBSD-src-8228b0d4952d96ca197b65f2fd257949ce04253c.zip FreeBSD-src-8228b0d4952d96ca197b65f2fd257949ce04253c.tar.gz |
MFC r290507: Rework r290504.
Diffstat (limited to 'sys/dev/isp/isp.c')
-rw-r--r-- | sys/dev/isp/isp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 149c2be..9b8ce72 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -2774,7 +2774,7 @@ isp_fclink_test(ispsoftc_t *isp, int chan, int usdelay) */ lwfs = FW_CONFIG_WAIT; GET_NANOTIME(&hra); - do { + while (1) { isp_fw_state(isp, chan); if (lwfs != fcp->isp_fwstate) { isp_prt(isp, ISP_LOGCONFIG|ISP_LOG_SANCFG, "Chan %d Firmware State <%s->%s>", chan, isp_fc_fw_statename((int)lwfs), isp_fc_fw_statename((int)fcp->isp_fwstate)); @@ -2783,9 +2783,11 @@ isp_fclink_test(ispsoftc_t *isp, int chan, int usdelay) if (fcp->isp_fwstate == FW_READY) { break; } - ISP_SLEEP(isp, 1000); GET_NANOTIME(&hrb); - } while (NANOTIME_SUB(&hrb, &hra) / 1000 < usdelay); + if ((NANOTIME_SUB(&hrb, &hra) / 1000 + 1000 >= usdelay)) + break; + ISP_SLEEP(isp, 1000); + } /* * If we haven't gone to 'ready' state, return. |