summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1998-09-24 17:14:23 +0000
committerwpaul <wpaul@FreeBSD.org>1998-09-24 17:14:23 +0000
commite7f748a814746f2fe276557bc8549cd106c0016a (patch)
tree65ebc1fdc30af68c2ca01a0e27a59113634d7b0b /sys/pci
parenta4a8884afb9c3ab04f91cfecf93557ab5332e676 (diff)
downloadFreeBSD-src-e7f748a814746f2fe276557bc8549cd106c0016a.zip
FreeBSD-src-e7f748a814746f2fe276557bc8549cd106c0016a.tar.gz
Small tweak: force another reset of the adapter after probing for all the
PHYs in tl_attach(). This is mainly to suck away any possible stray interrupts. This prevents an intermittent problem on some systems where the adapter probes correctly but yields a device timeout (and possible subsequent adapter check) when configured. When I originally tested the driver, I ifconfig'ed the interface after the system had already been booted and didn't notice any problems, but when configuring the interface immediately at startup, it would occasionally timeout and hang, until an adapter check interrupt came along and reset things again. I'm not exactly sure if this is a general problem of just something peculiar to this hardware (there are three devices, including the tlan, all on IRQ 11) but the extra reset shouldn't hurt anything. (It works fine with my 100Mbps Olicom adapter too.) Thanks to Mark Taylor from Cybernet (mtaylor@cybernet.com) for allowing me remote access to a Compaq system for debugging purposes.
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_tl.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c
index 00e1e0a..c6d2369 100644
--- a/sys/pci/if_tl.c
+++ b/sys/pci/if_tl.c
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_tl.c,v 1.28 1998/09/18 05:22:57 wpaul Exp $
+ * $Id: if_tl.c,v 1.30 1998/09/24 16:26:02 wpaul Exp $
*/
/*
@@ -211,7 +211,7 @@
#ifndef lint
static char rcsid[] =
- "$Id: if_tl.c,v 1.28 1998/09/18 05:22:57 wpaul Exp $";
+ "$Id: if_tl.c,v 1.30 1998/09/24 16:26:02 wpaul Exp $";
#endif
#ifdef TL_DEBUG
@@ -1750,6 +1750,15 @@ tl_attach(config_id, unit)
goto fail;
}
+ tl_intvec_adchk((void *)sc, 0);
+ tl_stop(sc);
+
+ /*
+ * Attempt to clear any stray interrupts
+ * that may be lurking.
+ */
+ tl_intr((void *)sc);
+
/*
* Call MI attach routines.
*/
@@ -2111,7 +2120,8 @@ static int tl_intvec_adchk(xsc, type)
sc = xsc;
- printf("tl%d: adapter check: %x\n", sc->tl_unit,
+ if (type)
+ printf("tl%d: adapter check: %x\n", sc->tl_unit,
CSR_READ_4(sc, TL_CH_PARM));
#ifdef TL_DEBUG
evshow(sc);
OpenPOWER on IntegriCloud