summaryrefslogtreecommitdiffstats
path: root/sys/pc98
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/pc98
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/pc98')
-rw-r--r--sys/pc98/cbus/fdc.c6
-rw-r--r--sys/pc98/pc98/fd.c6
-rw-r--r--sys/pc98/pc98/wd.c3
-rw-r--r--sys/pc98/pc98/wd_cd.c15
-rw-r--r--sys/pc98/pc98/wfd.c3
-rw-r--r--sys/pc98/pc98/wst.c4
6 files changed, 11 insertions, 26 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c
index 74db224..a7df8b3 100644
--- a/sys/pc98/cbus/fdc.c
+++ b/sys/pc98/cbus/fdc.c
@@ -2514,8 +2514,7 @@ fdstate(fdc_p fdc)
fd->skip = 0;
fdc->bp = NULL;
device_unbusy(fd->dev);
- devstat_end_transaction_bio(&fd->device_stats, bp);
- biodone(bp);
+ biofinish(bp, &fd->device_stats, 0);
fdc->fd = (fd_p) 0;
fdc->fdu = -1;
fdc->state = FINDWORK;
@@ -2687,8 +2686,7 @@ retrier(struct fdc_data *fdc)
fdc->bp = NULL;
fdc->fd->skip = 0;
device_unbusy(fd->dev);
- devstat_end_transaction_bio(&fdc->fd->device_stats, bp);
- biodone(bp);
+ biofinish(bp, &fdc->fd->device_stats, 0);
fdc->state = FINDWORK;
fdc->flags |= FDC_NEEDS_RESET;
fdc->fd = (fd_p) 0;
diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c
index 74db224..a7df8b3 100644
--- a/sys/pc98/pc98/fd.c
+++ b/sys/pc98/pc98/fd.c
@@ -2514,8 +2514,7 @@ fdstate(fdc_p fdc)
fd->skip = 0;
fdc->bp = NULL;
device_unbusy(fd->dev);
- devstat_end_transaction_bio(&fd->device_stats, bp);
- biodone(bp);
+ biofinish(bp, &fd->device_stats, 0);
fdc->fd = (fd_p) 0;
fdc->fdu = -1;
fdc->state = FINDWORK;
@@ -2687,8 +2686,7 @@ retrier(struct fdc_data *fdc)
fdc->bp = NULL;
fdc->fd->skip = 0;
device_unbusy(fd->dev);
- devstat_end_transaction_bio(&fdc->fd->device_stats, bp);
- biodone(bp);
+ biofinish(bp, &fdc->fd->device_stats, 0);
fdc->state = FINDWORK;
fdc->flags |= FDC_NEEDS_RESET;
fdc->fd = (fd_p) 0;
diff --git a/sys/pc98/pc98/wd.c b/sys/pc98/pc98/wd.c
index a527233..5779d39 100644
--- a/sys/pc98/pc98/wd.c
+++ b/sys/pc98/pc98/wd.c
@@ -1210,8 +1210,7 @@ done: ;
bp->bio_resid = bp->bio_bcount - du->dk_skip * DEV_BSIZE;
wdutab[du->dk_lunit].b_active = 0;
du->dk_skip = 0;
- devstat_end_transaction_bio(&du->dk_stats, bp);
- biodone(bp);
+ biofinish(bp, &du->dk_stats, 0);
}
/* controller idle */
diff --git a/sys/pc98/pc98/wd_cd.c b/sys/pc98/pc98/wd_cd.c
index 0de3104..98146f6 100644
--- a/sys/pc98/pc98/wd_cd.c
+++ b/sys/pc98/pc98/wd_cd.c
@@ -437,9 +437,7 @@ acdstrategy(struct bio *bp)
#ifdef NOTYET
/* allow write only on CD-R/RW media */ /* all for now SOS */
if ((bp->bio_cmd == BIO_WRITE) && !(writeable_media)) {
- bp->bio_error = EROFS;
- bp->bio_flags |= BIO_ERROR;
- biodone(bp);
+ biofinish(bp, NULL, EROFS);
return;
}
#endif
@@ -474,9 +472,7 @@ acd_start(struct acd *cdp)
/* Should reject all queued entries if media have changed. */
if (cdp->flags & F_MEDIA_CHANGED) {
- bp->bio_error = EIO;
- bp->bio_flags |= BIO_ERROR;
- biodone(bp);
+ biofinish(bp, NULL, EIO);
return;
}
@@ -486,9 +482,7 @@ acd_start(struct acd *cdp)
if ((cdp->flags & F_TRACK_PREPED) == 0) {
if ((cdp->flags & F_TRACK_PREP) == 0) {
printf("wcd%d: sequence error\n", cdp->lun);
- bp->bio_error = EIO;
- bp->bio_flags |= BIO_ERROR;
- biodone(bp);
+ biofinish(bp, NULL, EIO);
return;
} else {
if (acd_open_track(cdp, &cdp->preptrack) != 0) {
@@ -540,8 +534,7 @@ acd_done(struct acd *cdp, struct bio *bp, int resid, struct atapires result)
if (bp->bio_cmd == BIO_WRITE)
cdp->flags |= F_WRITTEN;
}
- devstat_end_transaction_bio(cdp->device_stats, bp);
- biodone(bp);
+ biofinish(bp, cdp->device_stats, 0);
acd_start(cdp);
}
diff --git a/sys/pc98/pc98/wfd.c b/sys/pc98/pc98/wfd.c
index 42abf43..fd6d66c 100644
--- a/sys/pc98/pc98/wfd.c
+++ b/sys/pc98/pc98/wfd.c
@@ -542,8 +542,7 @@ static void wfd_done (struct wfd *t, struct bio *bp, int resid,
*/
if (((int)bp->bio_driver1)-- <= 0) {
bp->bio_resid = (int)bp->bio_driver2;
- devstat_end_transaction_bio(&t->device_stats, bp);
- biodone (bp);
+ biofinish(bp, &t->device_stats, 0);
}
wfd_start (t);
diff --git a/sys/pc98/pc98/wst.c b/sys/pc98/pc98/wst.c
index 4b9b1b3..0f2c942 100644
--- a/sys/pc98/pc98/wst.c
+++ b/sys/pc98/pc98/wst.c
@@ -395,9 +395,7 @@ wststrategy(struct bio *bp)
/* Check for != blocksize requests */
if (bp->bio_bcount % t->blksize) {
printf("wst%d: bad request, must be multiple of %d\n", lun, t->blksize);
- bp->bio_error = EIO;
- bp->bio_flags |= BIO_ERROR;
- biodone(bp);
+ biofinish(bp, NULL, EIO);
return;
}
OpenPOWER on IntegriCloud