summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2001-05-06 20:00:03 +0000
committerphk <phk@FreeBSD.org>2001-05-06 20:00:03 +0000
commit16caeec9b02aa3b15073b68736e4e950266ffd81 (patch)
tree530c90a78ebb64a793fe1f7688a50c3a46c4eba9 /sys/cam
parent33cb778d44db479f7586e1b5c1f9b400db720f22 (diff)
downloadFreeBSD-src-16caeec9b02aa3b15073b68736e4e950266ffd81.zip
FreeBSD-src-16caeec9b02aa3b15073b68736e4e950266ffd81.tar.gz
Actually biofinish(struct bio *, struct devstat *, int error) is more general
than the bioerror(). Most of this patch is generated by scripts.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_cd.c11
-rw-r--r--sys/cam/scsi/scsi_da.c11
-rw-r--r--sys/cam/scsi/scsi_pt.c11
-rw-r--r--sys/cam/scsi/scsi_sa.c11
4 files changed, 12 insertions, 32 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index 4768ff1..278dfc2 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -387,9 +387,7 @@ cdoninvalidate(struct cam_periph *periph)
while ((q_bp = bioq_first(&softc->bio_queue)) != NULL){
bioq_remove(&softc->bio_queue, q_bp);
q_bp->bio_resid = q_bp->bio_bcount;
- q_bp->bio_error = ENXIO;
- q_bp->bio_flags |= BIO_ERROR;
- biodone(q_bp);
+ biofinish(q_bp, NULL, ENXIO);
}
splx(s);
@@ -1577,9 +1575,7 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
while ((q_bp = bioq_first(&softc->bio_queue)) != NULL) {
bioq_remove(&softc->bio_queue, q_bp);
q_bp->bio_resid = q_bp->bio_bcount;
- q_bp->bio_error = EIO;
- q_bp->bio_flags |= BIO_ERROR;
- biodone(q_bp);
+ biofinish(q_bp, NULL, EIO);
}
splx(s);
bp->bio_resid = bp->bio_bcount;
@@ -1611,8 +1607,7 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
if (softc->flags & CD_FLAG_CHANGER)
cdchangerschedule(softc);
- devstat_end_transaction_bio(&softc->device_stats, bp);
- biodone(bp);
+ biofinish(bp, &softc->device_stats, 0);
break;
}
case CD_CCB_PROBE:
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 772e5bc..10c22f8 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -862,9 +862,7 @@ daoninvalidate(struct cam_periph *periph)
while ((q_bp = bioq_first(&softc->bio_queue)) != NULL){
bioq_remove(&softc->bio_queue, q_bp);
q_bp->bio_resid = q_bp->bio_bcount;
- q_bp->bio_error = ENXIO;
- q_bp->bio_flags |= BIO_ERROR;
- biodone(q_bp);
+ biofinish(q_bp, NULL, ENXIO);
}
splx(s);
@@ -1244,9 +1242,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
!= NULL) {
bioq_remove(&softc->bio_queue, q_bp);
q_bp->bio_resid = q_bp->bio_bcount;
- q_bp->bio_error = EIO;
- q_bp->bio_flags |= BIO_ERROR;
- biodone(q_bp);
+ biofinish(q_bp, NULL, EIO);
}
splx(s);
bp->bio_error = error;
@@ -1285,8 +1281,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
if (softc->device_stats.busy_count == 0)
softc->flags |= DA_FLAG_WENT_IDLE;
- devstat_end_transaction_bio(&softc->device_stats, bp);
- biodone(bp);
+ biofinish(bp, &softc->device_stats, 0);
break;
}
case DA_CCB_PROBE:
diff --git a/sys/cam/scsi/scsi_pt.c b/sys/cam/scsi/scsi_pt.c
index 3137b4a..dff8c60 100644
--- a/sys/cam/scsi/scsi_pt.c
+++ b/sys/cam/scsi/scsi_pt.c
@@ -414,9 +414,7 @@ ptoninvalidate(struct cam_periph *periph)
while ((q_bp = bioq_first(&softc->bio_queue)) != NULL){
bioq_remove(&softc->bio_queue, q_bp);
q_bp->bio_resid = q_bp->bio_bcount;
- q_bp->bio_error = ENXIO;
- q_bp->bio_flags |= BIO_ERROR;
- biodone(q_bp);
+ biofinish(q_bp, NULL, ENXIO);
}
splx(s);
@@ -626,9 +624,7 @@ ptdone(struct cam_periph *periph, union ccb *done_ccb)
!= NULL) {
bioq_remove(&softc->bio_queue, q_bp);
q_bp->bio_resid = q_bp->bio_bcount;
- q_bp->bio_error = EIO;
- q_bp->bio_flags |= BIO_ERROR;
- biodone(q_bp);
+ biofinish(q_bp, NULL, EIO);
}
splx(s);
bp->bio_error = error;
@@ -662,8 +658,7 @@ ptdone(struct cam_periph *periph, union ccb *done_ccb)
LIST_REMOVE(&done_ccb->ccb_h, periph_links.le);
splx(oldspl);
- devstat_end_transaction_bio(&softc->device_stats, bp);
- biodone(bp);
+ biofinish(bp, &softc->device_stats, 0);
break;
}
case PT_CCB_WAITING:
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c
index 318534e..de3c7c1 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -1323,9 +1323,7 @@ saoninvalidate(struct cam_periph *periph)
while ((q_bp = bioq_first(&softc->bio_queue)) != NULL){
bioq_remove(&softc->bio_queue, q_bp);
q_bp->bio_resid = q_bp->bio_bcount;
- q_bp->bio_error = ENXIO;
- q_bp->bio_flags |= BIO_ERROR;
- biodone(q_bp);
+ biofinish(q_bp, NULL, ENXIO);
}
softc->queue_count = 0;
splx(s);
@@ -1708,9 +1706,7 @@ sadone(struct cam_periph *periph, union ccb *done_ccb)
while ((q_bp = bioq_first(&softc->bio_queue)) != NULL) {
bioq_remove(&softc->bio_queue, q_bp);
q_bp->bio_resid = q_bp->bio_bcount;
- q_bp->bio_error = EIO;
- q_bp->bio_flags |= BIO_ERROR;
- biodone(q_bp);
+ biofinish(q_bp, NULL, EIO);
}
splx(s);
}
@@ -1761,8 +1757,7 @@ sadone(struct cam_periph *periph, union ccb *done_ccb)
bp->bio_resid, bp->bio_bcount));
}
#endif
- devstat_end_transaction_bio(&softc->device_stats, bp);
- biodone(bp);
+ biofinish(bp, &softc->device_stats, 0);
break;
}
case SA_CCB_WAITING:
OpenPOWER on IntegriCloud