summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKATO Takenori <kato@FreeBSD.org>1997-05-07 14:15:11 +0000
committerKATO Takenori <kato@FreeBSD.org>1997-05-07 14:15:11 +0000
commit7831f8aee1307a6ab3fd0734e17393b81e25b8a9 (patch)
tree0d3beb9852673b21eafb1ec0510bd69bd5abdbd8
parent08ed607a091f12d7cc1d700d8e169d01acc7ad43 (diff)
Notes
-rw-r--r--sys/pc98/pc98/pc98.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/sys/pc98/pc98/pc98.c b/sys/pc98/pc98/pc98.c
index 74a1194c4e3d..6ea23b073dfd 100644
--- a/sys/pc98/pc98/pc98.c
+++ b/sys/pc98/pc98/pc98.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: pc98.c,v 1.24 1997/04/27 13:41:08 kato Exp $
+ * $Id: pc98.c,v 1.25 1997/04/28 15:51:15 kato Exp $
*/
/*
@@ -485,6 +485,23 @@ config_isadev_c(isdp, mp, reconfig)
}
(*dp->attach)(isdp);
if (isdp->id_irq) {
+#if defined(APIC_IO)
+ /*
+ * Some motherboards use upper IRQs for traditional
+ * ISA INTerrupt sources. In particular we have
+ * seen the secondary IDE connected to IRQ20.
+ * This code detects and fixes this situation.
+ */
+ u_int apic_mask;
+ int rirq;
+
+ apic_mask = get_isa_apic_mask( isdp->id_irq );
+ if ( apic_mask != isdp->id_irq ) {
+ rirq = ffs( isdp->id_irq ) - 1;
+ isdp->id_irq = apic_mask;
+ undirect_isa_irq( rirq ); /* free for ISA */
+ }
+#endif /* APIC_IO */
if (mp)
INTRMASK(*mp, isdp->id_irq);
register_intr(ffs(isdp->id_irq) - 1, isdp->id_id,
@@ -734,8 +751,15 @@ void isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan)
printf("isa_dmastart: channel %d not acquired\n", chan);
#endif
+#if 0
+ /*
+ * XXX This should be checked, but drivers like ad1848 only call
+ * isa_dmastart() once because they use Auto DMA mode. If we
+ * leave this in, drivers that do this will print this continuously.
+ */
if (dma_busy & (1 << chan))
printf("isa_dmastart: channel %d busy\n", chan);
+#endif
dma_busy |= (1 << chan);