svn commit: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules

Ravi Pokala rpokala at mac.com
Mon Jan 22 21:42:18 UTC 2018


>> I wonder if it would be too noisy if we allowed ->probe() to run on disabled devices and reported something like:
>> 
>>           "foobar0: Matched disabled device <...>"
>> 
>> (without calling ->attach())
>> 
>> That way you would know you loaded the right driver, rather than have to guess
> 
> I suspect that would be too noisy. It would be better to just run probe, but then have newbus report it's disabled so we never go onto attach.

I think a "Matched disabled device" message under bootverbose would be reasonable.

-Ravi (rpokala@)

-----Original Message-----
From: <owner-src-committers at freebsd.org> on behalf of Warner Losh <imp at bsdimp.com>
Date: 2018-01-22, Monday at 11:29
To: Poul-Henning Kamp <phk at phk.freebsd.dk>
Cc: John Baldwin <jhb at freebsd.org>, Emmanuel Vadot <manu at bidouilliste.com>, src-committers <src-committers at freebsd.org>, <svn-src-all at freebsd.org>, <svn-src-head at freebsd.org>
Subject: Re: svn commit: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules



On Mon, Jan 22, 2018 at 12:24 PM, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:

--------
In message <52374125.OgxafgljNu at ralph.baldwin.cx>, John Baldwin writes:

>Create the corresponding device_t but device_disable() it when there
>is a disabled property.

That also removes a couple of boilerplate lines from all FDT device
drivers.


That would be useful, but the status bit is so much more than on/off. 


>A user can then use 'devctl enable <blah>' to enable
>it before (or even after) loading a device driver.

That would work for me.

I wonder if it would be too noisy if we allowed ->probe() to run
on disabled devices and reported something like:

        "foobar0: Matched disabled device <...>"

(without calling ->attach())

That way you would know you loaded the right driver, rather
than have to guess.


I suspect that would be too noisy. It would be better to just run probe, but then have newbus report it's disabled so we never go onto attach.

Though, there's more fundamental issues at play since FDT is tricky and a lot more interrelated than other enumeration platforms.

Warner








More information about the svn-src-all mailing list