* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
* @(#)tm.c 7.5 (Berkeley) %G%
#include "../vaxuba/ubareg.h"
#include "../vaxuba/tmreg.h"
#define MAXCTLR 1 /* all addresses must be specified */
u_short tmstd
[MAXCTLR
] = { 0172520 };
if ((u_int
)io
->i_adapt
>= nuba
)
if ((u_int
)io
->i_ctlr
>= MAXCTLR
)
if (badaddr((char *)ubamem(io
->i_adapt
, tmstd
[io
->i_ctlr
]), sizeof(short)))
for (skip
= io
->i_part
; skip
--;) {
tmstrategy(io
, TM_SFORW
);
register int com
, errcnt
;
register struct tmdevice
*tmaddr
;
tmaddr
= (struct tmdevice
*)ubamem(io
->i_adapt
, tmstd
[io
->i_ctlr
]);
tmaddr
->tmbc
= -io
->i_cc
;
com
= (io
->i_unit
<<8) | TM_GO
;
tmaddr
->tmcs
= com
| TM_RCOM
;
tmaddr
->tmcs
= com
| TM_WCOM
;
else if (func
== TM_SREV
) {
tmaddr
->tmcs
= com
| TM_SREV
;
tmaddr
->tmcs
= com
| func
;
printf("tm tape error: er=%b\n", word
, TMER_BITS
);
printf("tm: unrecovered error\n");
printf("tm: recovered by retry\n");
return (io
->i_cc
+ tmaddr
->tmbc
);
register struct tmdevice
*tmaddr
;
if ((word
&TMER_TUR
) && (word
&TMER_SDWN
)==0)