From 1d460ef8d5108d88e351279344f24e24850a213d Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Tue, 4 Jul 2000 01:02:38 +0000 Subject: Change delay loop in new isp_mboxcmd to the use of the new MBOX_WAIT_COMPLETE macro. Change notification of completion of a mailbox command in isp_intr to MBOX_NOTIFY_COMPLETE macro. --- sys/dev/isp/isp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'sys/dev/isp/isp.c') diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 7996b0fcedf1..554dc8f379e8 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -2482,7 +2482,7 @@ isp_intr(arg) isp->isp_mboxtmp[i] = ISP_READ(isp, MBOX_OFF(i)); } - isp->isp_mboxbsy = 0; + MBOX_NOTIFY_COMPLETE(isp); } else { PRINTF("%s: Command Mbox 0x%x\n", isp->isp_name, mbox); @@ -3605,12 +3605,7 @@ isp_mboxcmd(isp, mbp) /* * While we haven't finished the command, spin our wheels here. */ - - do { - if (isp_intr(isp) == 0) { - SYS_DELAY(500); - } - } while (isp->isp_mboxbsy != 0); + MBOX_WAIT_COMPLETE(isp); /* * Copy back output registers. -- cgit v1.3