diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-05-20 00:55:19 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-05-20 00:55:19 +0000 |
commit | c713a7721e58dd0a453fae998afd21f12fd821e8 (patch) | |
tree | 4c794ea604130c88f12d5a7295bcd0cb4624515f /sys/dev/sdmmc/sdmmc_scsi.c | |
parent | 3c3718e53ebd6b33568092f43f11f6f1d0c4130e (diff) |
New scsi code seems to be stable. Pluck previously identified
low-hanging splbio/splx pairs that are no longer needed and see if
this reveals any hidden scsi flaws.
ok dlg@
Diffstat (limited to 'sys/dev/sdmmc/sdmmc_scsi.c')
-rw-r--r-- | sys/dev/sdmmc/sdmmc_scsi.c | 17 |
1 files changed, 1 insertions, 16 deletions
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; } |