diff options
| author | Matt Jacob <mjacob@FreeBSD.org> | 2000-12-05 07:41:53 +0000 |
|---|---|---|
| committer | Matt Jacob <mjacob@FreeBSD.org> | 2000-12-05 07:41:53 +0000 |
| commit | 4081cc88c9d466b880204e4706f9db5434cc77db (patch) | |
| tree | ea75d2fb7a6dedbd426c0b2c661045015849807a /sys | |
| parent | bfbab170217a25f4013f36293166f2f6a497b1a8 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/isp/isp_freebsd.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h index 34254603141a..5f9f47f3fb14 100644 --- a/sys/dev/isp/isp_freebsd.h +++ b/sys/dev/isp/isp_freebsd.h @@ -146,10 +146,12 @@ struct isposinfo { #define SNPRINTF snprintf #define STRNCAT strncat #define USEC_DELAY DELAY -#define USEC_SLEEP(isp, x) \ - ISP_UNLOCK(isp); \ - DELAY(x); \ - ISP_LOCK(isp) +#define USEC_SLEEP(isp, x) \ + if (isp->isp_osinfo.intsok) \ + ISP_UNLOCK(isp); \ + DELAY(x); \ + if (isp->isp_osinfo.intsok) \ + ISP_LOCK(isp) #define NANOTIME_T struct timespec #define GET_NANOTIME nanotime @@ -332,8 +334,10 @@ static INLINE void isp_unlock(struct ispsoftc *); static INLINE void isp_unlock(struct ispsoftc *isp) { - if (--isp->isp_osinfo.islocked == 0) { - splx(isp->isp_osinfo.splsaved); + if (isp->isp_osinfo.islocked) { + if (--isp->isp_osinfo.islocked == 0) { + splx(isp->isp_osinfo.splsaved); + } } } #endif |
