summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hp300/dev/mb89352.c4
-rw-r--r--sys/arch/luna88k/dev/mb89352.c4
-rw-r--r--sys/arch/mvme68k/dev/sbic.c4
-rw-r--r--sys/arch/mvme68k/dev/vs.c8
-rw-r--r--sys/arch/mvme88k/dev/vs.c6
-rw-r--r--sys/arch/sparc64/dev/vdsk.c4
-rw-r--r--sys/arch/vax/dec/sii.c4
-rw-r--r--sys/dev/atapiscsi/atapiscsi.c9
-rw-r--r--sys/dev/eisa/aha1742.c8
-rw-r--r--sys/dev/i2o/iopsp.c10
-rw-r--r--sys/dev/ic/aac.c6
-rw-r--r--sys/dev/ic/adv.c4
-rw-r--r--sys/dev/ic/adw.c6
-rw-r--r--sys/dev/ic/aic6360.c7
-rw-r--r--sys/dev/ic/ami.c28
-rw-r--r--sys/dev/ic/bha.c4
-rw-r--r--sys/dev/ic/cac.c4
-rw-r--r--sys/dev/ic/dpt.c6
-rw-r--r--sys/dev/ic/gdt_common.c6
-rw-r--r--sys/dev/ic/iha.c15
-rw-r--r--sys/dev/ic/mfi.c9
-rw-r--r--sys/dev/ic/ncr53c9x.c10
-rw-r--r--sys/dev/ic/osiop.c4
-rw-r--r--sys/dev/ic/twe.c8
-rw-r--r--sys/dev/ic/uha.c6
-rw-r--r--sys/dev/isa/aha.c6
-rw-r--r--sys/dev/isa/seagate.c9
-rw-r--r--sys/dev/isa/wds.c6
-rw-r--r--sys/dev/pci/arc.c6
-rw-r--r--sys/dev/pci/ips.c16
-rw-r--r--sys/dev/pci/mpii.c8
-rw-r--r--sys/dev/pci/qli_pci.c4
-rw-r--r--sys/dev/sdmmc/sdmmc_scsi.c17
-rw-r--r--sys/dev/softraid.c6
-rw-r--r--sys/dev/usb/umass_scsi.c12
-rw-r--r--sys/dev/vscsi.c9
-rw-r--r--sys/scsi/mpath.c8
37 files changed, 43 insertions, 248 deletions
diff --git a/sys/arch/hp300/dev/mb89352.c b/sys/arch/hp300/dev/mb89352.c
index fcdd214e10a..065c2f585cb 100644
--- a/sys/arch/hp300/dev/mb89352.c
+++ b/sys/arch/hp300/dev/mb89352.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mb89352.c,v 1.22 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: mb89352.c,v 1.23 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: mb89352.c,v 1.5 2000/03/23 07:01:31 thorpej Exp $ */
/* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */
@@ -413,9 +413,7 @@ spc_scsi_cmd(struct scsi_xfer *xs)
flags = xs->flags;
if ((acb = spc_get_acb(sc, flags)) == NULL) {
xs->error = XS_NO_CCB;
- s= splbio();
scsi_done(xs);
- splx(s);
return;
}
diff --git a/sys/arch/luna88k/dev/mb89352.c b/sys/arch/luna88k/dev/mb89352.c
index 42b18f50ccd..c3681d2a674 100644
--- a/sys/arch/luna88k/dev/mb89352.c
+++ b/sys/arch/luna88k/dev/mb89352.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mb89352.c,v 1.12 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: mb89352.c,v 1.13 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: mb89352.c,v 1.5 2000/03/23 07:01:31 thorpej Exp $ */
/* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */
@@ -443,9 +443,7 @@ spc_scsi_cmd(xs)
flags = xs->flags;
if ((acb = spc_get_acb(sc, flags)) == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
diff --git a/sys/arch/mvme68k/dev/sbic.c b/sys/arch/mvme68k/dev/sbic.c
index 1e324dd3311..f646bdc9cc5 100644
--- a/sys/arch/mvme68k/dev/sbic.c
+++ b/sys/arch/mvme68k/dev/sbic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbic.c,v 1.26 2010/03/27 16:04:24 miod Exp $ */
+/* $OpenBSD: sbic.c,v 1.27 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: sbic.c,v 1.2 1996/04/23 16:32:54 chuck Exp $ */
/*
@@ -368,9 +368,7 @@ sbic_scsicmd(xs)
#endif
#endif
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
diff --git a/sys/arch/mvme68k/dev/vs.c b/sys/arch/mvme68k/dev/vs.c
index 7f16bf3e2b8..55b6c108eb0 100644
--- a/sys/arch/mvme68k/dev/vs.c
+++ b/sys/arch/mvme68k/dev/vs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs.c,v 1.31 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: vs.c,v 1.32 2010/05/20 00:55:17 krw Exp $ */
/*
* Copyright (c) 2004, 2009, Miodrag Vallat.
@@ -447,9 +447,7 @@ vs_scsicmd(struct scsi_xfer *xs)
printf("%s: master command not idle\n",
sc->sc_dev.dv_xname);
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
#endif
@@ -464,9 +462,7 @@ vs_scsicmd(struct scsi_xfer *xs)
sc->sc_dev.dv_xname, slp->target);
#endif
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
}
if (vs_getcqe(sc, &cqep, &iopb)) {
/* XXX shouldn't happen since our queue is ready */
@@ -475,9 +471,7 @@ vs_scsicmd(struct scsi_xfer *xs)
printf("%s: no free CQEs\n", sc->sc_dev.dv_xname);
#endif
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
}
}
diff --git a/sys/arch/mvme88k/dev/vs.c b/sys/arch/mvme88k/dev/vs.c
index d2d0f12dfb5..f86e65a3463 100644
--- a/sys/arch/mvme88k/dev/vs.c
+++ b/sys/arch/mvme88k/dev/vs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs.c,v 1.79 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: vs.c,v 1.80 2010/05/20 00:55:17 krw Exp $ */
/*
* Copyright (c) 2004, 2009, Miodrag Vallat.
@@ -432,9 +432,7 @@ vs_scsicmd(struct scsi_xfer *xs)
printf("%s: master command not idle\n",
sc->sc_dev.dv_xname);
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
#endif
@@ -449,9 +447,7 @@ vs_scsicmd(struct scsi_xfer *xs)
sc->sc_dev.dv_xname, slp->target);
#endif
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
if (vs_getcqe(sc, &cqep, &iopb)) {
diff --git a/sys/arch/sparc64/dev/vdsk.c b/sys/arch/sparc64/dev/vdsk.c
index 76c2c08c34c..e011a48e250 100644
--- a/sys/arch/sparc64/dev/vdsk.c
+++ b/sys/arch/sparc64/dev/vdsk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vdsk.c,v 1.19 2010/03/24 06:55:28 dlg Exp $ */
+/* $OpenBSD: vdsk.c,v 1.20 2010/05/20 00:55:17 krw Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -1121,9 +1121,7 @@ vdsk_scsi_done(struct scsi_xfer *xs, int error)
xs->error = error;
- s = splbio();
scsi_done(xs);
- splx(s);
}
int
diff --git a/sys/arch/vax/dec/sii.c b/sys/arch/vax/dec/sii.c
index 15b0e8e0886..64d3ac924b5 100644
--- a/sys/arch/vax/dec/sii.c
+++ b/sys/arch/vax/dec/sii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sii.c,v 1.8 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: sii.c,v 1.9 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: sii.c,v 1.42 2000/06/02 20:20:29 mhitch Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
@@ -269,9 +269,7 @@ sii_scsi_cmd(xs)
if ((xs->flags & ITSDONE) != 0)
return;
xs->error = XS_TIMEOUT;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c
index 0e5111d7ba6..11cb54ab0aa 100644
--- a/sys/dev/atapiscsi/atapiscsi.c
+++ b/sys/dev/atapiscsi/atapiscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atapiscsi.c,v 1.88 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: atapiscsi.c,v 1.89 2010/05/20 00:55:17 krw Exp $ */
/*
* This code is derived from code with the copyright below.
@@ -335,9 +335,7 @@ wdc_atapi_send_cmd(sc_xfer)
if (sc_xfer->sc_link->target != 0) {
sc_xfer->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(sc_xfer);
- splx(s);
return;
}
@@ -345,9 +343,7 @@ wdc_atapi_send_cmd(sc_xfer)
? WDC_NOSLEEP : WDC_CANSLEEP);
if (xfer == NULL) {
sc_xfer->error = XS_NO_CCB;
- s = splbio();
scsi_done(sc_xfer);
- splx(s);
return;
}
if (sc_xfer->flags & SCSI_POLL)
@@ -1563,7 +1559,6 @@ wdc_atapi_done(chp, xfer, timeout, ret)
struct atapi_return_args *ret;
{
struct scsi_xfer *sc_xfer = xfer->cmd;
- int s;
WDCDEBUG_PRINT(("wdc_atapi_done %s:%d:%d: flags 0x%x error 0x%x\n",
chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive,
@@ -1573,9 +1568,7 @@ wdc_atapi_done(chp, xfer, timeout, ret)
if (xfer->c_flags & C_POLL)
wdc_enable_intr(chp);
- s = splbio();
scsi_done(sc_xfer);
- splx(s);
xfer->next = NULL;
return;
diff --git a/sys/dev/eisa/aha1742.c b/sys/dev/eisa/aha1742.c
index 2f161b18179..51c00d19d14 100644
--- a/sys/dev/eisa/aha1742.c
+++ b/sys/dev/eisa/aha1742.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aha1742.c,v 1.38 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: aha1742.c,v 1.39 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: aha1742.c,v 1.61 1996/05/12 23:40:01 mycroft Exp $ */
/*
@@ -953,9 +953,7 @@ ahb_scsi_cmd(xs)
flags = xs->flags;
if ((ecb = ahb_get_ecb(sc, flags)) == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
ecb->xs = xs;
@@ -971,9 +969,7 @@ ahb_scsi_cmd(xs)
ecb->flags |= ECB_IMMED;
if (sc->immed_ecb) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
sc->immed_ecb = ecb;
@@ -1077,9 +1073,7 @@ ahb_scsi_cmd(xs)
sc->sc_dev.dv_xname, AHB_NSEG);
xs->error = XS_DRIVER_STUFFUP;
ahb_free_ecb(sc, ecb, flags);
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
} else { /* No data xfer, use non S/G values */
diff --git a/sys/dev/i2o/iopsp.c b/sys/dev/i2o/iopsp.c
index 18388d9ce77..2572fcfd808 100644
--- a/sys/dev/i2o/iopsp.c
+++ b/sys/dev/i2o/iopsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iopsp.c,v 1.16 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: iopsp.c,v 1.17 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD$ */
/*-
@@ -419,9 +419,7 @@ iopsp_scsi_cmd(xs)
tid = IOPSP_TIDMAP(sc->sc_tidmap, link->target, link->lun);
if (tid == IOPSP_TID_ABSENT || tid == IOPSP_TID_INUSE) {
xs->error = XS_SELTIMEOUT;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -439,9 +437,7 @@ iopsp_scsi_cmd(xs)
} else
xs->error = XS_NOERROR;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -486,9 +482,7 @@ iopsp_scsi_cmd(xs)
if (error) {
xs->error = XS_DRIVER_STUFFUP;
iop_msg_free(iop, im);
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
if ((xs->flags & SCSI_DATA_IN) == 0)
@@ -509,9 +503,7 @@ iopsp_scsi_cmd(xs)
iop_msg_unmap(iop, im);
iop_msg_free(iop, im);
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
}
}
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c
index 214707bb21a..f192533f9be 100644
--- a/sys/dev/ic/aac.c
+++ b/sys/dev/ic/aac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aac.c,v 1.45 2010/05/18 20:57:20 oga Exp $ */
+/* $OpenBSD: aac.c,v 1.46 2010/05/20 00:55:17 krw Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -2092,8 +2092,8 @@ aac_command_timeout(struct aac_command *cm)
struct scsi_xfer *xs = cm->cm_private;
int s = splbio();
xs->error = XS_DRIVER_STUFFUP;
- scsi_done(xs);
splx(s);
+ scsi_done(xs);
aac_remove_bio(cm);
aac_unmap_command(cm);
@@ -2505,9 +2505,7 @@ aac_raw_scsi_cmd(struct scsi_xfer *xs)
/* XXX Not yet implemented */
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
}
#endif
diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c
index 27f3a8257ef..bebe8de45c5 100644
--- a/sys/dev/ic/adv.c
+++ b/sys/dev/ic/adv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adv.c,v 1.29 2010/05/19 15:27:34 oga Exp $ */
+/* $OpenBSD: adv.c,v 1.30 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */
/*
@@ -656,9 +656,7 @@ adv_scsi_cmd(xs)
xs->error = XS_DRIVER_STUFFUP;
adv_free_ccb(sc, ccb);
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
bus_dmamap_sync(dmat, ccb->dmamap_xfer,
diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c
index 30a508f9986..c8f9a4a1e52 100644
--- a/sys/dev/ic/adw.c
+++ b/sys/dev/ic/adw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adw.c,v 1.43 2010/05/19 15:27:35 oga Exp $ */
+/* $OpenBSD: adw.c,v 1.44 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */
/*
@@ -632,9 +632,7 @@ retryagain:
case ADW_ERROR:
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -654,9 +652,7 @@ retryagain:
}
} else {
/* adw_build_req() has set xs->error already */
- s = splbio();
scsi_done(xs);
- splx(s);
}
}
diff --git a/sys/dev/ic/aic6360.c b/sys/dev/ic/aic6360.c
index ff852019840..e153117cad0 100644
--- a/sys/dev/ic/aic6360.c
+++ b/sys/dev/ic/aic6360.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic6360.c,v 1.22 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: aic6360.c,v 1.23 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: aic6360.c,v 1.52 1996/12/10 21:27:51 thorpej Exp $ */
#ifdef DDB
@@ -519,9 +519,7 @@ aic_scsi_cmd(struct scsi_xfer *xs)
flags = xs->flags;
if ((acb = aic_get_acb(sc, flags)) == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -818,7 +816,6 @@ aic_done(struct aic_softc *sc, struct aic_acb *acb)
struct scsi_xfer *xs = acb->xs;
struct scsi_link *sc_link = xs->sc_link;
struct aic_tinfo *ti = &sc->sc_tinfo[sc_link->target];
- int s;
AIC_TRACE(("aic_done "));
@@ -871,9 +868,7 @@ aic_done(struct aic_softc *sc, struct aic_acb *acb)
aic_free_acb(sc, acb, xs->flags);
ti->cmds++;
- s = splbio();
scsi_done(xs);
- splx(s);
}
void
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index a99285b9906..7b843aa2cfd 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.203 2010/05/18 20:54:34 oga Exp $ */
+/* $OpenBSD: ami.c,v 1.204 2010/05/20 00:55:17 krw Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -1339,9 +1339,7 @@ ami_scsi_raw_cmd(struct scsi_xfer *xs)
xs->sense.flags = SKEY_ILLEGAL_REQUEST;
xs->sense.add_sense_code = 0x20; /* illcmd, 0x24 illfield */
xs->error = XS_SENSE;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1352,9 +1350,7 @@ ami_scsi_raw_cmd(struct scsi_xfer *xs)
splx(s);
if (ccb == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1380,8 +1376,8 @@ ami_scsi_raw_cmd(struct scsi_xfer *xs)
xs->error = XS_DRIVER_STUFFUP;
s = splbio();
ami_put_ccb(ccb);
- scsi_done(xs);
splx(s);
+ scsi_done(xs);
return;
}
@@ -1463,9 +1459,7 @@ ami_scsi_cmd(struct scsi_xfer *xs)
AMI_DPRINTF(AMI_D_CMD, ("no target %d ", target));
/* XXX should be XS_SENSE and sense filled out */
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1486,9 +1480,7 @@ ami_scsi_cmd(struct scsi_xfer *xs)
splx(s);
if (ccb == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1515,9 +1507,7 @@ ami_scsi_cmd(struct scsi_xfer *xs)
AMI_DPRINTF(AMI_D_CMD, ("opc %d tgt %d ", xs->cmd->opcode,
target));
xs->error = XS_NOERROR;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
case REQUEST_SENSE:
@@ -1531,9 +1521,7 @@ ami_scsi_cmd(struct scsi_xfer *xs)
ami_copy_internal_data(xs, &sd, sizeof(sd));
xs->error = XS_NOERROR;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
case INQUIRY:
@@ -1551,9 +1539,7 @@ ami_scsi_cmd(struct scsi_xfer *xs)
ami_copy_internal_data(xs, &inq, sizeof(inq));
xs->error = XS_NOERROR;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
case READ_CAPACITY:
@@ -1564,9 +1550,7 @@ ami_scsi_cmd(struct scsi_xfer *xs)
ami_copy_internal_data(xs, &rcd, sizeof(rcd));
xs->error = XS_NOERROR;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
default:
@@ -1574,9 +1558,7 @@ ami_scsi_cmd(struct scsi_xfer *xs)
xs->cmd->opcode, target));
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1596,9 +1578,7 @@ ami_scsi_cmd(struct scsi_xfer *xs)
printf("%s: out of bounds %u-%u >= %u\n", DEVNAME(sc),
blockno, blockcnt, sc->sc_hdr[target].hd_size);
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1607,9 +1587,7 @@ ami_scsi_cmd(struct scsi_xfer *xs)
splx(s);
if (ccb == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1634,8 +1612,8 @@ ami_scsi_cmd(struct scsi_xfer *xs)
xs->error = XS_DRIVER_STUFFUP;
s = splbio();
ami_put_ccb(ccb);
- scsi_done(xs);
splx(s);
+ scsi_done(xs);
return;
}
diff --git a/sys/dev/ic/bha.c b/sys/dev/ic/bha.c
index f6c87629d96..cf7e2f58cb1 100644
--- a/sys/dev/ic/bha.c
+++ b/sys/dev/ic/bha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bha.c,v 1.22 2010/05/19 15:27:35 oga Exp $ */
+/* $OpenBSD: bha.c,v 1.23 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: bha.c,v 1.27 1998/11/19 21:53:00 thorpej Exp $ */
#undef BHADEBUG
@@ -1406,9 +1406,7 @@ bha_scsi_cmd(xs)
bad:
xs->error = XS_DRIVER_STUFFUP;
bha_free_ccb(sc, ccb);
- s = splbio();
scsi_done(xs);
- splx(s);
}
/*
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c
index 2801a23644d..25bbf52da87 100644
--- a/sys/dev/ic/cac.c
+++ b/sys/dev/ic/cac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cac.c,v 1.37 2010/05/19 15:27:35 oga Exp $ */
+/* $OpenBSD: cac.c,v 1.38 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */
/*
@@ -597,9 +597,7 @@ cac_scsi_cmd(xs)
if (target >= sc->sc_nunits || link->lun != 0) {
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
diff --git a/sys/dev/ic/dpt.c b/sys/dev/ic/dpt.c
index 65c2a521576..c4cdab8c1b6 100644
--- a/sys/dev/ic/dpt.c
+++ b/sys/dev/ic/dpt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dpt.c,v 1.24 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: dpt.c,v 1.25 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: dpt.c,v 1.12 1999/10/23 16:26:33 ad Exp $ */
/*-
@@ -1004,9 +1004,7 @@ dpt_scsi_cmd(xs)
xs->error = XS_DRIVER_STUFFUP;
dpt_free_ccb(sc, ccb);
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1061,9 +1059,7 @@ dpt_scsi_cmd(xs)
printf("%s: dpt_cmd failed\n", sc->sc_dv.dv_xname);
dpt_free_ccb(sc, ccb);
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c
index e5f93a7c461..e6eb2eb2606 100644
--- a/sys/dev/ic/gdt_common.c
+++ b/sys/dev/ic/gdt_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gdt_common.c,v 1.49 2010/03/29 23:33:39 krw Exp $ */
+/* $OpenBSD: gdt_common.c,v 1.50 2010/05/20 00:55:17 krw Exp $ */
/*
* Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved.
@@ -1011,18 +1011,14 @@ gdt_raw_scsi_cmd(struct scsi_xfer *xs)
xs->sense.flags = SKEY_ILLEGAL_REQUEST;
xs->sense.add_sense_code = 0x20; /* illcmd, 0x24 illfield */
xs->error = XS_SENSE;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
if ((ccb = gdt_get_ccb(sc, xs->flags)) == NULL) {
GDT_DPRINTF(GDT_D_CMD, ("no ccb available for %p ", xs));
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
diff --git a/sys/dev/ic/iha.c b/sys/dev/ic/iha.c
index 704da2a2924..7ad622b13fe 100644
--- a/sys/dev/ic/iha.c
+++ b/sys/dev/ic/iha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha.c,v 1.37 2010/05/19 15:27:35 oga Exp $ */
+/* $OpenBSD: iha.c,v 1.38 2010/05/20 00:55:17 krw Exp $ */
/*-------------------------------------------------------------------------
*
* Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller.
@@ -266,22 +266,18 @@ iha_scsi_cmd(xs)
struct iha_scb *pScb;
struct scsi_link *sc_link = xs->sc_link;
struct iha_softc *sc = sc_link->adapter_softc;
- int s, error;
+ int error;
if ((xs->cmdlen > 12) || (sc_link->target >= IHA_MAX_TARGETS)) {
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
pScb = iha_pop_free_scb(sc);
if (pScb == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -320,9 +316,7 @@ iha_scsi_cmd(xs)
iha_append_free_scb(sc, pScb);
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
bus_dmamap_sync(sc->sc_dmat, pScb->SCB_DataDma,
@@ -334,9 +328,7 @@ iha_scsi_cmd(xs)
if (error) {
bus_dmamap_unload(sc->sc_dmat, pScb->SCB_DataDma);
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -2479,7 +2471,6 @@ iha_done_scb(sc, pScb)
{
struct scsi_sense_data *s1, *s2;
struct scsi_xfer *xs = pScb->SCB_Xs;
- int s;
if (xs != NULL) {
timeout_del(&xs->stimeout);
@@ -2559,9 +2550,7 @@ iha_done_scb(sc, pScb)
break;
}
- s = splbio();
scsi_done(xs);
- splx(s);
}
iha_append_free_scb(sc, pScb);
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index 2bd11f2ecb1..f5468d6a22c 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.104 2010/05/16 20:33:59 nicm Exp $ */
+/* $OpenBSD: mfi.c,v 1.105 2010/05/20 00:55:17 krw Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -990,7 +990,6 @@ mfi_scsi_cmd(struct scsi_xfer *xs)
uint32_t blockcnt;
uint8_t target = link->target;
uint8_t mbox[MFI_MBOX_SIZE];
- int s;
DNPRINTF(MFI_D_CMD, "%s: mfi_scsi_cmd opcode: %#x\n",
DEVNAME(sc), xs->cmd->opcode);
@@ -1005,9 +1004,7 @@ mfi_scsi_cmd(struct scsi_xfer *xs)
if ((ccb = mfi_get_ccb(sc)) == NULL) {
DNPRINTF(MFI_D_CMD, "%s: mfi_scsi_cmd no ccb\n", DEVNAME(sc));
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1091,9 +1088,7 @@ mfi_scsi_cmd(struct scsi_xfer *xs)
}
mfi_put_ccb(ccb);
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1107,9 +1102,7 @@ mfi_scsi_cmd(struct scsi_xfer *xs)
stuffup:
xs->error = XS_DRIVER_STUFFUP;
complete:
- s = splbio();
scsi_done(xs);
- splx(s);
}
int
diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c
index 7be39a3b6c6..70745a89fc2 100644
--- a/sys/dev/ic/ncr53c9x.c
+++ b/sys/dev/ic/ncr53c9x.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr53c9x.c,v 1.45 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: ncr53c9x.c,v 1.46 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: ncr53c9x.c,v 1.56 2000/11/30 14:41:46 thorpej Exp $ */
/*
@@ -812,9 +812,7 @@ ncr53c9x_scsi_cmd(xs)
/* Initialize LUN info and add to list. */
if ((li = malloc(sizeof(*li), M_DEVBUF, M_NOWAIT)) == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
bzero(li, sizeof(*li));
@@ -829,9 +827,7 @@ ncr53c9x_scsi_cmd(xs)
if ((ecb = ncr53c9x_get_ecb(sc, flags)) == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1097,7 +1093,7 @@ ncr53c9x_done(sc, ecb)
struct scsi_xfer *xs = ecb->xs;
struct scsi_link *sc_link = xs->sc_link;
struct ncr53c9x_tinfo *ti = &sc->sc_tinfo[sc_link->target];
- int s, lun = sc_link->lun;
+ int lun = sc_link->lun;
struct ncr53c9x_linfo *li = TINFO_LUN(ti, lun);
NCR_TRACE(("[ncr53c9x_done(error:%x)] ", xs->error));
@@ -1173,9 +1169,7 @@ ncr53c9x_done(sc, ecb)
ncr53c9x_free_ecb(sc, ecb, xs->flags);
ti->cmds++;
- s = splbio();
scsi_done(xs);
- splx(s);
}
void
diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c
index 0427b8b89fa..284e8154c4d 100644
--- a/sys/dev/ic/osiop.c
+++ b/sys/dev/ic/osiop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: osiop.c,v 1.42 2010/05/19 15:27:35 oga Exp $ */
+/* $OpenBSD: osiop.c,v 1.43 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: osiop.c,v 1.9 2002/04/05 18:27:54 bouyer Exp $ */
/*
@@ -395,9 +395,7 @@ osiop_scsicmd(xs)
#endif
splx(s);
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c
index e65f60fd715..3d1b02dac5f 100644
--- a/sys/dev/ic/twe.c
+++ b/sys/dev/ic/twe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: twe.c,v 1.35 2010/03/29 23:33:39 krw Exp $ */
+/* $OpenBSD: twe.c,v 1.36 2010/05/20 00:55:17 krw Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved.
@@ -792,9 +792,7 @@ twe_scsi_cmd(xs)
if (target >= TWE_MAX_UNITS || !sc->sc_hdr[target].hd_present ||
link->lun != 0) {
xs->error = XS_DRIVER_STUFFUP;
- lock = TWE_LOCK(sc);
scsi_done(xs);
- TWE_UNLOCK(sc, lock);
return;
}
@@ -851,9 +849,7 @@ twe_scsi_cmd(xs)
case PREVENT_ALLOW:
TWE_DPRINTF(TWE_D_CMD, ("PREVENT/ALLOW "));
- lock = TWE_LOCK(sc);
scsi_done(xs);
- TWE_UNLOCK(sc, lock);
return;
case READ_COMMAND:
@@ -940,9 +936,7 @@ twe_scsi_cmd(xs)
xs->error = XS_DRIVER_STUFFUP;
}
- lock = TWE_LOCK(sc);
scsi_done(xs);
- TWE_UNLOCK(sc, lock);
}
int
diff --git a/sys/dev/ic/uha.c b/sys/dev/ic/uha.c
index e789b25428a..bf2a270c36b 100644
--- a/sys/dev/ic/uha.c
+++ b/sys/dev/ic/uha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uha.c,v 1.16 2010/03/23 01:57:20 krw Exp $ */
+/* $OpenBSD: uha.c,v 1.17 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: uha.c,v 1.3 1996/10/13 01:37:29 christos Exp $ */
#undef UHADEBUG
@@ -366,9 +366,7 @@ uha_scsi_cmd(xs)
flags = xs->flags;
if ((mscp = uha_get_mscp(sc, flags)) == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
mscp->xs = xs;
@@ -495,9 +493,7 @@ uha_scsi_cmd(xs)
bad:
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
uha_free_mscp(sc, mscp);
return;
}
diff --git a/sys/dev/isa/aha.c b/sys/dev/isa/aha.c
index 77138b0babf..6fefc155bfa 100644
--- a/sys/dev/isa/aha.c
+++ b/sys/dev/isa/aha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aha.c,v 1.68 2010/04/28 21:23:18 kettenis Exp $ */
+/* $OpenBSD: aha.c,v 1.69 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: aha.c,v 1.11 1996/05/12 23:51:23 mycroft Exp $ */
#undef AHADIAG
@@ -1258,9 +1258,7 @@ aha_scsi_cmd(xs)
flags = xs->flags;
if ((ccb = aha_get_ccb(sc, flags)) == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
ccb->xs = xs;
@@ -1291,9 +1289,7 @@ aha_scsi_cmd(xs)
xs->datalen, NULL, BUS_DMA_NOWAIT) != 0) {
aha_free_ccb(sc, ccb);
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
for (seg = 0; seg < ccb->dmam->dm_nsegs; seg++) {
diff --git a/sys/dev/isa/seagate.c b/sys/dev/isa/seagate.c
index 1c6222c7348..48b0fbf7205 100644
--- a/sys/dev/isa/seagate.c
+++ b/sys/dev/isa/seagate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: seagate.c,v 1.33 2010/03/23 01:57:20 krw Exp $ */
+/* $OpenBSD: seagate.c,v 1.34 2010/05/20 00:55:17 krw Exp $ */
/*
* ST01/02, Future Domain TMC-885, TMC-950 SCSI driver
@@ -546,9 +546,7 @@ sea_scsi_cmd(struct scsi_xfer *xs)
flags = xs->flags;
if ((scb = sea_get_scb(sea, flags)) == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
scb->flags = SCB_ACTIVE;
@@ -562,9 +560,7 @@ sea_scsi_cmd(struct scsi_xfer *xs)
*/
printf("%s: resetting\n", sea->sc_dev.dv_xname);
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1152,7 +1148,6 @@ void
sea_done(struct sea_softc *sea, struct sea_scb *scb)
{
struct scsi_xfer *xs = scb->xs;
- int s;
timeout_del(&scb->xs->stimeout);
@@ -1168,9 +1163,7 @@ sea_done(struct sea_softc *sea, struct sea_scb *scb)
xs->error = XS_DRIVER_STUFFUP;
}
sea_free_scb(sea, scb, xs->flags);
- s = splbio();
scsi_done(xs);
- splx(s);
}
/*
diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c
index 1d2b0415909..d9008aba071 100644
--- a/sys/dev/isa/wds.c
+++ b/sys/dev/isa/wds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wds.c,v 1.33 2010/03/23 01:57:20 krw Exp $ */
+/* $OpenBSD: wds.c,v 1.34 2010/05/20 00:55:17 krw Exp $ */
/* $NetBSD: wds.c,v 1.13 1996/11/03 16:20:31 mycroft Exp $ */
#undef WDSDIAG
@@ -1058,9 +1058,7 @@ wds_scsi_cmd(xs)
/* XXX Fix me! */
printf("%s: reset!\n", sc->sc_dev.dv_xname);
wds_init(sc);
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1073,9 +1071,7 @@ wds_scsi_cmd(xs)
#endif
if ((scb = wds_get_scb(sc, flags, NEEDBUFFER(sc))) == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
scb->xs = xs;
diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c
index 31c2e2d6c0e..fef6b756d7b 100644
--- a/sys/dev/pci/arc.c
+++ b/sys/dev/pci/arc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc.c,v 1.83 2010/05/19 15:27:35 oga Exp $ */
+/* $OpenBSD: arc.c,v 1.84 2010/05/20 00:55:17 krw Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -724,9 +724,7 @@ arc_scsi_cmd(struct scsi_xfer *xs)
xs->sense.flags = SKEY_ILLEGAL_REQUEST;
xs->sense.add_sense_code = 0x20;
xs->error = XS_SENSE;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -735,9 +733,7 @@ arc_scsi_cmd(struct scsi_xfer *xs)
splx(s);
if (ccb == NULL) {
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c
index be8bc779a01..0f24edff8da 100644
--- a/sys/dev/pci/ips.c
+++ b/sys/dev/pci/ips.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ips.c,v 1.96 2010/04/06 22:28:07 tedu Exp $ */
+/* $OpenBSD: ips.c,v 1.97 2010/05/20 00:55:17 krw Exp $ */
/*
* Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org>
@@ -871,9 +871,7 @@ ips_scsi_cmd(struct scsi_xfer *xs)
"target %d, lun %d\n", sc->sc_dev.dv_xname,
target, link->lun));
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -918,9 +916,7 @@ ips_scsi_cmd(struct scsi_xfer *xs)
DPRINTF(IPS_D_ERR, ("%s: ips_scsi_cmd: no ccb\n",
sc->sc_dev.dv_xname));
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -979,9 +975,7 @@ ips_scsi_cmd(struct scsi_xfer *xs)
DPRINTF(IPS_D_ERR, ("%s: ips_scsi_cmd: no ccb\n",
sc->sc_dev.dv_xname));
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1001,9 +995,7 @@ ips_scsi_cmd(struct scsi_xfer *xs)
xs->error = XS_DRIVER_STUFFUP;
}
- s = splbio();
scsi_done(xs);
- splx(s);
}
void
@@ -1036,9 +1028,7 @@ ips_scsi_pt_cmd(struct scsi_xfer *xs)
xs->sense.flags = SKEY_ILLEGAL_REQUEST;
xs->sense.add_sense_code = 0x20; /* illcmd, 0x24 illfield */
xs->error = XS_SENSE;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1051,9 +1041,7 @@ ips_scsi_pt_cmd(struct scsi_xfer *xs)
DPRINTF(IPS_D_ERR, ("%s: ips_scsi_pt_cmd: no ccb\n",
sc->sc_dev.dv_xname));
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -1098,9 +1086,7 @@ ips_scsi_pt_cmd(struct scsi_xfer *xs)
ips_ccb_put(sc, ccb);
splx(s);
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
if (cmd->sgcnt > 0)
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c
index c06f0fee7c2..a6ab1fb4dbb 100644
--- a/sys/dev/pci/mpii.c
+++ b/sys/dev/pci/mpii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpii.c,v 1.17 2010/04/15 20:18:11 marco Exp $ */
+/* $OpenBSD: mpii.c,v 1.18 2010/05/20 00:55:18 krw Exp $ */
/*
* Copyright (c) 2010 Mike Belopuhov <mkb@crypt.org.ru>
* Copyright (c) 2009 James Giannoules
@@ -4367,18 +4367,14 @@ mpii_scsi_cmd(struct scsi_xfer *xs)
xs->sense.flags = SKEY_ILLEGAL_REQUEST;
xs->sense.add_sense_code = 0x20;
xs->error = XS_SENSE;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
if ((dev = sc->sc_devs[link->target]) == NULL) {
/* device no longer exists */
xs->error = XS_SELTIMEOUT;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -4387,9 +4383,7 @@ mpii_scsi_cmd(struct scsi_xfer *xs)
splx(s);
if (ccb == NULL) {
xs->error = XS_NO_CCB;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
diff --git a/sys/dev/pci/qli_pci.c b/sys/dev/pci/qli_pci.c
index 611c3959e13..a1a615f5aef 100644
--- a/sys/dev/pci/qli_pci.c
+++ b/sys/dev/pci/qli_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qli_pci.c,v 1.17 2010/05/18 20:54:34 oga Exp $ */
+/* $OpenBSD: qli_pci.c,v 1.18 2010/05/20 00:55:18 krw Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2007 David Collins <dave@davec.name>
@@ -1013,9 +1013,7 @@ qli_scsi_cmd(struct scsi_xfer *xs)
stuffup:
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
}
int
diff --git a/sys/dev/sdmmc/sdmmc_scsi.c b/sys/dev/sdmmc/sdmmc_scsi.c
index 58030b0138a..9e87a3a387e 100644
--- a/sys/dev/sdmmc/sdmmc_scsi.c
+++ b/sys/dev/sdmmc/sdmmc_scsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmc_scsi.c,v 1.21 2010/03/23 01:57:20 krw Exp $ */
+/* $OpenBSD: sdmmc_scsi.c,v 1.22 2010/05/20 00:55:18 krw Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -298,7 +298,6 @@ sdmmc_scsi_cmd(struct scsi_xfer *xs)
u_int32_t blockno;
u_int32_t blockcnt;
struct sdmmc_ccb *ccb;
- int s;
if (link->target >= scbus->sc_ntargets || tgt->card == NULL ||
link->lun != 0) {
@@ -306,9 +305,7 @@ sdmmc_scsi_cmd(struct scsi_xfer *xs)
DEVNAME(sc), link->target));
/* XXX should be XS_SENSE and sense filled out */
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -337,17 +334,13 @@ sdmmc_scsi_cmd(struct scsi_xfer *xs)
"Drive #%02d", link->target);
strlcpy(inq.revision, " ", sizeof(inq.revision));
bcopy(&inq, xs->data, MIN(xs->datalen, sizeof inq));
- s = splbio();
scsi_done(xs);
- splx(s);
return;
case TEST_UNIT_READY:
case START_STOP:
case SYNCHRONIZE_CACHE:
- s = splbio();
scsi_done(xs);
- splx(s);
return;
case READ_CAPACITY:
@@ -355,18 +348,14 @@ sdmmc_scsi_cmd(struct scsi_xfer *xs)
_lto4b(tgt->card->csd.capacity - 1, rcd.addr);
_lto4b(tgt->card->csd.sector_size, rcd.length);
bcopy(&rcd, xs->data, MIN(xs->datalen, sizeof rcd));
- s = splbio();
scsi_done(xs);
- splx(s);
return;
default:
DPRINTF(("%s: unsupported scsi command %#x\n",
DEVNAME(sc), xs->cmd->opcode));
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -378,9 +367,7 @@ sdmmc_scsi_cmd(struct scsi_xfer *xs)
DPRINTF(("%s: out of bounds %u-%u >= %u\n", DEVNAME(sc),
blockno, blockcnt, tgt->card->csd.capacity));
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
@@ -388,9 +375,7 @@ sdmmc_scsi_cmd(struct scsi_xfer *xs)
if (ccb == NULL) {
printf("%s: out of ccbs\n", DEVNAME(sc));
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
return;
}
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index c56e4b03924..c56301894a8 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.202 2010/05/18 04:41:14 dlg Exp $ */
+/* $OpenBSD: softraid.c,v 1.203 2010/05/20 00:55:17 krw Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -1817,13 +1817,9 @@ sr_wu_get(struct sr_discipline *sd, int canwait)
void
sr_scsi_done(struct sr_discipline *sd, struct scsi_xfer *xs)
{
- int s;
-
DNPRINTF(SR_D_DIS, "%s: sr_scsi_done: xs %p\n", DEVNAME(sd->sd_sc), xs);
- s = splbio();
scsi_done(xs);
- splx(s);
}
void
diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c
index 65827a820fb..66d59909f93 100644
--- a/sys/dev/usb/umass_scsi.c
+++ b/sys/dev/usb/umass_scsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umass_scsi.c,v 1.28 2010/03/23 01:57:20 krw Exp $ */
+/* $OpenBSD: umass_scsi.c,v 1.29 2010/05/20 00:55:18 krw Exp $ */
/* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -172,7 +172,7 @@ umass_scsi_cmd(struct scsi_xfer *xs)
struct scsi_link *sc_link = xs->sc_link;
struct umass_softc *sc = sc_link->adapter_softc;
struct scsi_generic *cmd;
- int cmdlen, dir, s;
+ int cmdlen, dir;
#ifdef UMASS_DEBUG
microtime(&sc->tv);
@@ -249,9 +249,7 @@ umass_scsi_cmd(struct scsi_xfer *xs)
/* Return if command finishes early. */
done:
- s = splbio();
scsi_done(xs);
- splx(s);
}
void
@@ -270,7 +268,6 @@ umass_scsi_cb(struct umass_softc *sc, void *priv, int residue, int status)
struct scsi_xfer *xs = priv;
struct scsi_link *link = xs->sc_link;
int cmdlen;
- int s;
#ifdef UMASS_DEBUG
struct timeval tv;
u_int delta;
@@ -375,9 +372,7 @@ umass_scsi_cb(struct umass_softc *sc, void *priv, int residue, int status)
}
}
- s = splbio();
scsi_done(xs);
- splx(s);
}
/*
@@ -388,7 +383,6 @@ umass_scsi_sense_cb(struct umass_softc *sc, void *priv, int residue,
int status)
{
struct scsi_xfer *xs = priv;
- int s;
DPRINTF(UDMASS_CMD,("umass_scsi_sense_cb: xs=%p residue=%d "
"status=%d\n", xs, residue, status));
@@ -428,8 +422,6 @@ umass_scsi_sense_cb(struct umass_softc *sc, void *priv, int residue,
}
}
- s = splbio();
scsi_done(xs);
- splx(s);
}
diff --git a/sys/dev/vscsi.c b/sys/dev/vscsi.c
index 739bfc61b1e..bf45052df41 100644
--- a/sys/dev/vscsi.c
+++ b/sys/dev/vscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vscsi.c,v 1.8 2010/03/23 01:57:19 krw Exp $ */
+/* $OpenBSD: vscsi.c,v 1.9 2010/05/20 00:55:17 krw Exp $ */
/*
* Copyright (c) 2008 David Gwynne <dlg@openbsd.org>
@@ -207,12 +207,8 @@ vscsi_cmd(struct scsi_xfer *xs)
void
vscsi_xs_stuffup(struct scsi_xfer *xs)
{
- int s;
-
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
}
int
@@ -392,7 +388,6 @@ vscsi_t2i(struct vscsi_softc *sc, struct vscsi_ioc_t2i *t2i)
struct scsi_link *link;
int rv = 0;
int polled;
- int s;
TAILQ_FOREACH(ccb, &sc->sc_ccb_t2i, ccb_entry) {
if (ccb->ccb_tag == t2i->tag)
@@ -426,9 +421,7 @@ vscsi_t2i(struct vscsi_softc *sc, struct vscsi_ioc_t2i *t2i)
polled = ISSET(xs->flags, SCSI_POLL);
- s = splbio();
scsi_done(xs);
- splx(s);
if (polled) {
ccb->ccb_xs = NULL;
diff --git a/sys/scsi/mpath.c b/sys/scsi/mpath.c
index 98c058cbf8b..14390f624c3 100644
--- a/sys/scsi/mpath.c
+++ b/sys/scsi/mpath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpath.c,v 1.13 2010/03/23 01:57:20 krw Exp $ */
+/* $OpenBSD: mpath.c,v 1.14 2010/05/20 00:55:18 krw Exp $ */
/*
* Copyright (c) 2009 David Gwynne <dlg@openbsd.org>
@@ -126,12 +126,8 @@ mpath_attach(struct device *parent, struct device *self, void *aux)
void
mpath_xs_stuffup(struct scsi_xfer *xs)
{
- int s;
-
xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
scsi_done(xs);
- splx(s);
}
int
@@ -195,9 +191,7 @@ mpath_done(struct scsi_xfer *mxs)
scsi_xs_put(mxs);
- s = splbio();
scsi_done(xs);
- splx(s);
}
void