summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2010-06-30 02:17:26 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2010-06-30 02:17:26 +0000
commit9cd4b11748e94ef97c0cb0e5bef233e7c075620d (patch)
treef597e7596f83d58b0a074574d609cbd5cee88616 /sys/scsi
parentd5dc4ed476959634b31ea5f99d2eb02bb8930c92 (diff)
Prune some dead assignments in st_interpret_sense(); st(4) already
always explicitly sets bp->b_resid before calling biodone(), so these are unneeded. ok krw@
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/st.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index dfbf443282f..2499fe3c2ec 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: st.c,v 1.101 2010/06/29 07:08:07 matthew Exp $ */
+/* $OpenBSD: st.c,v 1.102 2010/06/30 02:17:25 matthew Exp $ */
/* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */
/*
@@ -1904,7 +1904,6 @@ st_interpret_sense(struct scsi_xfer *xs)
struct scsi_sense_data *sense = &xs->sense;
struct scsi_link *sc_link = xs->sc_link;
struct st_softc *st = sc_link->device_softc;
- struct buf *bp = xs->bp;
u_int8_t serr = sense->error_code & SSD_ERRCODE;
u_int8_t skey = sense->flags & SSD_KEY;
int32_t info;
@@ -1961,8 +1960,6 @@ st_interpret_sense(struct scsi_xfer *xs)
xs->resid = info * st->blksize;
if (sense->flags & SSD_EOM) {
st->flags |= ST_EIO_PENDING;
- if (bp)
- bp->b_resid = xs->resid;
}
if (sense->flags & SSD_FILEMARK) {
st->flags |= ST_AT_FILEMARK;
@@ -1970,13 +1967,9 @@ st_interpret_sense(struct scsi_xfer *xs)
st->media_fileno++;
st->media_blkno = 0;
}
- if (bp)
- bp->b_resid = xs->resid;
}
if (sense->flags & SSD_ILI) {
st->flags |= ST_EIO_PENDING;
- if (bp)
- bp->b_resid = xs->resid;
if (sense->error_code & SSD_ERRCODE_VALID &&
(xs->flags & SCSI_SILENT) == 0)
printf("%s: block wrong size, %d blocks residual\n",
@@ -2000,8 +1993,6 @@ st_interpret_sense(struct scsi_xfer *xs)
if (st->flags & ST_EIO_PENDING)
return EIO;
if (st->flags & ST_AT_FILEMARK) {
- if (bp)
- bp->b_resid = xs->resid;
return 0;
}
}
@@ -2014,8 +2005,6 @@ st_interpret_sense(struct scsi_xfer *xs)
st->media_fileno++;
st->media_blkno = 0;
}
- if (bp)
- bp->b_resid = bp->b_bcount;
return 0;
}
if (sense->flags & SSD_ILI) {
@@ -2040,8 +2029,6 @@ st_interpret_sense(struct scsi_xfer *xs)
return (EIO);
}
xs->resid = info;
- if (bp)
- bp->b_resid = info;
return (0);
}
}
@@ -2059,10 +2046,6 @@ st_interpret_sense(struct scsi_xfer *xs)
} else if (!(st->flags & (ST_2FM_AT_EOD | ST_BLANK_READ))) {
st->flags |= ST_BLANK_READ;
xs->resid = xs->datalen;
- if (bp) {
- bp->b_resid = xs->resid;
- /* return an EOF */
- }
return (0);
}
}