+#define MBAEBITS (~(MBS_DTBUSY|MBS_CRD|MBS_ATTN|MBS_DTCMP))
+
+extern char mbasr_bits[];
+
+/*
+ * Commands for mbd_cs1
+ */
+#define MBD_WCOM 0x30
+#define MBD_RCOM 0x38
+#define MBD_GO 0x1
+
+/*
+ * Bits in mbd_ds.
+ */
+#define MBD_DRY 0x80 /* drive ready */
+#define MBD_MOL 0x1000 /* medium on line */
+#define MBD_DPR 0x100 /* drive present */
+#define MBD_ERR 0x4000 /* error in drive */
+
+/*
+ * Bits in mbd_dt
+ */
+#define MBDT_NSA 0x8000 /* not sector addressible */
+#define MBDT_TAP 0x4000 /* is a tape */
+#define MBDT_MOH 0x2000 /* moving head */
+#define MBDT_7CH 0x1000 /* 7 channel */
+#define MBDT_DRQ 0x800 /* drive request required */
+#define MBDT_SPR 0x400 /* slave present */
+
+#define MBDT_TYPE 0x1ff
+#define MBDT_MASK (MBDT_NSA|MBDT_TAP|MBDT_TYPE)
+
+/* type codes for disk drives */
+#define MBDT_RP04 020
+#define MBDT_RP05 021
+#define MBDT_RP06 022
+#define MBDT_RP07 042
+#define MBDT_RM03 024
+#define MBDT_RM05 027
+#define MBDT_RM80 026
+
+/* type codes for tape drives */
+#define MBDT_TM03 050
+#define MBDT_TE16 051
+#define MBDT_TU45 052
+#define MBDT_TU77 054
+#define MBDT_TU78 0140 /* can't handle these (yet) */
+
+/*
+ * Each driver has an array of pointers to these structures, one for
+ * each device it is willing to handle. At bootstrap time, the
+ * driver tables are filled in;
+ */
+struct mba_info {
+ struct mba_driver *mi_driver;
+ short mi_name; /* two character generic name */
+ short mi_unit; /* unit number to the system */
+ short mi_mbanum; /* the mba it is on */
+ short mi_drive; /* controller on mba */
+ short mi_slave; /* slave to controller (TM03/TU16) */
+ short mi_dk; /* driver number for iostat */
+ short mi_alive; /* device exists */
+ short mi_type; /* driver specific unit type */
+ struct buf mi_tab; /* head of queue for this device */
+ struct mba_info *mi_forw;
+/* we could compute these every time, but hereby save time */
+ struct mba_regs *mi_mba;
+ struct mba_drv *mi_drv;
+ struct mba_hd *mi_hd;