diff options
author | 2010-01-10 00:10:23 +0000 | |
---|---|---|
committer | 2010-01-10 00:10:23 +0000 | |
commit | 2fb766a8f037f3d1098a4bee8170f3a28ab3b879 (patch) | |
tree | a2cdfe041cd94d1ed5375bf87a6654f11260ebfd /sys | |
parent | Do not try to reevaluate the current RX production index on each (diff) | |
download | wireguard-openbsd-2fb766a8f037f3d1098a4bee8170f3a28ab3b879.tar.xz wireguard-openbsd-2fb766a8f037f3d1098a4bee8170f3a28ab3b879.zip |
Set ITSDONE in scsi_done() and zap trivial instances of setting it
in the drivers just before calling scsi_done().
ok dlg@ beck@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mvme68k/dev/vsbic.c | 3 | ||||
-rw-r--r-- | sys/arch/mvme88k/dev/vsbic.c | 3 | ||||
-rw-r--r-- | sys/arch/vax/dec/sii.c | 3 | ||||
-rw-r--r-- | sys/dev/eisa/aha1742.c | 3 | ||||
-rw-r--r-- | sys/dev/ic/adv.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/adw.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/aic79xx_openbsd.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/aic7xxx_openbsd.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/bha.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/iha.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/oosiop.c | 3 | ||||
-rw-r--r-- | sys/dev/ic/osiop.c | 3 | ||||
-rw-r--r-- | sys/dev/ic/siop.c | 3 | ||||
-rw-r--r-- | sys/dev/ic/trm.c | 4 | ||||
-rw-r--r-- | sys/dev/isa/seagate.c | 3 | ||||
-rw-r--r-- | sys/dev/isa/wds.c | 3 | ||||
-rw-r--r-- | sys/scsi/scsi_base.c | 3 |
17 files changed, 18 insertions, 44 deletions
diff --git a/sys/arch/mvme68k/dev/vsbic.c b/sys/arch/mvme68k/dev/vsbic.c index 89215fab0c4..1841138c7f6 100644 --- a/sys/arch/mvme68k/dev/vsbic.c +++ b/sys/arch/mvme68k/dev/vsbic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vsbic.c,v 1.3 2009/02/18 20:49:25 miod Exp $ */ +/* $OpenBSD: vsbic.c,v 1.4 2010/01/10 00:10:23 krw Exp $ */ /* * Copyright (c) 2008, 2009 Miodrag Vallat. @@ -1391,7 +1391,6 @@ vsbic_wrapup(struct vsbic_softc *sc, struct vsbic_ccb *ccb) } vsbic_free_ccb(sc, ccb); - SET(xs->flags, ITSDONE); scsi_done(xs); } diff --git a/sys/arch/mvme88k/dev/vsbic.c b/sys/arch/mvme88k/dev/vsbic.c index 3add3ad1641..48d879f4ff2 100644 --- a/sys/arch/mvme88k/dev/vsbic.c +++ b/sys/arch/mvme88k/dev/vsbic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vsbic.c,v 1.4 2009/02/18 20:49:27 miod Exp $ */ +/* $OpenBSD: vsbic.c,v 1.5 2010/01/10 00:10:23 krw Exp $ */ /* * Copyright (c) 2008, 2009 Miodrag Vallat. @@ -1391,7 +1391,6 @@ vsbic_wrapup(struct vsbic_softc *sc, struct vsbic_ccb *ccb) } vsbic_free_ccb(sc, ccb); - SET(xs->flags, ITSDONE); scsi_done(xs); } diff --git a/sys/arch/vax/dec/sii.c b/sys/arch/vax/dec/sii.c index bbf7282712f..22df76a88a1 100644 --- a/sys/arch/vax/dec/sii.c +++ b/sys/arch/vax/dec/sii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sii.c,v 1.5 2009/02/16 21:19:06 miod Exp $ */ +/* $OpenBSD: sii.c,v 1.6 2010/01/10 00:10:23 krw Exp $ */ /* $NetBSD: sii.c,v 1.42 2000/06/02 20:20:29 mhitch Exp $ */ /* * Copyright (c) 2008 Miodrag Vallat. @@ -267,7 +267,6 @@ sii_scsi_cmd(xs) if ((xs->flags & ITSDONE) != 0) return (COMPLETE); xs->error = XS_TIMEOUT; - xs->flags |= ITSDONE; s = splbio(); scsi_done(xs); splx(s); diff --git a/sys/dev/eisa/aha1742.c b/sys/dev/eisa/aha1742.c index 7d10f4376ea..8189457b8ac 100644 --- a/sys/dev/eisa/aha1742.c +++ b/sys/dev/eisa/aha1742.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aha1742.c,v 1.35 2009/11/22 14:14:10 krw Exp $ */ +/* $OpenBSD: aha1742.c,v 1.36 2010/01/10 00:10:23 krw Exp $ */ /* $NetBSD: aha1742.c,v 1.61 1996/05/12 23:40:01 mycroft Exp $ */ /* @@ -684,7 +684,6 @@ ahb_done(sc, ecb) xs->resid = 0; } done: - xs->flags |= ITSDONE; ahb_free_ecb(sc, ecb, xs->flags); scsi_done(xs); } diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c index df94aab17bc..ecf6fc28d37 100644 --- a/sys/dev/ic/adv.c +++ b/sys/dev/ic/adv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adv.c,v 1.26 2009/09/04 04:57:14 miod Exp $ */ +/* $OpenBSD: adv.c,v 1.27 2010/01/10 00:10:23 krw Exp $ */ /* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */ /* @@ -653,7 +653,6 @@ adv_scsi_cmd(xs) xs->error = XS_DRIVER_STUFFUP; adv_free_ccb(sc, ccb); - xs->flags |= ITSDONE; s = splbio(); scsi_done(xs); splx(s); @@ -930,6 +929,5 @@ adv_narrow_isr_callback(sc, qdonep) adv_free_ccb(sc, ccb); - xs->flags |= ITSDONE; scsi_done(xs); } diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index 2717fe13b23..32fd96acf19 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adw.c,v 1.40 2009/09/04 04:57:14 miod Exp $ */ +/* $OpenBSD: adw.c,v 1.41 2010/01/10 00:10:23 krw Exp $ */ /* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */ /* @@ -632,7 +632,6 @@ retryagain: case ADW_ERROR: xs->error = XS_DRIVER_STUFFUP; - xs->flags |= ITSDONE; s = splbio(); scsi_done(xs); splx(s); @@ -655,7 +654,6 @@ retryagain: } } else { /* adw_build_req() has set xs->error already */ - xs->flags |= ITSDONE; s = splbio(); scsi_done(xs); splx(s); @@ -1228,7 +1226,6 @@ NO_ERROR: adw_free_ccb(sc, ccb); - xs->flags |= ITSDONE; scsi_done(xs); } diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c index f9f9bb1397c..472f2ff5226 100644 --- a/sys/dev/ic/aic79xx_openbsd.c +++ b/sys/dev/ic/aic79xx_openbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic79xx_openbsd.c,v 1.33 2009/11/22 14:14:10 krw Exp $ */ +/* $OpenBSD: aic79xx_openbsd.c,v 1.34 2010/01/10 00:10:23 krw Exp $ */ /* * Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom @@ -278,7 +278,6 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb) ahd_lock(ahd, &s); ahd_free_scb(ahd, scb); - xs->flags |= ITSDONE; scsi_done(xs); ahd_unlock(ahd, &s); } @@ -322,7 +321,6 @@ ahd_action(struct scsi_xfer *xs) ahd_lock(ahd, &s); if ((ahd->flags & AHD_INITIATORROLE) == 0) { xs->error = XS_DRIVER_STUFFUP; - xs->flags |= ITSDONE; scsi_done(xs); ahd_unlock(ahd, &s); return (COMPLETE); @@ -546,7 +544,6 @@ ahd_setup_data(struct ahd_softc *ahd, struct scsi_xfer *xs, ahd_lock(ahd, &s); ahd_free_scb(ahd, scb); xs->error = XS_DRIVER_STUFFUP; - xs->flags |= ITSDONE; scsi_done(xs); ahd_unlock(ahd, &s); return (COMPLETE); diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c index b45b9856640..eb24a34fbfa 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.43 2009/11/22 14:14:10 krw Exp $ */ +/* $OpenBSD: aic7xxx_openbsd.c,v 1.44 2010/01/10 00:10:23 krw Exp $ */ /* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */ /* @@ -278,7 +278,6 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb) s = splbio(); ahc_free_scb(ahc, scb); - xs->flags |= ITSDONE; scsi_done(xs); splx(s); } @@ -576,7 +575,6 @@ ahc_setup_data(struct ahc_softc *ahc, struct scsi_xfer *xs, s = splbio(); ahc_free_scb(ahc, scb); xs->error = XS_DRIVER_STUFFUP; - xs->flags |= ITSDONE; scsi_done(xs); splx(s); return (COMPLETE); diff --git a/sys/dev/ic/bha.c b/sys/dev/ic/bha.c index 1fe0be2a8e0..890ea167a37 100644 --- a/sys/dev/ic/bha.c +++ b/sys/dev/ic/bha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bha.c,v 1.19 2009/09/04 04:57:14 miod Exp $ */ +/* $OpenBSD: bha.c,v 1.20 2010/01/10 00:10:23 krw Exp $ */ /* $NetBSD: bha.c,v 1.27 1998/11/19 21:53:00 thorpej Exp $ */ #undef BHADEBUG @@ -793,7 +793,6 @@ bha_done(sc, ccb) xs->resid = 0; } bha_free_ccb(sc, ccb); - xs->flags |= ITSDONE; scsi_done(xs); } @@ -1407,7 +1406,6 @@ bad: xs->error = XS_DRIVER_STUFFUP; bha_free_ccb(sc, ccb); s = splbio(); - xs->flags |= ITSDONE; scsi_done(xs); splx(s); return (COMPLETE); diff --git a/sys/dev/ic/iha.c b/sys/dev/ic/iha.c index d14467e8635..9225efcee77 100644 --- a/sys/dev/ic/iha.c +++ b/sys/dev/ic/iha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iha.c,v 1.34 2009/09/04 04:57:14 miod Exp $ */ +/* $OpenBSD: iha.c,v 1.35 2010/01/10 00:10:23 krw Exp $ */ /*------------------------------------------------------------------------- * * Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller. @@ -270,7 +270,6 @@ iha_scsi_cmd(xs) if ((xs->cmdlen > 12) || (sc_link->target >= IHA_MAX_TARGETS)) { xs->error = XS_DRIVER_STUFFUP; - xs->flags |= ITSDONE; s = splbio(); scsi_done(xs); splx(s); @@ -319,7 +318,6 @@ iha_scsi_cmd(xs) iha_append_free_scb(sc, pScb); xs->error = XS_DRIVER_STUFFUP; - xs->flags |= ITSDONE; s = splbio(); scsi_done(xs); splx(s); @@ -334,7 +332,6 @@ iha_scsi_cmd(xs) if (error) { bus_dmamap_unload(sc->sc_dmat, pScb->SCB_DataDma); xs->error = XS_DRIVER_STUFFUP; - xs->flags |= ITSDONE; s = splbio(); scsi_done(xs); splx(s); @@ -2565,7 +2562,6 @@ iha_done_scb(sc, pScb) break; } - xs->flags |= ITSDONE; s = splbio(); scsi_done(xs); splx(s); diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c index ed15b9d35f4..304b2140756 100644 --- a/sys/dev/ic/oosiop.c +++ b/sys/dev/ic/oosiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: oosiop.c,v 1.12 2009/03/07 15:38:43 miod Exp $ */ +/* $OpenBSD: oosiop.c,v 1.13 2010/01/10 00:10:23 krw Exp $ */ /* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */ /* @@ -950,7 +950,6 @@ oosiop_done(struct oosiop_softc *sc, struct oosiop_cb *cb) /* Put it on the free list. */ FREE: xs->resid = 0; - xs->flags |= ITSDONE; scsi_done(xs); TAILQ_INSERT_TAIL(&sc->sc_free_cb, cb, chain); diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c index cf5b937935b..35aded288b6 100644 --- a/sys/dev/ic/osiop.c +++ b/sys/dev/ic/osiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: osiop.c,v 1.39 2009/08/28 10:13:53 jasper Exp $ */ +/* $OpenBSD: osiop.c,v 1.40 2010/01/10 00:10:23 krw Exp $ */ /* $NetBSD: osiop.c,v 1.9 2002/04/05 18:27:54 bouyer Exp $ */ /* @@ -710,7 +710,6 @@ FREE: sc->sc_tinfo[periph->target].cmds++; xs->resid = 0; - xs->flags |= ITSDONE; scsi_done(xs); } else { /* Set up REQUEST_SENSE command */ diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c index 7ca0b9fcaa1..7a7207752af 100644 --- a/sys/dev/ic/siop.c +++ b/sys/dev/ic/siop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siop.c,v 1.55 2009/11/26 21:26:09 krw Exp $ */ +/* $OpenBSD: siop.c,v 1.56 2010/01/10 00:10:23 krw Exp $ */ /* $NetBSD: siop.c,v 1.79 2005/11/18 23:10:32 bouyer Exp $ */ /* @@ -1202,7 +1202,6 @@ siop_scsicmd_end(siop_cmd) } out: siop_lun->lun_flags &= ~SIOP_LUNF_FULL; - xs->flags |= ITSDONE; siop_cmd->cmd_c.status = CMDST_FREE; TAILQ_INSERT_TAIL(&sc->free_list, siop_cmd, next); #if 0 diff --git a/sys/dev/ic/trm.c b/sys/dev/ic/trm.c index 266c016ad80..15a2157b70e 100644 --- a/sys/dev/ic/trm.c +++ b/sys/dev/ic/trm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trm.c,v 1.14 2009/09/24 19:47:09 miod Exp $ +/* $OpenBSD: trm.c,v 1.15 2010/01/10 00:10:23 krw Exp $ * ------------------------------------------------------------ * O.S : OpenBSD * File Name : trm.c @@ -2091,8 +2091,6 @@ trm_FinishSRB(struct trm_softc *sc, struct trm_scsi_req_q *pSRB) trm_ReleaseSRB(sc, pSRB); - xs->flags |= ITSDONE; - /* * Notify cmd done */ diff --git a/sys/dev/isa/seagate.c b/sys/dev/isa/seagate.c index d6430a2d2cb..e60f5c9bcc4 100644 --- a/sys/dev/isa/seagate.c +++ b/sys/dev/isa/seagate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: seagate.c,v 1.30 2009/09/24 19:48:50 miod Exp $ */ +/* $OpenBSD: seagate.c,v 1.31 2010/01/10 00:10:23 krw Exp $ */ /* * ST01/02, Future Domain TMC-885, TMC-950 SCSI driver @@ -1168,7 +1168,6 @@ sea_done(struct sea_softc *sea, struct sea_scb *scb) if (scb->flags & SCB_ERROR) xs->error = XS_DRIVER_STUFFUP; } - xs->flags |= ITSDONE; sea_free_scb(sea, scb, xs->flags); s = splbio(); scsi_done(xs); diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c index 57f4b06061f..07e67d7a5d3 100644 --- a/sys/dev/isa/wds.c +++ b/sys/dev/isa/wds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wds.c,v 1.31 2009/09/24 19:48:50 miod Exp $ */ +/* $OpenBSD: wds.c,v 1.32 2010/01/10 00:10:23 krw Exp $ */ /* $NetBSD: wds.c,v 1.13 1996/11/03 16:20:31 mycroft Exp $ */ #undef WDSDIAG @@ -844,7 +844,6 @@ wds_done(sc, scb, stat) } #endif wds_free_scb(sc, scb); - xs->flags |= ITSDONE; scsi_done(xs); } diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index a44fbf49206..fdb1a10ff2b 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.154 2010/01/09 22:24:34 dlg Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.155 2010/01/10 00:10:23 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -774,6 +774,7 @@ scsi_done(struct scsi_xfer *xs) } #endif /* SCSIDEBUG */ + SET(xs->flags, ITSDONE); xs->done(xs); } |