Subject: fix to dh
From: [email-masked] (Keith Bostic)
To: [email-masked]
Date: Wed, 17 Aug 88 12:45:18 PDT

Not sure if we should put this in -- maybe as part of the man page
for the dh?  Or a README?  Your choice...

--keith

> From [email-masked] Wed Aug 17 11:02:26 1988
> Date: Wed, 17 Aug 88 18:21:39 BST
> From: Alan Judge <[email-masked]>
> Subject: New Release of 2.10 and Ethernetting
> To: [email-masked]
> X-Fortune: Mix a little foolishness with your serious plans; it's lovely to be
>  silly at the right moment. -- Horace

Also when we installed 2.10 we had a problem with port-boards because of a
slight difference between Emulex CS-02 boards in DH-11/DM-11 emulation and
the real thing. The rules for 22-bit QBUS operation are different. Anyway at
the time we fixed the problem locally and since we were not on the net
reliably I don't think we told anybody. In case the problem still remains
unfixed I include patches for 2.10 for the problem. You can then post a fix
to news if necessary.
--
Alan Judge, System Administrator
School of Mathematics, Trinity College, Dublin.
[email-masked]

RCS file: RCS/dh.c,v
retrieving revision 1.1
diff -c -r1.1 dh.c
*** /tmp/,RCSt1011296   Wed Aug 17 18:14:33 1988
--- dh.c        Sun Nov  8 19:37:11 1987
***************
*** 405,413 ****
--- 405,419 ----
  #else
                                {
                                ubadr_t car;
+ #if   defined(CS02)
+                               struct dmdevice *dmaddr = (struct dmdevice *)dmi
nfo[dh].ui_addr;

+                               car = (ubadr_t)addr->dhcar;
+                               car |= ((ubadr_t)(dmaddr->dmlst_h&077) << 16);
+ #else
                                car = (ubadr_t) addr->dhcar
                                    | (ubadr_t)(addr->dhsilo & 0300) << 10;
+ #endif
                                cntr = car - cpaddr(tp->t_outq.c_cf);
                                ndflush(&tp->t_outq, cntr);
                                }
***************
*** 492,500 ****
--- 498,514 ----
                addr->dhcar = (u_short)cpaddr(tp->t_outq.c_cf);
  #else
                ubadr_t uba;
+ #if   defined(CS02)
+               struct dmdevice *dmaddr = (struct dmdevice *)dminfo[dh].ui_addr;
+ #endif

                uba = cpaddr(tp->t_outq.c_cf);
+ #if   defined(CS02)
+               addr->un.dhcsrl = (unit&017) | DH_IE;
+               dmaddr->dmlst_h = hiint(uba) & 077;
+ #else
                addr->un.dhcsrl = (unit&017) | DH_IE | ((hiint(uba)<<4)&060);
+ #endif
                addr->dhcar = loint(uba);
  #endif
                { short word = 1 << unit;
===================================================================
RCS file: RCS/dmreg.h,v
retrieving revision 1.1
diff -c -r1.1 dmreg.h
*** /tmp/,RCSt1011296   Wed Aug 17 18:14:39 1988
--- dmreg.h     Sun Nov  8 19:37:43 1987
***************
*** 11,19 ****
--- 11,30 ----
   */
  struct dmdevice {
        short   dmcsr;          /* control status register */
+ #if   defined(CS02)
+       union {                 /* Need to access high byte independently */
+               short dmlst_w;
+               char dmlst_b[2];
+       } cs02un;
+ #define dmlstat cs02un.dmlst_w
+ #define dmlst_l cs02un.dmlst_b[0]     /* low byte */
+ #define dmlst_h cs02un.dmlst_b[1]     /* high byte */
+ #else
        short   dmlstat;        /* line status register */
+ #endif
        short   dmpad1[2];
  };
+

  /* bits in dm csr */
  #define       DM_RF           0100000         /* ring flag */

Date: Sat, 24 Sep 88 17:49:15 BST
From: Alan Judge <[email-masked]>
Subject: Re: Your fixes for pdpuba/dh.c
To: [email-masked]

> Alan,
>   This is my third attempt to get through to you.  Keith Bostic forwarded
> your note about the changes you had to make to dh.c to get it to work
> with the Emulex CS-02.  I'd like to know if these changes are specific to
> the Emulex, or to *any* DH on a QBUS.  In particular, I wasn't aware that
> there was any DH available for the QBUS.  Is Emulex's the only such or
> does DEC also supply one?  Please answer as soon as possible.
>
> Casey
I am just back from holidays and this message arrived today. It seems that
this message arrived was delayed in IRLEARN.BITNET (a site in another
irish university) for 3 weeks. None of your other
messages have yet arrived. Normally the through-time by this link is less
than an hour. Hopefully mail to [email-masked] should only take a matter
of hours from the states. Something must have gone  wrong while I was
away.

The manual for the CS02/H1 says that the board can emulate either one
DH11/DM11 or 2 DHV11's. This and the programming section seems to imply that
there is a DEC product. Unfortunately I don't know for sure. The Emulex board
may be emulating the DH on some other bus. However the DEC product probably
does not support 22-bit addressing as Emulex use part of the LSR (line status
register for this). The patches ARE specific to 22-bit addressing on a Q-BUS,
they may be specific to Emulex if DEC does have a 22-bit Q-BUS DH.
--
Alan