Set the interrupt retry timer to 0xff.

This commit is contained in:
eeh 2002-01-14 16:30:31 +00:00
parent 2bce33ba09
commit 79cc3b0d73
1 changed files with 24 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */
/* $NetBSD: psycho.c,v 1.40 2002/01/14 16:30:31 eeh Exp $ */
/*
* Copyright (c) 1999, 2000 Matthew R. Green
@ -416,6 +416,7 @@ found:
* arrive here, start up the IOMMU and get a config space tag.
*/
if (osc == NULL) {
uint64_t timeo;
/*
* Establish handlers for interesting interrupts....
@ -445,6 +446,28 @@ found:
&sc->sc_regs->pwrmgt_int_map,
&sc->sc_regs->pwrmgt_clr_int);
/*
* Apparently a number of machines with psycho and psycho+
* controllers have interrupt latency issues. We'll try
* setting the interrupt retry timeout to 0xff which gives us
* a retry of 3-6 usec (which is what sysio is set to) for the
* moment, which seems to help alleviate this problem.
*/
timeo = bus_space_read_8(sc->sc_bustag,
(bus_space_handle_t)
(u_long)&sc->sc_regs->intr_retry_timer, 0);
if (timeo > 0xfff) {
#ifdef DEBUG
printf("decreasing interrupt retry timeout "
"from %lx to 0xff\n", (long)timeo);
#endif
bus_space_write_8(sc->sc_bustag,
(bus_space_handle_t)
(u_long)&sc->sc_regs->intr_retry_timer, 0,
0xff);
}
/*
* Setup IOMMU and PCI configuration if we're the first
* of a pair of psycho's to arrive here.