PERFORCE change 96171 for review
Marcel Moolenaar
marcel at FreeBSD.org
Thu Apr 27 00:06:44 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=96171
Change 96171 by marcel at marcel_nfs on 2006/04/27 00:05:57
Use the ILR to filter devices without pending interrupt.
Affected files ...
.. //depot/projects/uart/dev/puc/puc.c#37 edit
Differences ...
==== //depot/projects/uart/dev/puc/puc.c#37 (text+ko) ====
@@ -132,10 +132,30 @@
struct puc_softc *sc = arg;
u_long dev, devs;
int i, idx, ipend, isrc;
+ uint8_t ilr;
+
+ devs = sc->sc_serdevs;
+ if (sc->sc_ilr == PUC_ILR_DIGI) {
+ idx = 0;
+ while (devs & (0xfful << idx)) {
+ ilr = ~bus_read_1(sc->sc_port[idx].p_rres, 7);
+ devs &= ~0ul ^ ((u_long)ilr << idx);
+ idx += 8;
+ }
+ } else if (sc->sc_ilr == PUC_ILR_QUATECH) {
+ /*
+ * Don't trust the value if it's the same as the option
+ * register. It may mean that the ILR is not active and
+ * we're reading the option register instead. This may
+ * lead to false positives on 8-port boards.
+ */
+ ilr = bus_read_1(sc->sc_port[0].p_rres, 7);
+ if (ilr != (sc->sc_cfg_data & 0xff))
+ devs &= (u_long)ilr;
+ }
ipend = 0;
idx = 0, dev = 1UL;
- devs = sc->sc_serdevs;
while (devs != 0UL) {
while ((devs & dev) == 0UL)
idx++, dev <<= 1;
More information about the p4-projects
mailing list