diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-03-20 09:02:03 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-03-20 09:02:03 +0000 |
commit | 983d9967c0893485b78661a7e026a72454acf5dc (patch) | |
tree | 9c2df6f6cd66b61c5a2d5983626442984729ed26 | |
parent | 51470e1874be5aec2a9450b26a7588c850b55004 (diff) |
the command queues are important so wrap them up in splbio
-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); } |