From owner-p4-projects@FreeBSD.ORG Thu Jul 24 05:23:14 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 51CC41065672; Thu, 24 Jul 2008 05:23:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15B9D106564A; Thu, 24 Jul 2008 05:23:14 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id ACF378FC19; Thu, 24 Jul 2008 05:23:13 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m6O5LTrQ037021; Wed, 23 Jul 2008 23:21:30 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 23 Jul 2008 23:21:42 -0600 (MDT) Message-Id: <20080723.232142.72462054.imp@bsdimp.com> To: marius@alchemy.franken.de From: "M. Warner Losh" In-Reply-To: <20080713122907.GA63008@alchemy.franken.de> References: <200807071855.m67ItHQp084707@repoman.freebsd.org> <20080713122907.GA63008@alchemy.franken.de> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: marcel@freebsd.org, perforce@freebsd.org Subject: Re: PERFORCE change 144842 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, 24 Jul 2008 05:23:14 -0000 In message: <20080713122907.GA63008@alchemy.franken.de> Marius Strobl writes: : On Mon, Jul 07, 2008 at 06:55:17PM +0000, Marcel Moolenaar wrote: : > http://perforce.freebsd.org/chv.cgi?CH=144842 : > : > Change 144842 by marcel@marcel_xcllnt on 2008/07/07 18:55:11 : > : > ISA_PNP_PROBE() can also return ENOENT. : > So, assume a match when the error is 0, not != ENXIO. : > : > Affected files ... : > : > .. //depot/projects/uart/dev/uart/uart_bus_isa.c#13 edit : > : > Differences ... : > : > ==== //depot/projects/uart/dev/uart/uart_bus_isa.c#13 (text+ko) ==== : > : > @@ -170,7 +170,7 @@ : > sc = device_get_softc(dev); : > : > /* Probe PnP _and_ non-PnP ns8250 here. */ : > - if (ISA_PNP_PROBE(parent, dev, isa_ns8250_ids) != ENXIO) { : > + if (ISA_PNP_PROBE(parent, dev, isa_ns8250_ids) == 0) { : > sc->sc_class = &uart_ns8250_class; : > return (uart_bus_probe(dev, 0, 0, 0, 0)); : > } : : Unfortunately, this now no longer probes non-PnP ns8250. You'll : probably need something like the following to actually probe both: : if (ISA_PNP_PROBE(parent, dev, isa_ns8250_ids) == 0 || : isa_get_vendorid(dev) == 0) Or to save the error like ep does: int error = 0; /* Check isapnp ids */ error = ISA_PNP_PROBE(device_get_parent(dev), dev, ep_ids); /* If the card had a PnP ID that didn't match any we know about */ if (error == ENXIO) return (error); /* If we had some other problem. */ if (!(error == 0 || error == ENOENT)) return (error); ... Warner