diff options
| author | Alexander Motin <mav@FreeBSD.org> | 2013-11-10 13:37:44 +0000 |
|---|---|---|
| committer | Alexander Motin <mav@FreeBSD.org> | 2013-11-10 13:37:44 +0000 |
| commit | d00fd0a920162e84f915fc9939bbfa9b91400232 (patch) | |
| tree | 64b84305ffe65957073d568a3dd07ecc5d3da9ea /sys/dev/isp/isp_library.c | |
| parent | c095756f2e16928e0c26641778a4b86a60320aba (diff) | |
Notes
Diffstat (limited to 'sys/dev/isp/isp_library.c')
| -rw-r--r-- | sys/dev/isp/isp_library.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/isp/isp_library.c b/sys/dev/isp/isp_library.c index d5535f296c8f..62c651cbca8f 100644 --- a/sys/dev/isp/isp_library.c +++ b/sys/dev/isp/isp_library.c @@ -322,9 +322,13 @@ isp_destroy_handle(ispsoftc_t *isp, uint32_t handle) void * isp_getrqentry(ispsoftc_t *isp) { - isp->isp_reqodx = ISP_READ(isp, isp->isp_rqstoutrp); - if (ISP_NXT_QENTRY(isp->isp_reqidx, RQUEST_QUEUE_LEN(isp)) == isp->isp_reqodx) { - return (NULL); + uint32_t next; + + next = ISP_NXT_QENTRY(isp->isp_reqidx, RQUEST_QUEUE_LEN(isp)); + if (next == isp->isp_reqodx) { + isp->isp_reqodx = ISP_READ(isp, isp->isp_rqstoutrp); + if (next == isp->isp_reqodx) + return (NULL); } return (ISP_QUEUE_ENTRY(isp->isp_rquest, isp->isp_reqidx)); } |
