serial console vs suspend

Warner Losh imp at bsdimp.com
Thu May 17 14:59:29 UTC 2018


On Thu, May 17, 2018 at 7:28 AM, Andriy Gapon <avg at freebsd.org> wrote:

> On 17/05/2018 16:25, Ian Lepore wrote:
> > Why should it go through the console layer? If the uart hardware needs
> > some re-init on resume, won't that be true whether the uart is serving
> > as a console, a dial-in terminal, or the interface to wifi or bluetooth
> > chip?
>
> I think that for those things a normal device resume should do.
> console gets used very early, so it may require a special resume.
>

We should re-init both places (maybe with a flag to prevent double if
that's harmful). The console is needed very early after the resume, often
earlier than the accidental location in the device tree the console
device_t node lives. That way we don't lose output. The console layer gives
us a convenient hook early in resume to cope.  It's yet another reason,
though, it should be restricted to true console devices, but that's another
conversation.

Warner


More information about the freebsd-current mailing list