summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/cbus/fdc.c7
-rw-r--r--sys/pc98/pc98/fd.c7
-rw-r--r--sys/pc98/pc98/wd.c8
-rw-r--r--sys/pc98/pc98/wd_cd.c4
-rw-r--r--sys/pc98/pc98/wfd.c8
5 files changed, 5 insertions, 29 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c
index a3431ef..63bfecd 100644
--- a/sys/pc98/cbus/fdc.c
+++ b/sys/pc98/cbus/fdc.c
@@ -2375,12 +2375,7 @@ fdstate(fdc_p fdc)
/* ALL DONE */
fd->skip = 0;
fdc->bp = NULL;
- /* Tell devstat we have finished with the transaction */
- devstat_end_transaction(&fd->device_stats,
- bp->b_bcount - bp->b_resid,
- DEVSTAT_TAG_NONE,
- (bp->b_flags & B_READ) ?
- DEVSTAT_READ : DEVSTAT_WRITE);
+ devstat_end_transaction_buf(&fd->device_stats, bp);
biodone(bp);
fdc->fd = (fd_p) 0;
fdc->fdu = -1;
diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c
index a3431ef..63bfecd 100644
--- a/sys/pc98/pc98/fd.c
+++ b/sys/pc98/pc98/fd.c
@@ -2375,12 +2375,7 @@ fdstate(fdc_p fdc)
/* ALL DONE */
fd->skip = 0;
fdc->bp = NULL;
- /* Tell devstat we have finished with the transaction */
- devstat_end_transaction(&fd->device_stats,
- bp->b_bcount - bp->b_resid,
- DEVSTAT_TAG_NONE,
- (bp->b_flags & B_READ) ?
- DEVSTAT_READ : DEVSTAT_WRITE);
+ devstat_end_transaction_buf(&fd->device_stats, bp);
biodone(bp);
fdc->fd = (fd_p) 0;
fdc->fdu = -1;
diff --git a/sys/pc98/pc98/wd.c b/sys/pc98/pc98/wd.c
index 4404e9c..6383b34 100644
--- a/sys/pc98/pc98/wd.c
+++ b/sys/pc98/pc98/wd.c
@@ -1279,13 +1279,7 @@ done: ;
bp->b_resid = bp->b_bcount - du->dk_skip * DEV_BSIZE;
wdutab[du->dk_lunit].b_active = 0;
du->dk_skip = 0;
-
- /* Update device stats */
- devstat_end_transaction(&du->dk_stats,
- bp->b_bcount - bp->b_resid,
- DEVSTAT_TAG_NONE,
- (bp->b_flags & B_READ) ? DEVSTAT_READ : DEVSTAT_WRITE);
-
+ devstat_end_transaction_buf(&du->dk_stats, bp);
biodone(bp);
}
diff --git a/sys/pc98/pc98/wd_cd.c b/sys/pc98/pc98/wd_cd.c
index 678603f..e4b9ddc 100644
--- a/sys/pc98/pc98/wd_cd.c
+++ b/sys/pc98/pc98/wd_cd.c
@@ -546,9 +546,6 @@ static void
acd_done(struct acd *cdp, struct buf *bp, int resid, struct atapires result)
{
- devstat_end_transaction(cdp->device_stats, bp->b_bcount - resid,
- DEVSTAT_TAG_NONE,
- (bp->b_flags&B_READ) ? DEVSTAT_READ:DEVSTAT_WRITE);
if (result.code) {
atapi_error(cdp->ata, cdp->unit, result);
bp->b_error = EIO;
@@ -558,6 +555,7 @@ acd_done(struct acd *cdp, struct buf *bp, int resid, struct atapires result)
if ((bp->b_flags & B_READ) == B_WRITE)
cdp->flags |= F_WRITTEN;
}
+ devstat_end_transaction_buf(cdp->device_stats, bp);
biodone(bp);
acd_start(cdp);
}
diff --git a/sys/pc98/pc98/wfd.c b/sys/pc98/pc98/wfd.c
index 3a169ac..21fdb44 100644
--- a/sys/pc98/pc98/wfd.c
+++ b/sys/pc98/pc98/wfd.c
@@ -554,13 +554,7 @@ static void wfd_done (struct wfd *t, struct buf *bp, int resid,
*/
if (((int)bp->b_driver1)-- <= 0) {
bp->b_resid = (int)bp->b_driver2;
-
- /* Tell devstat we have finished with the transaction */
- devstat_end_transaction(&t->device_stats,
- bp->b_bcount - bp->b_resid,
- DEVSTAT_TAG_NONE,
- (bp->b_flags & B_READ) ? DEVSTAT_READ : DEVSTAT_WRITE);
-
+ devstat_end_transaction_buf(&t->device_stats, bp);
biodone (bp);
}
OpenPOWER on IntegriCloud