Only call ISP_UNLOCK/ISP_LOCK if isp->isp_osinfo.intsok in USEC_SLEEP.

Add a test against isp->isp_osinfo.islocked prior to trying to see
whether --isp->isp_osinfo.islocked is zero to cause us to unlock
(non-SMPLOCK case).
This commit is contained in:
Matt Jacob 2000-12-05 07:41:53 +00:00
parent bfbab17021
commit 4081cc88c9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69598

View File

@ -147,8 +147,10 @@ struct isposinfo {
#define STRNCAT strncat
#define USEC_DELAY DELAY
#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
@ -332,10 +334,12 @@ static INLINE void isp_unlock(struct ispsoftc *);
static INLINE void
isp_unlock(struct ispsoftc *isp)
{
if (isp->isp_osinfo.islocked) {
if (--isp->isp_osinfo.islocked == 0) {
splx(isp->isp_osinfo.splsaved);
}
}
}
#endif
static INLINE void isp_mbox_wait_complete(struct ispsoftc *);