Re: Having trouble with two active wscons drivers, wskbd stops working on console

Alain Runa <[email protected]> Thu, 6 Apr 2023 19:54:38 +0200
Newsgroups gmane.os.netbsd.ports.amiga
Message-ID <[email protected]>
Hi Frank,

Thanks again=E2=80=A6 I have to take a deeper look on that, sounds =
complicated.
I came very far with NetBSD=E2=80=99s documentation about driver =
implementation.
However, the amiga specific information is certainly lacking and =
requires background knowledge which seems to be not documented very =
well.

Regards
Alain

>=20
> That's certainly wrong. You can do so in amidisplaycc, because the =
custom
> chipset is always there, but otherwise a device's console probe should =
only
> be successful when the device exists and is alive. Otherwise return
> CN_DEAD.
>=20
> ...
>=20
> Note that, because of the problem of early console initialization, the =
auto
> configuration of devices will be performed twice on the Amiga. First =
with
> amiga_realconfig=3D0, for potential console devices only, and then for =
real
> with amiga_realconfig=3D1.
>=20
> dev/zbus.c only considers those devices in the amiga_realconfig=3D0 =
pass,
> which have been entered in the prefconftab[].
>=20
> This means your zzfb_match() and zzfb_attach() functions should be =
called
> twice. In zzfb_match() you can differentiate using amiga_realconfig =
and in
> zzfb_attach() you can check if the second argument (device_t self) is =
NULL,
> so you don't initialize the card twice.
>=20
> The preconfiguration pass runs before calling cnprobe, so you should =
know
> whether your board has been initialized correctly.
>=20