add MBASR_HARD
[unix-history] / usr / src / sys / vax / mba / mbareg.h
index 187783b..0fa86ac 100644 (file)
@@ -1,4 +1,4 @@
-/*     mbareg.h        4.4     %G%     */
+/*     mbareg.h        4.12    81/03/03        */
 
 /*
  * VAX Massbus adapter registers
 
 /*
  * VAX Massbus adapter registers
@@ -66,8 +66,17 @@ struct mba_regs
 #define        MBS_ISTIMO      0x00000002      /* interface sequence timeout */
 #define        MBS_RDTIMO      0x00000001      /* read data timeout */
 
 #define        MBS_ISTIMO      0x00000002      /* interface sequence timeout */
 #define        MBS_RDTIMO      0x00000001      /* read data timeout */
 
+#define MBASR_BITS \
+"\20\40DTBUSY\37NRCONF\36CRD\30CBHUNG\24PGE\23NED\22MCPE\21ATTN\
+\17SPE\16DTCMP\15DTABT\14DLT\13WCKUP\12WCKLWR\11MXF\10MBEXC\7MDPE\
+\6MAPPE\5INVMAP\4ERRCONF\3RDS\2ISTIMO\1RDTIMO"
+
+#define        MBASR_HARD      (MBS_PGE|MBS_ERRCONF|MBS_ISTIMO|MBS_RDTIMO)
+
 #define MBAEBITS       (~(MBS_DTBUSY|MBS_CRD|MBS_ATTN|MBS_DTCMP))
 
 #define MBAEBITS       (~(MBS_DTBUSY|MBS_CRD|MBS_ATTN|MBS_DTCMP))
 
+extern char    mbasr_bits[];
+
 /*
  * Commands for mbd_cs1
  */
 /*
  * Commands for mbd_cs1
  */
@@ -124,9 +133,9 @@ struct      mba_info {
        short   mi_mbanum;      /* the mba it is on */
        short   mi_drive;       /* controller on mba */
        short   mi_slave;       /* slave to controller (TM03/TU16) */
        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 */
        short   mi_alive;       /* device exists */
        short   mi_type;        /* driver specific unit type */
-       short   mi_dk;          /* driver number for iostat */
        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  buf mi_tab;     /* head of queue for this device */
        struct  mba_info *mi_forw;
 /* we could compute these every time, but hereby save time */
@@ -142,16 +151,13 @@ struct    mba_info {
  */
 struct mba_hd {
        short   mh_active;
  */
 struct mba_hd {
        short   mh_active;
-       short   mh_flags;
+       short   mh_ndrive;
        struct  mba_regs *mh_mba;       /* virt addr of mba */
        struct  mba_regs *mh_physmba;   /* phys addr of mba */
        struct  mba_info *mh_mbip[8];   /* what is attached */
        struct  mba_info *mh_actf;      /* head of queue to transfer */
        struct  mba_info *mh_actl;      /* tail of queue to transfer */
        struct  mba_regs *mh_mba;       /* virt addr of mba */
        struct  mba_regs *mh_physmba;   /* phys addr of mba */
        struct  mba_info *mh_mbip[8];   /* what is attached */
        struct  mba_info *mh_actf;      /* head of queue to transfer */
        struct  mba_info *mh_actl;      /* tail of queue to transfer */
-} mba_hd[4];
-#ifdef KERNEL
-extern struct  mba_info mbinit[];      /* blanks for filling mba_info */
-#endif
+};
 /*
  * Values for flags; normally MH_NOSEEK will be set when there is
  * only a single drive on an massbus.
 /*
  * Values for flags; normally MH_NOSEEK will be set when there is
  * only a single drive on an massbus.
@@ -198,3 +204,15 @@ struct mba_driver {
  * Clear attention status for specified drive.
  */
 #define        mbclrattn(mi)   ((mi)->mi_mba->mba_drv[0].mbd_as = 1 << (mi)->mi_drive)
  * Clear attention status for specified drive.
  */
 #define        mbclrattn(mi)   ((mi)->mi_mba->mba_drv[0].mbd_as = 1 << (mi)->mi_drive)
+
+/*
+ * Kernel definitions related to mba.
+ */
+#ifdef KERNEL
+#if NMBA > 0
+struct mba_hd mba_hd[NMBA];
+extern Xmba0int(), Xmba1int(), Xmba2int(), Xmba3int();
+extern struct  mba_info mbinit[];      /* blanks for filling mba_info */
+int    nummba;
+#endif
+#endif