diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-06-02 13:32:14 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-06-02 13:32:14 +0000 |
commit | 8f81d491bfaa879deb0d76f5667a2ca2c66946c7 (patch) | |
tree | 30f4e96bb523b28b6fa80951553b931e2ae8f95f /sys | |
parent | 18e538e1cfd80829a25574b940c9ed27f6de3afd (diff) |
bring back the SDF_WAITING waiting flag while adapters still implement
NO_CCB.
if sd_buf_done is told that the adapter has no more ccbs via NO_CCB, this
sets a flag so sdstart doesnt try and queue more io straight away.
this fixes the lockups on ciss that halex and okan were experiencing after
the iopools code went in. it will fix any other hba that returns NO_CCB
too.
tested by me@, okan@, and halex@
ok krw@ okan@ halex@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/sd.c | 7 | ||||
-rw-r--r-- | sys/scsi/sdvar.h | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index d2bc296b27e..0c72b47ccbf 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.191 2010/05/26 16:38:20 thib Exp $ */ +/* $OpenBSD: sd.c,v 1.192 2010/06/02 13:32:13 dlg Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -718,7 +718,9 @@ sdstart(struct scsi_xfer *xs) scsi_xs_exec(xs); /* move onto the next io */ - if (BUFQ_PEEK(sc->sc_bufq) != NULL) + if (ISSET(sc->flags, SDF_WAITING)) + CLR(sc->flags, SDF_WAITING); + else if (BUFQ_PEEK(sc->sc_bufq) != NULL) scsi_xsh_add(&sc->sc_xsh); } @@ -741,6 +743,7 @@ sd_buf_done(struct scsi_xfer *xs) bp->b_flags & B_READ); BUFQ_REQUEUE(sc->sc_bufq, bp); scsi_xs_put(xs); + SET(sc->flags, SDF_WAITING); timeout_add(&sc->sc_timeout, 1); return; diff --git a/sys/scsi/sdvar.h b/sys/scsi/sdvar.h index 396b1cd1da9..d5debe6a498 100644 --- a/sys/scsi/sdvar.h +++ b/sys/scsi/sdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sdvar.h,v 1.30 2010/05/26 16:38:20 thib Exp $ */ +/* $OpenBSD: sdvar.h,v 1.31 2010/06/02 13:32:13 dlg Exp $ */ /* $NetBSD: sdvar.h,v 1.7 1998/08/17 00:49:03 mycroft Exp $ */ /*- @@ -61,6 +61,7 @@ struct sd_softc { #define SDF_ANCIENT 0x10 /* disk is ancient; for minphys */ #define SDF_DIRTY 0x20 /* disk is dirty; needs cache flush */ #define SDF_DYING 0x40 /* dying, when deactivated */ +#define SDF_WAITING 0x80 struct scsi_link *sc_link; /* contains our targ, lun, etc. */ struct disk_parms { u_long heads; /* number of heads */ |