fix to reeves fix of dgo handling (reset b_active to 1)
[unix-history] / usr / src / sys / vax / uba / ubavar.h
index 3523bd5..9ec4b61 100644 (file)
@@ -1,4 +1,4 @@
-/*     ubavar.h        4.18    81/03/09        */
+/*     ubavar.h        4.25    82/04/11        */
 
 /*
  * This file contains definitions related to the kernel structures
 
 /*
  * This file contains definitions related to the kernel structures
@@ -42,6 +42,8 @@ struct        uba_hd {
        int     uh_bdpfree;             /* free bdp's */
        int     uh_hangcnt;             /* number of ticks hung */
        int     uh_zvcnt;               /* number of 0 vectors */
        int     uh_bdpfree;             /* free bdp's */
        int     uh_hangcnt;             /* number of ticks hung */
        int     uh_zvcnt;               /* number of 0 vectors */
+       int     uh_errcnt;              /* number of errors */
+       int     uh_lastiv;              /* last free interrupt vector */
        short   uh_users;               /* transient bdp use count */
        short   uh_xclu;                /* an rk07 is using this uba! */
 #define        UAMSIZ  25
        short   uh_users;               /* transient bdp use count */
        short   uh_xclu;                /* an rk07 is using this uba! */
 #define        UAMSIZ  25
@@ -99,7 +101,7 @@ struct uba_device {
        int     (**ui_intr)();  /* interrupt handler(s) */
        caddr_t ui_addr;        /* address of device in i/o space */
        short   ui_dk;          /* if init 1 set to number for iostat */
        int     (**ui_intr)();  /* interrupt handler(s) */
        caddr_t ui_addr;        /* address of device in i/o space */
        short   ui_dk;          /* if init 1 set to number for iostat */
-       short   ui_flags;       /* parameter from system specification */
+       int     ui_flags;       /* parameter from system specification */
        short   ui_alive;       /* device exists */
        short   ui_type;        /* driver specific type information */
        caddr_t ui_physaddr;    /* phys addr, for standalone (dump) code */
        short   ui_alive;       /* device exists */
        short   ui_type;        /* driver specific type information */
        caddr_t ui_physaddr;    /* phys addr, for standalone (dump) code */
@@ -135,9 +137,18 @@ struct uba_driver {
 /*
  * Flags to UBA map/bdp allocation routines
  */
 /*
  * Flags to UBA map/bdp allocation routines
  */
-#define        UBA_NEEDBDP     1               /* transfer needs a bdp */
-#define        UBA_CANTWAIT    2               /* don't block me */
-#define        UBA_NEED16      3               /* need 16 bit addresses only */
+#define        UBA_NEEDBDP     0x01            /* transfer needs a bdp */
+#define        UBA_CANTWAIT    0x02            /* don't block me */
+#define        UBA_NEED16      0x04            /* need 16 bit addresses only */
+#define        UBA_HAVEBDP     0x08            /* use bdp specified in high bits */
+
+/*
+ * Macros to bust return word from map allocation routines.
+ */
+#define        UBAI_BDP(i)     ((int)(((unsigned)(i))>>28))
+#define        UBAI_NMR(i)     ((int)((i)>>18)&0x3ff)
+#define        UBAI_MR(i)      ((int)((i)>>9)&0x1ff)
+#define        UBAI_BOFF(i)    ((int)((i)&0x1ff))
 
 #ifndef LOCORE
 #ifdef KERNEL
 
 #ifndef LOCORE
 #ifdef KERNEL
@@ -145,7 +156,7 @@ struct uba_driver {
  * UBA related kernel variables
  */
 int    numuba;                                 /* number of uba's */
  * UBA related kernel variables
  */
 int    numuba;                                 /* number of uba's */
-extern struct  uba_hd uba_hd[];
+struct uba_hd uba_hd[];
 
 /*
  * Ubminit and ubdinit initialize the mass storage controller and
 
 /*
  * Ubminit and ubdinit initialize the mass storage controller and
@@ -158,8 +169,8 @@ extern      struct  uba_device ubdinit[];
  * UNIbus device address space is mapped by UMEMmap
  * into virtual address umem[][].
  */
  * UNIbus device address space is mapped by UMEMmap
  * into virtual address umem[][].
  */
-extern struct pte UMEMmap[][16];       /* uba device addr pte's */
-extern char umem[][16*NBPG];           /* uba device addr space */
+extern struct pte UMEMmap[][512];      /* uba device addr pte's */
+extern char umem[][512*NBPG];          /* uba device addr space */
 
 /*
  * Since some VAXen vector their first (and only) unibus interrupt
 
 /*
  * Since some VAXen vector their first (and only) unibus interrupt