summaryrefslogtreecommitdiff
path: root/sys/dev/mca
diff options
context:
space:
mode:
authorjdolecek <jdolecek@NetBSD.org>2001-03-17 16:59:29 +0000
committerjdolecek <jdolecek@NetBSD.org>2001-03-17 16:59:29 +0000
commitbc5acf5f90c1de7abbe45f3e489d86c488116bc8 (patch)
tree678bd0a714076d36ad2c9472c64d624c1046fba1 /sys/dev/mca
parente241005cd95f54cc85de3f0ee8c36b41942bb01c (diff)
Move the code to write the interrupt number info back before the first card
reset (same place as in the Linux driver). Hopefully this would fix the initialization problem I've seen previously (cannot repeat it even without this change no matter how I play with the card). Remove the comment about the initialization problem now.
Diffstat (limited to 'sys/dev/mca')
-rw-r--r--sys/dev/mca/if_elmc_mca.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/sys/dev/mca/if_elmc_mca.c b/sys/dev/mca/if_elmc_mca.c
index 3e01ecfe621..daf4acf8e8a 100644
--- a/sys/dev/mca/if_elmc_mca.c
+++ b/sys/dev/mca/if_elmc_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_elmc_mca.c,v 1.1 2001/03/16 23:03:15 jdolecek Exp $ */
+/* $NetBSD: if_elmc_mca.c,v 1.2 2001/03/17 16:59:29 jdolecek Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -43,11 +43,6 @@
* drivers/net/3c523.[ch]).
*
* This driver uses generic i82586 stuff. See also ai(4), ef(4), ix(4).
- *
- * Known issues:
- * o seems like the initialization is not bullet proof; initially, the
- * card I had responded with "incorrect termination" warning and started
- * to work correctly after I booted the PS/2 with Slackware 3.3 bootdisk
*/
#include <sys/param.h>
@@ -225,6 +220,13 @@ elmc_mca_attach(struct device *parent, struct device *self, void *aux)
sc->buf_area = sc->scb + IE_SCB_SZ;
sc->buf_area_sz = sc->sc_msize - IE_ISCP_SZ - IE_SCB_SZ - IE_SCP_SZ;
+ /*
+ * According to docs, we might need to read the interrupt number and
+ * write it back to the IRQ select register, since the POST might not
+ * configure the IRQ properly.
+ */
+ (void) mca_conf_write(ma->ma_mc, ma->ma_slot, 3, pos3 & 0x1f);
+
/* reset the card first */
elmc_mca_hwreset(sc, CARD_RESET);
delay(1000000 / ( 1<< 5));
@@ -279,14 +281,7 @@ elmc_mca_attach(struct device *parent, struct device *self, void *aux)
printf("%s: couldn't establish interrupt handler\n",
sc->sc_dev.dv_xname);
else
- printf("%s: interrupting at irq %d\n", sc->sc_dev.dv_xname, irq);
-
- /*
- * According to docs, we might need to read the interrupt number and
- * write it back to the IRQ select register, since the POST might not
- * configure the IRQ properly.
- */
- (void) mca_conf_write(ma->ma_mc, ma->ma_slot, 3, pos3 & 0x1f);
+ printf("%s: interrupting at irq %d\n", sc->sc_dev.dv_xname,irq);
return;
}