Add Theo's fix for "must be one" bits in tdr2.

This commit is contained in:
gwr 1994-07-11 03:31:17 +00:00
parent 00dc18214f
commit 7b4643faf3
2 changed files with 8 additions and 6 deletions

View File

@ -32,7 +32,7 @@
*
* from: Header: if_le.c,v 1.25 93/10/31 04:47:50 leres Locked
* from: @(#)if_le.c 8.2 (Berkeley) 10/30/93
* $Id: if_le.c,v 1.10 1994/05/28 15:45:51 gwr Exp $
* $Id: if_le.c,v 1.11 1994/07/11 03:31:17 gwr Exp $
*/
#include "bpfilter.h"
@ -321,7 +321,7 @@ lereset(dev)
ler2->ler2_rmd[i].rmd0 = a;
ler2->ler2_rmd[i].rmd1_hadr = a >> 16;
ler2->ler2_rmd[i].rmd1_bits = LE_R1_OWN;
ler2->ler2_rmd[i].rmd2 = -LEMTU;
ler2->ler2_rmd[i].rmd2 = -LEMTU | LE_XMD2_ONES;
ler2->ler2_rmd[i].rmd3 = 0;
}
for (i = 0; i < LETBUF; i++) {
@ -329,7 +329,7 @@ lereset(dev)
ler2->ler2_tmd[i].tmd0 = a;
ler2->ler2_tmd[i].tmd1_hadr = a >> 16;
ler2->ler2_tmd[i].tmd1_bits = 0;
ler2->ler2_tmd[i].tmd2 = 0;
ler2->ler2_tmd[i].tmd2 = LE_XMD2_ONES;
ler2->ler2_tmd[i].tmd3 = 0;
}
@ -477,7 +477,7 @@ lestart(ifp)
#endif
tmd = sc->sc_r2->ler2_tmd;
tmd->tmd3 = 0;
tmd->tmd2 = -len;
tmd->tmd2 = -len | LE_XMD2_ONES;
tmd->tmd1_bits = LE_T1_OWN | LE_T1_STP | LE_T1_ENP;
sc->sc_if.if_flags |= IFF_OACTIVE;
@ -989,7 +989,7 @@ lexerror(sc)
tmd = sc->sc_r2->ler2_tmd;
tmd3 = tmd->tmd3;
tdr = tmd3 & LE_T3_TDR_MASK;
len = -tmd->tmd2;
len = -(tmd->tmd2 & ~LE_XMD2_ONES);
log(LOG_WARNING,
"%s: oerror: to %s: buf=%d, len=%d, tmd1=%b, tmd3=%b, tdr=%d (%d nsecs)\n",
sc->sc_dev.dv_xname, len > 5 ?

View File

@ -32,7 +32,7 @@
*
* from: Header: if_lereg.h,v 1.7 93/10/31 04:41:00 leres Locked
* from: @(#)if_lereg.h 8.2 (Berkeley) 10/30/93
* $Id: if_lereg.h,v 1.4 1994/05/28 15:45:55 gwr Exp $
* $Id: if_lereg.h,v 1.5 1994/07/11 03:31:20 gwr Exp $
*/
#define LEMTU 1518
@ -161,5 +161,7 @@ struct lereg2 {
#define LE_T3_RTRY 0x0400 /* retry error */
#define LE_T3_TDR_MASK 0x03ff /* time domain reflectometry counter */
#define LE_XMD2_ONES 0xf000
#define LE_T3_BITS \
"\20\20BUFF\17UFLO\16RES\15LCOL\14LCAR\13RTRY"