]> git.karo-electronics.de Git - karo-tx-linux.git/commit
virtio: console: wait for first console port for early console output
authorChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 22 Sep 2011 18:14:23 +0000 (23:44 +0530)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 24 Oct 2011 20:12:25 +0000 (07:12 +1100)
commit7b72766ab1e9fe172246bff0841167f4c52a077b
treed2ddfd5d3df322ccdd39ba55e70b440b4136e928
parentf6957139e7dd42d2c7fd0cdd2c429e865f73e9ab
virtio: console: wait for first console port for early console output

On s390 I have seen some random

"Warning: unable to open an initial console"

boot failure. Turns out that tty_open fails, because the
hvc_alloc was not yet done. In former times this could not happen,
since the probe function automatically called hvc_alloc. With newer
versions (multiport) some host<->guest interaction is required
before hvc_alloc is called. This might be too late, especially if
an initramfs is involved. Lets use a completion if we have
multiport and an early console.

[Amit:
  * Use NULL instead of 0 for pointer comparison
  * Rename 'port_added' to 'early_console_added'
  * Re-format, re-word commit message
  * Rebase patch on top of current queue]

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Acked-by: Chrstian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c