diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2004-01-07 17:08:33 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2004-01-07 17:08:33 +0000 |
commit | e960df005df407b312c60da2a9c37f141207e694 (patch) | |
tree | f57309fd2b51c45b1f9b5fbbe56550a073c89501 | |
parent | 732872467d90f574248cfa22e644ff8fd359edc7 (diff) |
Fix crash reported in pr/3630. Poll all scsi requests that have SCSI_POLL set.
ok miod@ tdeval@.
-rw-r--r-- | sys/dev/ic/aic7xxx_openbsd.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c index bc7fa6ca4d9..02ecbb2a91e 100644 --- a/sys/dev/ic/aic7xxx_openbsd.c +++ b/sys/dev/ic/aic7xxx_openbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic7xxx_openbsd.c,v 1.17 2004/01/05 01:09:18 krw Exp $ */ +/* $OpenBSD: aic7xxx_openbsd.c,v 1.18 2004/01/07 17:08:32 krw Exp $ */ /* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */ /* @@ -506,8 +506,12 @@ ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments) TAILQ_INSERT_TAIL(untagged_q, scb, links.tqe); scb->flags |= SCB_UNTAGGEDQ; if (TAILQ_FIRST(untagged_q) != scb) { - ahc_unlock(ahc, &s); - return (SUCCESSFULLY_QUEUED); + if (xs->flags & SCSI_POLL) + goto poll; + else { + ahc_unlock(ahc, &s); + return (SUCCESSFULLY_QUEUED); + } } } scb->flags |= SCB_ACTIVE; @@ -532,6 +536,7 @@ ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments) /* * If we can't use interrupts, poll for completion */ +poll: SC_DEBUG(xs->sc_link, SDEV_DB3, ("cmd_poll\n")); target = xs->sc_link->target; |