diff options
-rw-r--r-- | sys/dev/ic/ami.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index c3f710d7237..e981a5cb6ef 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.127 2006/03/20 08:59:42 dlg Exp $ */ +/* $OpenBSD: ami.c,v 1.128 2006/03/20 09:02:02 dlg Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -988,6 +988,8 @@ ami_start_xs(struct ami_softc *sc, struct ami_ccb *ccb, struct scsi_xfer *xs) void ami_start(struct ami_softc *sc, struct ami_ccb *ccb) { + int s; + if (ccb->ccb_state != AMI_CCB_READY) { printf("%s: ccb %d not ready (%d)\n", DEVNAME(sc), ccb->ccb_cmd.acc_id, ccb->ccb_state); @@ -996,8 +998,10 @@ ami_start(struct ami_softc *sc, struct ami_ccb *ccb) return; } + s = splbio(); ccb->ccb_state = AMI_CCB_PREQUEUED; TAILQ_INSERT_TAIL(&sc->sc_ccb_preq, ccb, ccb_link); + splx(s); ami_runqueue(sc); } |