diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2010-06-14 10:03:35 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2010-06-14 10:03:35 +0000 |
commit | 546620ea3d1d95638906f98f83a94c47f717d7e1 (patch) | |
tree | e12e13aae30d08e4c2c84bcacdaaf5d42ffd6d7d /sys | |
parent | c2ccef055a5c5736242db24fd2d81390b79c0cac (diff) |
remove the scsi_buf_* functions as these have been
replaced by BUFQ's.
OK krw@, dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/scsi_base.c | 70 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 8 |
2 files changed, 2 insertions, 76 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index aa5a70bf1ac..61255c95a47 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.174 2010/06/01 10:11:05 dlg Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.175 2010/06/14 10:03:33 thib Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -2252,74 +2252,6 @@ scsi_decode_sense(struct scsi_sense_data *sense, int flag) return (rqsbuf); } -void -scsi_buf_enqueue(struct buf *head, struct buf *bp, struct mutex *mtx) -{ - struct buf *dp; - - mtx_enter(mtx); - dp = head; - bp->b_actf = NULL; - bp->b_actb = dp->b_actb; - *dp->b_actb = bp; - dp->b_actb = &bp->b_actf; - mtx_leave(mtx); -} - -struct buf * -scsi_buf_dequeue(struct buf *head, struct mutex *mtx) -{ - struct buf *bp; - - mtx_enter(mtx); - bp = head->b_actf; - if (bp != NULL) - head->b_actf = bp->b_actf; - if (head->b_actf == NULL) - head->b_actb = &head->b_actf; - mtx_leave(mtx); - - return (bp); -} - -void -scsi_buf_requeue(struct buf *head, struct buf *bp, struct mutex *mtx) -{ - mtx_enter(mtx); - bp->b_actf = head->b_actf; - head->b_actf = bp; - if (bp->b_actf == NULL) - head->b_actb = &bp->b_actf; - mtx_leave(mtx); -} - -int -scsi_buf_canqueue(struct buf *head, struct mutex *mtx) -{ - int rv; - - mtx_enter(mtx); - rv = (head->b_actf != NULL); - mtx_leave(mtx); - - return (rv); -} - -void -scsi_buf_killqueue(struct buf *head, struct mutex *mtx) -{ - struct buf *bp; - int s; - - while ((bp = scsi_buf_dequeue(head, mtx)) != NULL) { - bp->b_error = ENXIO; - bp->b_flags |= B_ERROR; - s = splbio(); - biodone(bp); - splx(s); - } -} - #ifdef SCSIDEBUG /* * Given a scsi_xfer, dump the request, in all its glory diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 5df9066f3b1..32c9b9b4be3 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.125 2010/05/24 06:57:09 dlg Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.126 2010/06/14 10:03:34 thib Exp $ */ /* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */ /* @@ -598,12 +598,6 @@ int scsi_report_luns(struct scsi_link *, int, void scsi_minphys(struct buf *, struct scsi_link *); int scsi_interpret_sense(struct scsi_xfer *); -void scsi_buf_enqueue(struct buf *, struct buf *, struct mutex *); -struct buf *scsi_buf_dequeue(struct buf *, struct mutex *); -void scsi_buf_requeue(struct buf *, struct buf *, struct mutex *); -int scsi_buf_canqueue(struct buf *, struct mutex *); -void scsi_buf_killqueue(struct buf *, struct mutex *); - void scsi_xs_show(struct scsi_xfer *); void scsi_print_sense(struct scsi_xfer *); void scsi_show_mem(u_char *, int); |