SCCS-vsn: sys/vax/uba/tmscp.c 7.13
SCCS-vsn: sys/vax/uba/ut.c 7.10
SCCS-vsn: sys/vax/uba/tm.c 7.12
SCCS-vsn: sys/vax/uba/ts.c 7.12
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)tm.c 7.11 (Berkeley) %G%
+ * @(#)tm.c 7.12 (Berkeley) %G%
#include "buf.h"
#include "conf.h"
#include "user.h"
#include "buf.h"
#include "conf.h"
#include "user.h"
-#include "proc.h"
-#include "file.h"
#include "map.h"
#include "vm.h"
#include "ioctl.h"
#include "map.h"
#include "vm.h"
#include "ioctl.h"
#include "cmap.h"
#include "uio.h"
#include "kernel.h"
#include "cmap.h"
#include "uio.h"
#include "kernel.h"
#include "machine/pte.h"
#include "../vax/cpu.h"
#include "machine/pte.h"
#include "../vax/cpu.h"
daddr_t sc_timo; /* time until timeout expires */
int sc_blks; /* number of I/O operations since open */
int sc_softerrs; /* number of soft I/O errors since open */
daddr_t sc_timo; /* time until timeout expires */
int sc_blks; /* number of I/O operations since open */
int sc_softerrs; /* number of soft I/O errors since open */
- caddr_t sc_ctty; /* users controlling terminal (vnode) */
+ tpr_t sc_tpr; /* tprintf handle */
} te_softc[NTE];
#ifdef unneeded
int tmgapsdcnt; /* DEBUG */
} te_softc[NTE];
#ifdef unneeded
int tmgapsdcnt; /* DEBUG */
sc->sc_dens = dens;
sc->sc_blks = 0;
sc->sc_softerrs = 0;
sc->sc_dens = dens;
sc->sc_blks = 0;
sc->sc_softerrs = 0;
- sc->sc_ctty = (caddr_t)(u.u_procp->p_flag&SCTTY ?
- u.u_procp->p_session->s_ttyvp : 0);
+ sc->sc_tpr = tprintf_open();
s = splclock();
if (sc->sc_tact == 0) {
sc->sc_timo = INF;
s = splclock();
if (sc->sc_tact == 0) {
sc->sc_timo = INF;
if (sc->sc_blks > 100 && sc->sc_softerrs > sc->sc_blks / 100)
log(LOG_INFO, "te%d: %d soft errors in %d blocks\n",
TEUNIT(dev), sc->sc_softerrs, sc->sc_blks);
if (sc->sc_blks > 100 && sc->sc_softerrs > sc->sc_blks / 100)
log(LOG_INFO, "te%d: %d soft errors in %d blocks\n",
TEUNIT(dev), sc->sc_softerrs, sc->sc_blks);
+ tprintf_close(sc->sc_tpr);
sc->sc_openf = 0;
return (0);
}
sc->sc_openf = 0;
return (0);
}
/*
* Couldn't recover error
*/
/*
* Couldn't recover error
*/
"te%d: hard error bn%d er=%b\n", minor(bp->b_dev)&03,
bp->b_blkno, sc->sc_erreg, TMER_BITS);
#ifdef AVIV
"te%d: hard error bn%d er=%b\n", minor(bp->b_dev)&03,
bp->b_blkno, sc->sc_erreg, TMER_BITS);
#ifdef AVIV
-/* @(#)tmscp.c 7.12 (Berkeley) %G% */
+/* @(#)tmscp.c 7.13 (Berkeley) %G% */
#ifndef lint
static char *sccsid = "@(#)tmscp.c 1.24 (ULTRIX) 1/21/86";
#ifndef lint
static char *sccsid = "@(#)tmscp.c 1.24 (ULTRIX) 1/21/86";
#include "systm.h"
#include "buf.h"
#include "conf.h"
#include "systm.h"
#include "buf.h"
#include "conf.h"
-#include "user.h"
-#include "proc.h"
#include "file.h"
#include "map.h"
#include "vm.h"
#include "file.h"
#include "map.h"
#include "vm.h"
#include "mtio.h"
#include "cmap.h"
#include "uio.h"
#include "mtio.h"
#include "cmap.h"
#include "uio.h"
#include "../vax/pte.h"
#include "../vax/cpu.h"
#include "../vax/pte.h"
#include "../vax/cpu.h"
short tms_fmtmenu; /* the unit's format (density) menu */
short tms_unitflgs; /* unit flag parameters */
short tms_format; /* the unit's current format (density) */
short tms_fmtmenu; /* the unit's format (density) menu */
short tms_unitflgs; /* unit flag parameters */
short tms_format; /* the unit's current format (density) */
- caddr_t tms_ctty; /* user's controlling tty (vnode) */
+ tpr_t tms_tpr; /* tprintf handle */
} tms_info[NTMS];
struct uba_ctlr *tmscpminfo[NTMSCP];
struct uba_device *tmsdinfo[NTMS];
} tms_info[NTMS];
struct uba_ctlr *tmscpminfo[NTMSCP];
struct uba_device *tmsdinfo[NTMS];
return (EBUSY);
sc = &tmscp_softc[ui->ui_ctlr];
tms->tms_openf = 1;
return (EBUSY);
sc = &tmscp_softc[ui->ui_ctlr];
tms->tms_openf = 1;
- tms->tms_ctty = (caddr_t)(u.u_procp->p_flag&SCTTY ?
- u.u_procp->p_session->s_ttyvp : 0);
+ tms->tms_tpr = tprintf_open();
s = spl5();
if (sc->sc_state != S_RUN)
{
s = spl5();
if (sc->sc_state != S_RUN)
{
# endif
tmscpcommand(dev, TMS_CSE, 1);
}
# endif
tmscpcommand(dev, TMS_CSE, 1);
}
+ tprintf_close(tms->tms_tpr);
tms->tms_openf = 0;
return (0);
}
tms->tms_openf = 0;
return (0);
}
tms = &tms_info[ui->ui_unit];
if ((tmscpaddr->tmscpsa&TMSCP_ERR) || sc->sc_state != S_RUN)
{
tms = &tms_info[ui->ui_unit];
if ((tmscpaddr->tmscpsa&TMSCP_ERR) || sc->sc_state != S_RUN)
{
"tms%d: hard error bn%d\n",
minor(bp->b_dev)&03, bp->b_blkno);
log(TMS_PRI, "tmscp%d: sa 0%o, state %d\n",um->um_ctlr,
"tms%d: hard error bn%d\n",
minor(bp->b_dev)&03, bp->b_blkno);
log(TMS_PRI, "tmscp%d: sa 0%o, state %d\n",um->um_ctlr,
else
{
if (bp = dp->b_actf)
else
{
if (bp = dp->b_actf)
"tms%d: hard error bn%d: OFFLINE\n",
minor(bp->b_dev)&03, bp->b_blkno);
else
"tms%d: hard error bn%d: OFFLINE\n",
minor(bp->b_dev)&03, bp->b_blkno);
else
"tms%d: hard error: OFFLINE\n",
ui->ui_unit);
while (bp = dp->b_actf)
"tms%d: hard error: OFFLINE\n",
ui->ui_unit);
while (bp = dp->b_actf)
tms->tms_serex = 1;
if (st != M_ST_TAPEM)
{
tms->tms_serex = 1;
if (st != M_ST_TAPEM)
{
"tms%d: hard error bn%d\n",
minor(bp->b_dev)&03, bp->b_blkno);
errinfo(st); /* produces more info */
"tms%d: hard error bn%d\n",
minor(bp->b_dev)&03, bp->b_blkno);
errinfo(st); /* produces more info */
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ts.c 7.11 (Berkeley) %G%
+ * @(#)ts.c 7.12 (Berkeley) %G%
#include "systm.h"
#include "buf.h"
#include "conf.h"
#include "systm.h"
#include "buf.h"
#include "conf.h"
-#include "user.h"
-#include "proc.h"
#include "file.h"
#include "map.h"
#include "vm.h"
#include "file.h"
#include "map.h"
#include "vm.h"
#include "mtio.h"
#include "cmap.h"
#include "uio.h"
#include "mtio.h"
#include "cmap.h"
#include "uio.h"
#include "machine/pte.h"
#include "../vax/cpu.h"
#include "machine/pte.h"
#include "../vax/cpu.h"
struct ts_tsdata *sc_ubaddr; /* Unibus address of tsdata structure */
u_short sc_uba; /* Unibus addr of cmd pkt for tsdb */
short sc_density; /* value |'ed into char_mode for TC13 density */
struct ts_tsdata *sc_ubaddr; /* Unibus address of tsdata structure */
u_short sc_uba; /* Unibus addr of cmd pkt for tsdb */
short sc_density; /* value |'ed into char_mode for TC13 density */
- caddr_t sc_ctty; /* user's controlling tty (vnode) */
+ tpr_t sc_tpr; /* tprintf handle */
int sc_blks; /* number of I/O operations since open */
int sc_softerrs; /* number of soft I/O errors since open */
} ts_softc[NTS];
int sc_blks; /* number of I/O operations since open */
int sc_softerrs; /* number of soft I/O errors since open */
} ts_softc[NTS];
sc->sc_lastiow = 0;
sc->sc_blks = 0;
sc->sc_softerrs = 0;
sc->sc_lastiow = 0;
sc->sc_blks = 0;
sc->sc_softerrs = 0;
- sc->sc_ctty = (caddr_t)(u.u_procp->p_flag&SCTTY ?
- u.u_procp->p_session->s_ttyvp : 0);
+ sc->sc_tpr = tprintf_open();
if (sc->sc_blks > 100 && sc->sc_softerrs > sc->sc_blks / 100)
log(LOG_INFO, "ts%d: %d soft errors in %d blocks\n",
TSUNIT(dev), sc->sc_softerrs, sc->sc_blks);
if (sc->sc_blks > 100 && sc->sc_softerrs > sc->sc_blks / 100)
log(LOG_INFO, "ts%d: %d soft errors in %d blocks\n",
TSUNIT(dev), sc->sc_softerrs, sc->sc_blks);
+ tprintf_close(sc->sc_tpr);
sc->sc_openf = 0;
return (0);
}
sc->sc_openf = 0;
return (0);
}
case TS_REJECT: /* function reject */
if (state == SIO && sc->sc_ts.t_sts.s_xs0 & TS_WLE)
case TS_REJECT: /* function reject */
if (state == SIO && sc->sc_ts.t_sts.s_xs0 & TS_WLE)
- tprintf(sc->sc_ctty, "ts%d: write locked\n",
+ tprintf(sc->sc_tpr, "ts%d: write locked\n",
tsunit);
if ((sc->sc_ts.t_sts.s_xs0 & TS_ONL) == 0)
tsunit);
if ((sc->sc_ts.t_sts.s_xs0 & TS_ONL) == 0)
- tprintf(sc->sc_ctty, "ts%d: offline\n",
+ tprintf(sc->sc_tpr, "ts%d: offline\n",
tsunit);
break;
}
/*
* Couldn't recover error
*/
tsunit);
break;
}
/*
* Couldn't recover error
*/
- tprintf(sc->sc_ctty, "ts%d: hard error bn%d tssr=%b xs0=%b",
+ tprintf(sc->sc_tpr, "ts%d: hard error bn%d tssr=%b xs0=%b",
tsunit, bp->b_blkno, addr->tssr, TSSR_BITS,
sc->sc_ts.t_sts.s_xs0, TSXS0_BITS);
if (sc->sc_ts.t_sts.s_xs1)
tsunit, bp->b_blkno, addr->tssr, TSSR_BITS,
sc->sc_ts.t_sts.s_xs0, TSXS0_BITS);
if (sc->sc_ts.t_sts.s_xs1)
- tprintf(sc->sc_ctty, " xs1=%b", sc->sc_ts.t_sts.s_xs1,
+ tprintf(sc->sc_tpr, " xs1=%b", sc->sc_ts.t_sts.s_xs1,
TSXS1_BITS);
if (sc->sc_ts.t_sts.s_xs2)
TSXS1_BITS);
if (sc->sc_ts.t_sts.s_xs2)
- tprintf(sc->sc_ctty, " xs2=%b", sc->sc_ts.t_sts.s_xs2,
+ tprintf(sc->sc_tpr, " xs2=%b", sc->sc_ts.t_sts.s_xs2,
TSXS2_BITS);
if (sc->sc_ts.t_sts.s_xs3)
TSXS2_BITS);
if (sc->sc_ts.t_sts.s_xs3)
- tprintf(sc->sc_ctty, " xs3=%b", sc->sc_ts.t_sts.s_xs3,
+ tprintf(sc->sc_tpr, " xs3=%b", sc->sc_ts.t_sts.s_xs3,
- tprintf(sc->sc_ctty, "\n");
+ tprintf(sc->sc_tpr, "\n");
bp->b_flags |= B_ERROR;
goto opdone;
}
bp->b_flags |= B_ERROR;
goto opdone;
}
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ut.c 7.9 (Berkeley) %G%
+ * @(#)ut.c 7.10 (Berkeley) %G%
#include "buf.h"
#include "conf.h"
#include "file.h"
#include "buf.h"
#include "conf.h"
#include "file.h"
-#include "user.h"
-#include "proc.h"
#include "map.h"
#include "ioctl.h"
#include "mtio.h"
#include "cmap.h"
#include "uio.h"
#include "kernel.h"
#include "map.h"
#include "ioctl.h"
#include "mtio.h"
#include "cmap.h"
#include "uio.h"
#include "kernel.h"
#include "machine/pte.h"
#include "../vax/cpu.h"
#include "machine/pte.h"
#include "../vax/cpu.h"
u_short sc_dens; /* sticky selected density */
daddr_t sc_timo; /* time until timeout expires */
short sc_tact; /* timeout is active flag */
u_short sc_dens; /* sticky selected density */
daddr_t sc_timo; /* time until timeout expires */
short sc_tact; /* timeout is active flag */
- caddr_t sc_ctty; /* user's controlling tty (vnode) */
+ tpr_t sc_tpr; /* tprintf handle */
int sc_blks; /* number of I/O operations since open */
int sc_softerrs; /* number of soft I/O errors since open */
} tj_softc[NTJ];
int sc_blks; /* number of I/O operations since open */
int sc_softerrs; /* number of soft I/O errors since open */
} tj_softc[NTJ];
sc->sc_blks = 0;
sc->sc_softerrs = 0;
sc->sc_dens = dens;
sc->sc_blks = 0;
sc->sc_softerrs = 0;
sc->sc_dens = dens;
- sc->sc_ctty = (caddr_t)(u.u_procp->p_flag&SCTTY ?
- u.u_procp->p_session->s_ttyvp : 0);
+ sc->sc_tpr = tprintf_open();
/*
* For 6250 bpi take exclusive use of the UNIBUS.
*/
/*
* For 6250 bpi take exclusive use of the UNIBUS.
*/
if (sc->sc_blks > 100 && sc->sc_softerrs > sc->sc_blks / 100)
log(LOG_INFO, "tj%d: %d soft errors in %d blocks\n",
TJUNIT(dev), sc->sc_softerrs, sc->sc_blks);
if (sc->sc_blks > 100 && sc->sc_softerrs > sc->sc_blks / 100)
log(LOG_INFO, "tj%d: %d soft errors in %d blocks\n",
TJUNIT(dev), sc->sc_softerrs, sc->sc_blks);
+ tprintf_close(sc->sc_tpr);
sc->sc_openf = 0;
return (0);
}
sc->sc_openf = 0;
return (0);
}
*/
if (sc->sc_erreg & UTER_COR && (bp->b_flags & B_READ) &&
(addr->uttc & UTTC_DEN) != UT_NRZI) {
*/
if (sc->sc_erreg & UTER_COR && (bp->b_flags & B_READ) &&
(addr->uttc & UTTC_DEN) != UT_NRZI) {
"ut%d: soft error bn%d cs1=%b er=%b cs2=%b ds=%b\n",
tjunit, bp->b_blkno, cs1, UT_BITS, sc->sc_erreg,
UTER_BITS, cs2, UTCS2_BITS, sc->sc_dsreg, UTDS_BITS);
"ut%d: soft error bn%d cs1=%b er=%b cs2=%b ds=%b\n",
tjunit, bp->b_blkno, cs1, UT_BITS, sc->sc_erreg,
UTER_BITS, cs2, UTCS2_BITS, sc->sc_dsreg, UTDS_BITS);
/*
* Couldn't recover error.
*/
/*
* Couldn't recover error.
*/
"ut%d: hard error bn%d cs1=%b er=%b cs2=%b ds=%b\n",
tjunit, bp->b_blkno, cs1, UT_BITS, sc->sc_erreg,
UTER_BITS, cs2, UTCS2_BITS, sc->sc_dsreg, UTDS_BITS);
"ut%d: hard error bn%d cs1=%b er=%b cs2=%b ds=%b\n",
tjunit, bp->b_blkno, cs1, UT_BITS, sc->sc_erreg,
UTER_BITS, cs2, UTCS2_BITS, sc->sc_dsreg, UTDS_BITS);