Remove the old-style disk instrumentation support. Nothing uses it

anymore.
This commit is contained in:
thorpej 1996-06-06 16:17:41 +00:00
parent e9e80a6043
commit bcab59cd3c
4 changed files with 4 additions and 58 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rd.c,v 1.20 1996/02/14 02:44:54 thorpej Exp $ */ /* $NetBSD: rd.c,v 1.21 1996/06/06 16:17:41 thorpej Exp $ */
/* /*
* Copyright (c) 1988 University of Utah. * Copyright (c) 1988 University of Utah.
@ -52,7 +52,6 @@
#include <sys/systm.h> #include <sys/systm.h>
#include <sys/buf.h> #include <sys/buf.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/dkstat.h> /* XXX */
#include <sys/disklabel.h> #include <sys/disklabel.h>
#include <sys/disk.h> #include <sys/disk.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
@ -333,9 +332,6 @@ rdident(rs, hd, verbose)
name[i] = (n & 0xf) + '0'; name[i] = (n & 0xf) + '0';
n >>= 4; n >>= 4;
} }
/* use drive characteristics to calculate xfer rate */
rs->sc_wpms = 1000000 * (desc->d_sectsize/2) /
desc->d_blocktime;
} }
#ifdef DEBUG #ifdef DEBUG
if (rddebug & RDB_IDENT) { if (rddebug & RDB_IDENT) {
@ -514,15 +510,6 @@ rdopen(dev, flags, mode, p)
if (error) if (error)
return(error); return(error);
} }
if (rs->sc_hd->hp_dk >= 0) {
/* guess at xfer rate based on 3600 rpm (60 rps) */
if (rs->sc_wpms == 0)
rs->sc_wpms = 60 * rs->sc_dkdev.dk_label->d_nsectors
* DEV_BSIZE / 2;
/* XXX Support old-style instrumentation for now. */
dk_wpms[rs->sc_hd->hp_dk] = rs->sc_wpms;
}
mask = 1 << rdpart(dev); mask = 1 << rdpart(dev);
if (mode == S_IFCHR) if (mode == S_IFCHR)
@ -711,12 +698,6 @@ again:
if (hpibsend(hp->hp_ctlr, hp->hp_slave, C_CMD, &rs->sc_ioc.c_unit, if (hpibsend(hp->hp_ctlr, hp->hp_slave, C_CMD, &rs->sc_ioc.c_unit,
sizeof(rs->sc_ioc)-2) == sizeof(rs->sc_ioc)-2) { sizeof(rs->sc_ioc)-2) == sizeof(rs->sc_ioc)-2) {
/* XXX Support old-style instrumentation for now. */
if (hp->hp_dk >= 0) {
dk_busy |= 1 << hp->hp_dk;
dk_seek[hp->hp_dk]++;
}
/* Instrumentation. */ /* Instrumentation. */
disk_busy(&rs->sc_dkdev); disk_busy(&rs->sc_dkdev);
rs->sc_dkdev.dk_seek++; rs->sc_dkdev.dk_seek++;
@ -769,13 +750,6 @@ rdgo(unit)
rw = bp->b_flags & B_READ; rw = bp->b_flags & B_READ;
/* XXX Support old-style instrumentation for now. */
if (hp->hp_dk >= 0) {
dk_busy |= 1 << hp->hp_dk;
dk_xfer[hp->hp_dk]++;
dk_wds[hp->hp_dk] += rs->sc_resid >> 6;
}
/* Instrumentation. */ /* Instrumentation. */
disk_busy(&rs->sc_dkdev); disk_busy(&rs->sc_dkdev);
@ -806,10 +780,6 @@ rdintr(arg)
return; return;
} }
#endif #endif
/* XXX Support old-style instrumentation for now. */
if (hp->hp_dk >= 0)
dk_busy &= ~(1 << hp->hp_dk);
disk_unbusy(&rs->sc_dkdev, (bp->b_bcount - bp->b_resid)); disk_unbusy(&rs->sc_dkdev, (bp->b_bcount - bp->b_resid));
if (rs->sc_flags & RDF_SEEK) { if (rs->sc_flags & RDF_SEEK) {
@ -827,10 +797,6 @@ rdintr(arg)
rdstats[unit].rdpollwaits++; rdstats[unit].rdpollwaits++;
#endif #endif
/* XXX Support old-style instrumentation for now. */
if (hp->hp_dk >= 0)
dk_busy |= 1 << hp->hp_dk;
/* Instrumentation. */ /* Instrumentation. */
disk_busy(&rs->sc_dkdev); disk_busy(&rs->sc_dkdev);
rs->sc_flags |= RDF_SWAIT; rs->sc_flags |= RDF_SWAIT;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rdvar.h,v 1.4 1996/01/07 22:02:16 thorpej Exp $ */ /* $NetBSD: rdvar.h,v 1.5 1996/06/06 16:17:42 thorpej Exp $ */
/* /*
* Copyright (c) 1988 University of Utah. * Copyright (c) 1988 University of Utah.
@ -61,7 +61,6 @@ struct rd_softc {
short sc_punit; short sc_punit;
char *sc_addr; char *sc_addr;
int sc_resid; int sc_resid;
u_int sc_wpms;
struct rd_describe sc_rddesc; struct rd_describe sc_rddesc;
struct devqueue sc_dq; struct devqueue sc_dq;
struct rd_iocmd sc_ioc; struct rd_iocmd sc_ioc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sd.c,v 1.22 1996/02/14 02:45:05 thorpej Exp $ */ /* $NetBSD: sd.c,v 1.23 1996/06/06 16:17:44 thorpej Exp $ */
/* /*
* Copyright (c) 1990, 1993 * Copyright (c) 1990, 1993
@ -48,7 +48,6 @@
#include <sys/systm.h> #include <sys/systm.h>
#include <sys/buf.h> #include <sys/buf.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/dkstat.h> /* XXX */
#include <sys/disklabel.h> #include <sys/disklabel.h>
#include <sys/disk.h> #include <sys/disk.h>
#include <sys/malloc.h> #include <sys/malloc.h>
@ -313,7 +312,6 @@ sdident(sc, hd, verbose)
printf("drive empty\n"); printf("drive empty\n");
} }
sc->sc_wpms = 32 * (60 * DEV_BSIZE / 2); /* XXX */
scsi_delay(0); scsi_delay(0);
return(inqbuf.type); return(inqbuf.type);
failed: failed:
@ -606,10 +604,6 @@ sdopen(dev, flags, mode, p)
return(error); return(error);
} }
/* XXX Support old-style instrumentation for now. */
if (sc->sc_hd->hp_dk >= 0)
dk_wpms[sc->sc_hd->hp_dk] = sc->sc_wpms;
mask = 1 << sdpart(dev); mask = 1 << sdpart(dev);
if (mode == S_IFCHR) if (mode == S_IFCHR)
sc->sc_dkdev.dk_copenmask |= mask; sc->sc_dkdev.dk_copenmask |= mask;
@ -999,14 +993,6 @@ sdgo(unit)
#endif #endif
if (scsigo(hp->hp_ctlr, hp->hp_slave, sc->sc_punit, if (scsigo(hp->hp_ctlr, hp->hp_slave, sc->sc_punit,
bp, cmd, pad) == 0) { bp, cmd, pad) == 0) {
/* XXX Support old-style instrumentation for now. */
if (hp->hp_dk >= 0) {
dk_busy |= 1 << hp->hp_dk;
++dk_seek[hp->hp_dk];
++dk_xfer[hp->hp_dk];
dk_wds[hp->hp_dk] += bp->b_bcount >> 6;
}
/* Instrumentation. */ /* Instrumentation. */
disk_busy(&sc->sc_dkdev); disk_busy(&sc->sc_dkdev);
sc->sc_dkdev.dk_seek++; /* XXX */ sc->sc_dkdev.dk_seek++; /* XXX */
@ -1041,10 +1027,6 @@ sdintr(arg, stat)
return; return;
} }
/* XXX Support old-style instrumentation for now. */
if (hp->hp_dk >= 0)
dk_busy &=~ (1 << hp->hp_dk);
disk_unbusy(&sc->sc_dkdev, (bp->b_bcount - bp->b_resid)); disk_unbusy(&sc->sc_dkdev, (bp->b_bcount - bp->b_resid));
if (stat) { if (stat) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: sdvar.h,v 1.4 1996/01/07 22:02:21 thorpej Exp $ */ /* $NetBSD: sdvar.h,v 1.5 1996/06/06 16:17:45 thorpej Exp $ */
/* /*
* Copyright (c) 1990, 1993 * Copyright (c) 1990, 1993
@ -52,7 +52,6 @@ struct sd_softc {
int sc_blksize; /* device block size in bytes */ int sc_blksize; /* device block size in bytes */
u_int sc_heads; /* number of heads (tracks) */ u_int sc_heads; /* number of heads (tracks) */
u_int sc_cyls; /* number of cylinders */ u_int sc_cyls; /* number of cylinders */
u_int sc_wpms; /* average xfer rate in 16 bit wds/sec. */
}; };
/* sc_flags values */ /* sc_flags values */