From da925f6c0fa97dbc5834a9c6b9bc1d6966f792c7 Mon Sep 17 00:00:00 2001 From: "Justin T. Gibbs" Date: Fri, 5 Mar 1999 23:37:07 +0000 Subject: Poll for bus reset completion instead of assuming that our interrupt is enabled. --- sys/dev/ahb/ahb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys/dev/ahb/ahb.c') diff --git a/sys/dev/ahb/ahb.c b/sys/dev/ahb/ahb.c index 21edd2ea9b1b..f86e82edb50c 100644 --- a/sys/dev/ahb/ahb.c +++ b/sys/dev/ahb/ahb.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahb.c,v 1.5 1999/01/28 01:33:02 dillon Exp $ + * $Id: ahb.c,v 1.6 1999/01/28 03:30:02 gibbs Exp $ */ #include "eisa.h" @@ -1160,12 +1160,17 @@ ahbaction(struct cam_sim *sim, union ccb *ccb) case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ { int i; + int s; + s = splcam(); ahb->immed_cmd = IMMED_RESET; ahbqueuembox(ahb, IMMED_RESET, ATTN_IMMED|ccb->ccb_h.target_id); /* Poll for interrupt completion */ - for (i = 1000; ahb->immed_cmd != 0 && i != 0; i--) + for (i = 1000; ahb->immed_cmd != 0 && i != 0; i--) { DELAY(1000); + ahbintr(cam_sim_softc(sim)); + } + splx(s); break; } case XPT_CALC_GEOMETRY: -- cgit v1.3