Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jan 2018 23:20:40 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Ravi Pokala <rpokala@mac.com>, John Baldwin <jhb@freebsd.org>, Emmanuel Vadot <manu@bidouilliste.com>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules
Message-ID:  <90451.1516663240@critter.freebsd.dk>
In-Reply-To: <CANCZdfpq2QoG4EAj0VW2FF=4VXRv-qQKFfJTJerWH9YOwVoVBA@mail.gmail.com>
References:  <201801220710.w0M7AUm9091853@repo.freebsd.org> <88258.1516630050@critter.freebsd.dk> <20180122153003.664e1613bbf70ab49c5c1541@bidouilliste.com> <52374125.OgxafgljNu@ralph.baldwin.cx> <89102.1516649067@critter.freebsd.dk> <CANCZdfp6t6KrTkp=O7Z9crnAUZhFMr%2BW-92t9S480=OytJdpfg@mail.gmail.com> <607B50C2-883C-4CAB-8860-483EC4E9A668@mac.com> <CANCZdfpq2QoG4EAj0VW2FF=4VXRv-qQKFfJTJerWH9YOwVoVBA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--------
In message <CANCZdfpq2QoG4EAj0VW2FF=3D4VXRv-qQKFfJTJerWH9YOwVoVBA@mail.gma=
il.com>
, Warner Losh writes:

>I think even bootverbose it's insane. Or I don't understand what the real
>ask is.

What I think would be a good idea, is when a driver is kldloaded
the user will be told if there were hardware present which it could
drive (ie: probe() matches), but for some reason and somehow,
it as marked as unavailable/conflicting/disabled, so attach() didn't.

Today you load the device driver and if the hardware is "status=3Ddisabled=
"
in the FDT, nothing happens, and you get no information about why
nothing happened, leaving the user to guess...

I've seen people resort to kldload /boot/kernel/*.ko in an
attempt to find out if were using the right device driver.

I suspect moving the boilerplate

	if (!ofw_bus_status_okay(dev))
		return (ENXIO);

To the attach() function would do it, but we could avoid that
boilerplate in all the drivers, if it was done one level up with
a consistent device_printf() and not calling attach() at all.

What I don't know is how noisy that would be in practice ?

-- =

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    =

Never attribute to malice what can adequately be explained by incompetence=
.



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