From owner-p4-projects@FreeBSD.ORG Thu Apr 27 00:06:44 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E472A16A41B; Thu, 27 Apr 2006 00:06:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5FC316A419 for ; Thu, 27 Apr 2006 00:06:43 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CD8143D46 for ; Thu, 27 Apr 2006 00:06:42 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3R06gWi043381 for ; Thu, 27 Apr 2006 00:06:42 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3R06fQ5043378 for perforce@freebsd.org; Thu, 27 Apr 2006 00:06:41 GMT (envelope-from marcel@freebsd.org) Date: Thu, 27 Apr 2006 00:06:41 GMT Message-Id: <200604270006.k3R06fQ5043378@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 96171 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2006 00:06:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=96171 Change 96171 by marcel@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;