SCCS-vsn: sys/vax/uba/dhu.c 4.9
SCCS-vsn: sys/vax/uba/tm.c 6.9
SCCS-vsn: sys/vax/uba/tmscp.c 5.2
SCCS-vsn: sys/vax/uba/ts.c 6.9
SCCS-vsn: sys/vax/uba/uda.c 6.18
SCCS-vsn: sys/vax/uba/ut.c 6.7
SCCS-vsn: sys/vax/uba/vp.c 6.7
SCCS-vsn: sys/vax/if/if_vv.c 6.16
struct vv_softc {
struct ifnet vs_if; /* network-visible interface */
struct ifuba vs_ifuba; /* UNIBUS resources */
struct vv_softc {
struct ifnet vs_if; /* network-visible interface */
struct ifuba vs_ifuba; /* UNIBUS resources */
+ u_short vs_host; /* this interface address */
short vs_oactive; /* is output active */
short vs_olen; /* length of last output */
u_short vs_lastx; /* address of last packet sent */
short vs_oactive; /* is output active */
short vs_olen; /* length of last output */
u_short vs_lastx; /* address of last packet sent */
register struct vv_header *v;
register int ubainfo;
register int i, successes, failures, waitcount;
register struct vv_header *v;
register int ubainfo;
register int i, successes, failures, waitcount;
+ u_short shost = 0xffff;
vs = &vv_softc[unit];
ui = vvinfo[unit];
vs = &vv_softc[unit];
ui = vvinfo[unit];
/* check message type, catch our node address */
if ((v->vh_type & 0xff) == RING_DIAGNOSTICS) {
/* check message type, catch our node address */
if ((v->vh_type & 0xff) == RING_DIAGNOSTICS) {
shost = v->vh_shost & 0xff;
/* send to ourself now */
((struct vv_header *)
shost = v->vh_shost & 0xff;
/* send to ourself now */
((struct vv_header *)
0xffff & addr->vvocsr, VV_OBITS);
addr->vvicsr = VV_RST; /* kill the sick board */
addr->vvocsr = VV_RST;
0xffff & addr->vvocsr, VV_OBITS);
addr->vvicsr = VV_RST; /* kill the sick board */
addr->vvocsr = VV_RST;
* 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.
*
- * @(#)dhu.c 4.8 (Berkeley) %G%
+ * @(#)dhu.c 4.9 (Berkeley) %G%
{
register struct tty *tp;
register int unit = UNIT(dev);
{
register struct tty *tp;
register int unit = UNIT(dev);
- register dhu = unit>>4;
- register bit = (1<<(unit&0xf));
int error;
tp = &dhu_tty[unit];
int error;
tp = &dhu_tty[unit];
int bits, how;
{
register struct dhudevice *dhuaddr;
int bits, how;
{
register struct dhudevice *dhuaddr;
- register int unit, mbits, lcr;
+ register int unit, mbits;
register struct uba_device *ui;
register struct dhudevice *addr;
int i;
register struct uba_device *ui;
register struct dhudevice *addr;
int i;
for (dhu = 0; dhu < NDHU; dhu++) {
ui = dhuinfo[dhu];
for (dhu = 0; dhu < NDHU; dhu++) {
ui = dhuinfo[dhu];
* 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 6.8 (Berkeley) %G%
+ * @(#)tm.c 6.9 (Berkeley) %G%
* For forward/backward space record update current position.
*/
if (bp == &ctmbuf[TMUNIT(bp->b_dev)])
* For forward/backward space record update current position.
*/
if (bp == &ctmbuf[TMUNIT(bp->b_dev)])
- switch (bp->b_command) {
+ switch ((int)bp->b_command) {
case TM_SFORW:
sc->sc_blkno -= bp->b_repcnt;
case TM_SFORW:
sc->sc_blkno -= bp->b_repcnt;
-/* @(#)tmscp.c 5.1 (Berkeley) %G% */
+/* @(#)tmscp.c 5.2 (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";
register struct tmscp_softc *sc = &tmscp_softc[ctlr];
/* ptr to software controller structure */
struct tmscpdevice *tmscpaddr; /* ptr to tmscpdevice struct (IP & SA) */
register struct tmscp_softc *sc = &tmscp_softc[ctlr];
/* ptr to software controller structure */
struct tmscpdevice *tmscpaddr; /* ptr to tmscpdevice struct (IP & SA) */
- struct uba_ctlr *um; /* UNUSED ptr to uba_ctlr (controller) struct */
int count; /* for probe delay time out */
# ifdef lint
int count; /* for probe delay time out */
# ifdef lint
/* the tmscp polling */
# ifdef lint
/* the tmscp polling */
# ifdef lint
- ui = ui; reg = reg; i = i;
# endif
tmscpaddr = (struct tmscpdevice *)um->um_addr;
/*
# endif
tmscpaddr = (struct tmscpdevice *)um->um_addr;
/*
tmscpip[ui->ui_ctlr][ui->ui_slave] = ui;
*((long *) mp->mscp_dscptr ) |= TMSCP_OWN | TMSCP_INT;/* maybe we should poll*/
i = tmscpaddr->tmscpip;
tmscpip[ui->ui_ctlr][ui->ui_slave] = ui;
*((long *) mp->mscp_dscptr ) |= TMSCP_OWN | TMSCP_INT;/* maybe we should poll*/
i = tmscpaddr->tmscpip;
+#ifdef lint
+ i = i;
+#endif
while(!tms->tms_status)
; /* Wait for some status */
# ifdef DEBUG
while(!tms->tms_status)
; /* Wait for some status */
# ifdef DEBUG
register struct uba_device *ui; /* ptr to unibus dev struct */
{
register struct uba_ctlr *um = ui->ui_mi; /* ptr to controller struct */
register struct uba_device *ui; /* ptr to unibus dev struct */
{
register struct uba_ctlr *um = ui->ui_mi; /* ptr to controller struct */
- struct tmscpdevice *tmscpaddr = (struct tmscpdevice *) um->um_addr; /* IP & SA */
- struct mscp *mp;
- int i; /* Assign to here to start the tmscp-dev polling */
-# ifdef lint
- i = i;
-# endif lint
ui->ui_flags = 0;
tmscpip[ui->ui_ctlr][ui->ui_slave] = ui;
# ifdef DEBUG
ui->ui_flags = 0;
tmscpip[ui->ui_ctlr][ui->ui_slave] = ui;
# ifdef DEBUG
* in the run state, call init to initialize the tmscp controller first.
*/
* in the run state, call init to initialize the tmscp controller first.
*/
tmscpopen(dev, flag)
dev_t dev;
int flag;
tmscpopen(dev, flag)
dev_t dev;
int flag;
-# ifdef lint
- flag = flag; i = i;
-# endif
unit = TMSUNIT(dev);
# ifdef DEBUG
printd("tmscpopen unit %d\n",unit);
unit = TMSUNIT(dev);
# ifdef DEBUG
printd("tmscpopen unit %d\n",unit);
# endif
*((long *) mp->mscp_dscptr ) |= TMSCP_OWN | TMSCP_INT;
i = tmscpaddr->tmscpip;
# endif
*((long *) mp->mscp_dscptr ) |= TMSCP_OWN | TMSCP_INT;
i = tmscpaddr->tmscpip;
+#ifdef lint
+ i = i;
+#endif
/*
* To make sure we wake up, timeout in 240 seconds.
* Wakeup in tmscprsp routine.
/*
* To make sure we wake up, timeout in 240 seconds.
* Wakeup in tmscprsp routine.
register dev_t dev;
register flag;
{
register dev_t dev;
register flag;
{
- register struct tmscp_softc *sc = &tmscp_softc[TMSCPCTLR(dev)];
register struct tms_info *tms;
register struct uba_device *ui;
register struct tms_info *tms;
register struct uba_device *ui;
register int s;
int unit = TMSUNIT(dev);
register int s;
int unit = TMSUNIT(dev);
- if (unit >= NTMS)
- return (ENXIO);
ui = tmsdinfo[unit];
bp = &ctmscpbuf[ui->ui_ctlr];
ui = tmsdinfo[unit];
bp = &ctmscpbuf[ui->ui_ctlr];
* tmkcnt are only modified here if they need to be set to
* a non-zero value.
*/
* tmkcnt are only modified here if they need to be set to
* a non-zero value.
*/
+ switch ((int)bp->b_resid) {
case TMS_WRITM:
mp->mscp_opcode = M_OP_WRITM;
case TMS_WRITM:
mp->mscp_opcode = M_OP_WRITM;
register struct mscp *mp;
register struct tms_info *tms;
struct uba_device *ui;
register struct mscp *mp;
register struct tms_info *tms;
struct uba_device *ui;
- struct buf *dp, *bp, nullbp;
int st;
mp = &tm->tmscp_rsp[i];
int st;
mp = &tm->tmscp_rsp[i];
} /* end if st == M_ST_SUCC */
else
{
} /* end if st == M_ST_SUCC */
else
{
tprintf(tms->tms_ttyp,
"tms%d: hard error bn%d: OFFLINE\n",
minor(bp->b_dev)&03, bp->b_blkno);
else
tprintf(tms->tms_ttyp,
"tms%d: hard error: OFFLINE\n",
tprintf(tms->tms_ttyp,
"tms%d: hard error bn%d: OFFLINE\n",
minor(bp->b_dev)&03, bp->b_blkno);
else
tprintf(tms->tms_ttyp,
"tms%d: hard error: OFFLINE\n",
while (bp = dp->b_actf)
{
dp->b_actf = bp->av_forw;
while (bp = dp->b_actf)
{
dp->b_actf = bp->av_forw;
-# ifdef lint
- i = i;
-# endif
tmscpp->tmscp_Cmd.mscp_opcode = op;
tmscpp->tmscp_Rsp.mscp_header.tmscp_msglen = mscp_msglen;
tmscpp->tmscp_Cmd.mscp_opcode = op;
tmscpp->tmscp_Rsp.mscp_header.tmscp_msglen = mscp_msglen;
if (tmscpaddr->tmscpsa&TMSCP_ERR)
printf("tmscp fatal error (0%o)\n", tmscpaddr->tmscpsa&0xffff);
i = tmscpaddr->tmscpip;
if (tmscpaddr->tmscpsa&TMSCP_ERR)
printf("tmscp fatal error (0%o)\n", tmscpaddr->tmscpsa&0xffff);
i = tmscpaddr->tmscpip;
+#ifdef lint
+ i = i;
+#endif
for (;;)
{
if (tmscpp->tmscp_ca.ca_cmdint)
for (;;)
{
if (tmscpp->tmscp_ca.ca_cmdint)
* Catch ioctl commands, and call the "command" routine to do them.
*/
* Catch ioctl commands, and call the "command" routine to do them.
*/
tmscpioctl(dev, cmd, data, flag)
dev_t dev;
int cmd;
caddr_t data;
int flag;
{
tmscpioctl(dev, cmd, data, flag)
dev_t dev;
int cmd;
caddr_t data;
int flag;
{
- register struct tmscp_softc *sc = &tmscp_softc[TMSCPCTLR(dev)];
register struct buf *bp = &ctmscpbuf[TMSCPCTLR(dev)];
register callcount; /* number of times to call cmd routine */
register struct uba_device *ui;
register struct tms_info *tms;
int fcount; /* number of files (or records) to space */
register struct buf *bp = &ctmscpbuf[TMSCPCTLR(dev)];
register callcount; /* number of times to call cmd routine */
register struct uba_device *ui;
register struct tms_info *tms;
int fcount; /* number of files (or records) to space */
- struct mtop *mtop; /* mag tape cmd op to perform */
- struct mtget *mtget; /* mag tape struct to get info in */
+ register struct mtop *mtop; /* mag tape cmd op to perform */
+ register struct mtget *mtget; /* mag tape struct to get info in */
/* we depend of the values and order of the TMS ioctl codes here */
static tmsops[] =
/* we depend of the values and order of the TMS ioctl codes here */
static tmsops[] =
* 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 6.8 (Berkeley) %G%
+ * @(#)ts.c 6.9 (Berkeley) %G%
* For forward/backward space record update current position.
*/
if (bp == &ctsbuf[TSUNIT(bp->b_dev)])
* For forward/backward space record update current position.
*/
if (bp == &ctsbuf[TSUNIT(bp->b_dev)])
- switch (bp->b_command) {
+ switch ((int)bp->b_command) {
case TS_SFORW:
sc->sc_blkno += bp->b_repcnt;
case TS_SFORW:
sc->sc_blkno += bp->b_repcnt;
- * @(#)uda.c 6.17 (Berkeley) %G%
+ * @(#)uda.c 6.18 (Berkeley) %G%
*/
/************************************************************************
*/
/************************************************************************
return(sizeof (struct udadevice));
}
return(sizeof (struct udadevice));
}
udslave(ui, reg)
struct uba_device *ui;
caddr_t reg;
udslave(ui, reg)
struct uba_device *ui;
caddr_t reg;
-#ifdef lint
- ui = ui; reg = reg; i = i;
-#endif
udaddr = (struct udadevice *)um->um_addr;
if(sc->sc_state != S_RUN){
if(!udinit(ui->ui_ctlr))
udaddr = (struct udadevice *)um->um_addr;
if(sc->sc_state != S_RUN){
if(!udinit(ui->ui_ctlr))
udip[ui->ui_ctlr][ui->ui_slave] = ui;
*((long *) mp->mscp_dscptr ) |= UDA_OWN | UDA_INT;/* maybe we should poll*/
i = udaddr->udaip;
udip[ui->ui_ctlr][ui->ui_slave] = ui;
*((long *) mp->mscp_dscptr ) |= UDA_OWN | UDA_INT;/* maybe we should poll*/
i = udaddr->udaip;
+#ifdef lint
+ i = i;
+#endif
while(!ra_info[ui->ui_unit].rastatus); /* Wait for some status */
udip[ui->ui_ctlr][ui->ui_slave] = 0;
if(!ra_info[ui->ui_unit].ratype) /* packet from a GTUNT */
while(!ra_info[ui->ui_unit].rastatus); /* Wait for some status */
udip[ui->ui_ctlr][ui->ui_slave] = 0;
if(!ra_info[ui->ui_unit].ratype) /* packet from a GTUNT */
struct mscp *mp;
int i; /* Something to write into to start */
/* the uda polling */
struct mscp *mp;
int i; /* Something to write into to start */
/* the uda polling */
-#ifdef lint
- i = i;
-#endif
if (ui->ui_dk >= 0)
dk_mspw[ui->ui_dk] = 1.0 / (60 * 31 * 256); /* approx */
ui->ui_flags = 0;
if (ui->ui_dk >= 0)
dk_mspw[ui->ui_dk] = 1.0 / (60 * 31 * 256); /* approx */
ui->ui_flags = 0;
#endif
*((long *) mp->mscp_dscptr ) |= UDA_OWN | UDA_INT;
i = udaddr->udaip;
#endif
*((long *) mp->mscp_dscptr ) |= UDA_OWN | UDA_INT;
i = udaddr->udaip;
+#ifdef lint
+ i = i;
+#endif
while(ui->ui_flags == 0 && ra_info[ui->ui_unit].ratype != 0);
}
while(ui->ui_flags == 0 && ra_info[ui->ui_unit].ratype != 0);
}
* Open a UDA. Initialize the device and
* set the unit online.
*/
* Open a UDA. Initialize the device and
* set the unit online.
*/
udopen(dev, flag)
dev_t dev;
int flag;
udopen(dev, flag)
dev_t dev;
int flag;
-#ifdef lint
- flag = flag; i = i;
-#endif
unit = udunit(dev);
if (unit >= nNRA || (ui = uddinfo[unit]) == 0 || ui->ui_alive == 0)
return (ENXIO);
unit = udunit(dev);
if (unit >= nNRA || (ui = uddinfo[unit]) == 0 || ui->ui_alive == 0)
return (ENXIO);
#endif
*((long *) mp->mscp_dscptr ) |= UDA_OWN | UDA_INT ;
i = udaddr->udaip;
#endif
*((long *) mp->mscp_dscptr ) |= UDA_OWN | UDA_INT ;
i = udaddr->udaip;
+#ifdef lint
+ i = i;
+#endif
timeout(wakeup,(caddr_t) mp->mscp_cmdref,10 * hz);
/* make sure we wake up */
sleep((caddr_t) mp->mscp_cmdref,PSWP+1); /*wakeup in udrsp() */
timeout(wakeup,(caddr_t) mp->mscp_cmdref,10 * hz);
/* make sure we wake up */
sleep((caddr_t) mp->mscp_cmdref,PSWP+1); /*wakeup in udrsp() */
,F_to_C(mp,1),F_to_C(mp,0)
,mp->mscp_mediaid & 0x7f);
#endif
,F_to_C(mp,1),F_to_C(mp,0)
,mp->mscp_mediaid & 0x7f);
#endif
- switch(mp->mscp_mediaid & 0x7f){
+ switch((int)(mp->mscp_mediaid & 0x7f)){
case 25:
ra_info[ui->ui_unit].ra_sizes = ra25_sizes;
break;
case 25:
ra_info[ui->ui_unit].ra_sizes = ra25_sizes;
break;
-#ifdef lint
- i = i;
-#endif
-
udp->uda_Cmd.mscp_opcode = op;
udp->uda_Rsp.mscp_header.uda_msglen = mscp_msglen;
udp->uda_Cmd.mscp_header.uda_msglen = mscp_msglen;
udp->uda_Cmd.mscp_opcode = op;
udp->uda_Rsp.mscp_header.uda_msglen = mscp_msglen;
udp->uda_Cmd.mscp_header.uda_msglen = mscp_msglen;
if (udaddr->udasa&UDA_ERR)
printf("Udaerror udasa (%x)\n", udaddr->udasa&0xffff);
i = udaddr->udaip;
if (udaddr->udasa&UDA_ERR)
printf("Udaerror udasa (%x)\n", udaddr->udasa&0xffff);
i = udaddr->udaip;
+#ifdef lint
+ i = i;
+#endif
for (;;) {
if (udp->uda_ca.ca_cmdint)
udp->uda_ca.ca_cmdint = 0;
for (;;) {
if (udp->uda_ca.ca_cmdint)
udp->uda_ca.ca_cmdint = 0;
* 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 6.6 (Berkeley) %G%
+ * @(#)ut.c 6.7 (Berkeley) %G%
case SCOM: /* motion commands update current position */
if (bp == &cutbuf[UTUNIT(bp->b_dev)])
case SCOM: /* motion commands update current position */
if (bp == &cutbuf[UTUNIT(bp->b_dev)])
- switch (bp->b_command) {
+ switch ((int)bp->b_command) {
case UT_SFORW:
sc->sc_blkno -= bp->b_repcnt;
case UT_SFORW:
sc->sc_blkno -= bp->b_repcnt;
* 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.
*
- * @(#)vp.c 6.6 (Berkeley) %G%
+ * @(#)vp.c 6.7 (Berkeley) %G%
register caddr_t data;
int flag;
{
register caddr_t data;
int flag;
{
register struct vp_softc *sc = &vp_softc[VPUNIT(dev)];
register struct vpdevice *vpaddr =
(struct vpdevice *)vpdinfo[VPUNIT(dev)]->ui_addr;
register struct vp_softc *sc = &vp_softc[VPUNIT(dev)];
register struct vpdevice *vpaddr =
(struct vpdevice *)vpdinfo[VPUNIT(dev)]->ui_addr;