diff options
author | nsouch <nsouch@FreeBSD.org> | 1999-02-14 12:03:35 +0000 |
---|---|---|
committer | nsouch <nsouch@FreeBSD.org> | 1999-02-14 12:03:35 +0000 |
commit | ad25a63490d03422a17b52c5f4e7bd3560da9dcc (patch) | |
tree | ac195b32652b8e2b2e7427c34ccc88449ae55f7b /sys/dev/ppc | |
parent | 13c212a1180252f7cd682509310a8699cf77b583 (diff) | |
download | FreeBSD-src-ad25a63490d03422a17b52c5f4e7bd3560da9dcc.zip FreeBSD-src-ad25a63490d03422a17b52c5f4e7bd3560da9dcc.tar.gz |
Fix interrupt handling with DMA. Bit nFault was tested in the control reg.
instead of the status reg. and check ECP mode before considering nFault.
Diffstat (limited to 'sys/dev/ppc')
-rw-r--r-- | sys/dev/ppc/ppc.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c index 7301f97..59f55ca 100644 --- a/sys/dev/ppc/ppc.c +++ b/sys/dev/ppc/ppc.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ppc.c,v 1.16 1999/01/30 15:35:38 nsouch Exp $ + * $Id: ppc.c,v 1.17 1999/01/31 11:52:04 nsouch Exp $ * */ #include "ppc.h" @@ -1328,13 +1328,14 @@ static void ppcintr(int unit) { struct ppc_data *ppc = ppcdata[unit]; - char ctr, ecr; + u_char ctr, ecr, str; + str = r_str(ppc); ctr = r_ctr(ppc); ecr = r_ecr(ppc); -#ifdef PPC_DEBUG - printf("!"); +#if PPC_DEBUG > 1 + printf("![%x/%x/%x]", ctr, ecr, str); #endif /* don't use ecp mode with IRQENABLE set */ @@ -1344,7 +1345,11 @@ ppcintr(int unit) return; } - if (ctr & nFAULT) { + /* interrupts are generated by nFault signal + * only in ECP mode */ + if ((str & nFAULT) && (ppc->ppc_mode & PPB_ECP)) { + /* check if ppc driver has programmed the + * nFault interrupt */ if (ppc->ppc_irqstat & PPC_IRQ_nFAULT) { w_ecr(ppc, ecr | PPC_nFAULT_INTR); |