+#define SREW 4 /* sending a drive rewind */
+
+#if NTS > 0
+/*
+ * Kludge to get around fact that we don't really
+ * check if a ts is there... if there are both tm's and ts's
+ * declared in the system, then this driver sets havetm to 1
+ * if it finds a tm, and ts just pretends there isn't a ts.
+ */
+int havetm = 0;
+#endif
+/*
+ * Determine if there is a controller for
+ * a tm at address reg. Our goal is to make the
+ * device interrupt.
+ */
+tmprobe(reg)
+ caddr_t reg;
+{
+ register int br, cvec; /* must be r11,r10; value-result */
+
+#ifdef lint
+ br = 0; cvec = br; br = cvec;
+ tmintr(0);
+#endif
+ ((struct device *)reg)->tmcs = TM_IE;
+ /*
+ * If this is a tm11, it ought to have interrupted
+ * by now, if it isn't (ie: it is a ts04) then we just
+ * hope that it didn't interrupt, so autoconf will ignore it.
+ * Just in case, we will reference one
+ * of the more distant registers, and hope for a machine
+ * check, or similar disaster if this is a ts.
+ *
+ * Note: on an 11/780, badaddr will just generate
+ * a uba error for a ts; but our caller will notice that
+ * so we won't check for it.
+ */
+ if (badaddr((caddr_t)&((struct device *)reg)->tmrd, 2))
+ return (0);
+ return (1);
+}
+
+/*
+ * Due to a design flaw, we cannot ascertain if the tape
+ * exists or not unless it is on line - ie: unless a tape is
+ * mounted. This is too servere a restriction to bear,
+ * so all units are assumed to exist.
+ */
+/*ARGSUSED*/
+tmslave(ui, reg)
+ struct uba_device *ui;
+ caddr_t reg;
+{
+
+ return (1);
+}
+
+/*
+ * Record attachment of the unit to the controller.
+ */
+/*ARGSUSED*/
+tmattach(ui)
+ struct uba_device *ui;
+{