From owner-freebsd-current@FreeBSD.ORG Wed Nov 29 18:21:15 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 43DBA16A40F for ; Wed, 29 Nov 2006 18:21:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8990343CA3 for ; Wed, 29 Nov 2006 18:21:11 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kATIL8qn092792; Wed, 29 Nov 2006 13:21:09 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 29 Nov 2006 11:51:26 -0500 User-Agent: KMail/1.9.1 References: <1d6d20bc0610121404r600bfee6n9633d621b6dc2e87@mail.gmail.com> In-Reply-To: <1d6d20bc0610121404r600bfee6n9633d621b6dc2e87@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611291151.27379.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 29 Nov 2006 13:21:09 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2258/Wed Nov 29 07:04:15 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Jia-Shiun Li Subject: Re: using dev nameunit prior to probe & attach in pcib_alloc_resource() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 18:21:15 -0000 On Thursday 12 October 2006 17:04, Jia-Shiun Li wrote: > This is a cosmetic bug (probably). > > I noticed that pcib prints some null pointer string in verbose dmesg > like the following example. The pcib driver prints "(null) requested > memory...". It turns out that pcib_alloc_resource() intended to use > dev->nameunit to show device name. But the function is called for the > first time during pci bus device enumeration. By the time the driver > probing function is not called yet, and hence no valid nameunit. > > I suppose this code fragment in pcib_alloc_resource(): > > if (bootverbose) > device_printf(dev,"%s requested memory range " > "0x%lx-0x%lx: good\n", > device_get_nameunit(child), start, end); > > should be changed to use something else, for example pci device(slot) > and function numbers, to identify the newly enumerated and yet probed > pci devices. Any comment? This should be fixed now. -- John Baldwin