From 1f9aefa18c4f705b9523c6665b97611ee72d5f83 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Tue, 31 Jan 2006 16:51:14 +0000 Subject: Don't use RYEL as error indicator in T1 ESF mode. For some reason it toggles on a more or less regular basis. Looks like the example configuration from the bt8370 datasheet is not correct. Hard to debug T1 here in Europe :( --- sys/dev/pci/bt8370.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/dev/pci/bt8370.c b/sys/dev/pci/bt8370.c index bf965d742f8..b8f58acf18e 100644 --- a/sys/dev/pci/bt8370.c +++ b/sys/dev/pci/bt8370.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt8370.c,v 1.6 2006/01/25 11:57:31 claudio Exp $ */ +/* $OpenBSD: bt8370.c,v 1.7 2006/01/31 16:51:13 claudio Exp $ */ /* * Copyright (c) 2004,2005 Internet Business Solutions AG, Zurich, Switzerland @@ -793,7 +793,7 @@ bt8370_intr(struct art_softc *ac) int bt8370_link_status(struct art_softc *ac) { - u_int8_t rstat, alm1, alm2, alm3; + u_int8_t rstat, alm1, alm2, alm3, alm1mask; int status = 1; /* @@ -802,14 +802,21 @@ bt8370_link_status(struct art_softc *ac) * -1 no link detected */ + alm1mask = ALM1_RYEL | ALM1_RAIS | ALM1_RALOS | ALM1_RLOF; + /* + * XXX don't check RYEL in T1 mode it toggles more or less + * regular. + */ + if (IFM_SUBTYPE(ac->art_media) == IFM_TDM_T1) + alm1mask &= ~ALM1_RYEL; + rstat = ebus_read(&ac->art_ebus, Bt8370_RSTAT); alm1 = ebus_read(&ac->art_ebus, Bt8370_ALM1); alm2 = ebus_read(&ac->art_ebus, Bt8370_ALM2); alm3 = ebus_read(&ac->art_ebus, Bt8370_ALM3); if ((rstat & (RSTAT_EXZ | RSTAT_BPV)) || - (alm1 & (ALM1_RYEL | ALM1_RAIS | ALM1_RALOS | ALM1_RLOF)) || - (alm3 & (ALM3_SEF))) + (alm1 & alm1mask) || (alm3 & (ALM3_SEF))) status = 0; if ((alm1 & (ALM1_RLOS)) || -- cgit v1.2.3