Subject: Ethernet on SE30 patch
To: Allen Briggs <briggs@puma.bevd.blacksburg.va.us>
From: John D. Smerdon <jds@smerdon.plymouth.mi.us>
List: macbsd-general
Date: 04/03/1995 11:59:18
I finally got the Ethernet working again on the SE/30.

The problem was corrected when the video slot/nubus $E interrupt was
disabled.

I restored the via2_nubus_intr() code to an earlier version.  The earlier
version looped waiting for the (VIA2, vBufA) to be 0x3f, or no slots
requiring attention.

I also disabled the code in ae_watchdog() in if_ae.c.

I now get consistent 2.9ms ping times between systems.

The diff to via.c is (watch out for word wrap at the end):

122a123,126
>               /* turn off SE30 video interrupt */
>                 via_reg(VIA1, vBufB) |= 0x40;
>                 via_reg(VIA1, vDirB) |= 0x40;
>
267c271
<       register int    i, mask, ints, cnt=0;
---
>         register int i, mask;
269,287c273,283
< try_again:
<       via_reg(VIA2, vIFR) = V2IF_SLOTINT;
<       if (ints = ((~via_reg(VIA2, vBufA)) & nubus_intr_mask)) {
<               cnt = 0;
<               mask = (1 << 5);
<               i = 6;
<               while (i--) {
<                       if (ints & mask) {
<                               (*slotitab[i])(slotutab[i], i+9);
<                       }
<                       mask >>= 1;
<               }
<       } else {
<               delay(20); /* Just a delay for the fun of it. */
<               if (cnt++ >= 2) {
<                       return 1;
<               }
<       }
<       goto try_again;
---
>         do {
>             mask = 1;
>             for (i = 0; i < 6; i++) {
>                 if ((via_reg(VIA2, vBufA) & mask) == 0) {
>                         (*slotitab[i])(slotutab[i], i+9);
>                 }
>                 mask <<= 1;
>             }
>         } while (((via_reg(VIA2, vBufA) | (~nubus_intr_mask)) & 0x3f) !=
>0x3f);
>
>         return 1;

--
John D. Smerdon;  Plymouth, Michigan, USA;  Contents are my opinion.
Home: jds@smerdon.plymouth.mi.us