Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Nov 2006 11:51:26 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        Jia-Shiun Li <jiashiun@gmail.com>
Subject:   Re: using dev nameunit prior to probe & attach in pcib_alloc_resource()
Message-ID:  <200611291151.27379.jhb@freebsd.org>
In-Reply-To: <1d6d20bc0610121404r600bfee6n9633d621b6dc2e87@mail.gmail.com>
References:  <1d6d20bc0610121404r600bfee6n9633d621b6dc2e87@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611291151.27379.jhb>