diff options
author | Justin T. Gibbs <gibbs@FreeBSD.org> | 1999-03-05 23:37:07 +0000 |
---|---|---|
committer | Justin T. Gibbs <gibbs@FreeBSD.org> | 1999-03-05 23:37:07 +0000 |
commit | da925f6c0fa97dbc5834a9c6b9bc1d6966f792c7 (patch) | |
tree | 897e17eecd2f2dc49bf4e3f73c08f9ddd248e05b /sys/dev/ahb | |
parent | c562189829c1615c9ca97925efa1c799089dd024 (diff) | |
download | src-da925f6c0fa97dbc5834a9c6b9bc1d6966f792c7.tar.gz src-da925f6c0fa97dbc5834a9c6b9bc1d6966f792c7.zip |
Poll for bus reset completion instead of assuming that our interrupt
is enabled.
Notes
Notes:
svn path=/head/; revision=44508
Diffstat (limited to 'sys/dev/ahb')
-rw-r--r-- | sys/dev/ahb/ahb.c | 9 |
1 files changed, 7 insertions, 2 deletions
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: |