Date: Mon, 13 Oct 2008 00:58:49 GMT From: Arthur Hartwig <arthur.hartwig@nokia.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/128036: Serial console mostly ignores typein to restart after shutdown Message-ID: <200810130058.m9D0wndN072568@www.freebsd.org> Resent-Message-ID: <200810130100.m9D101FJ035842@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 128036 >Category: kern >Synopsis: Serial console mostly ignores typein to restart after shutdown >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 13 01:00:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Arthur Hartwig >Release: 6.3 >Organization: Nokia >Environment: >Description: System with serial console. If the system is shutdown by "shutdown -h ..." the following prompt is displayed on the console: "The operating system has halted. Please press any key to reboot." Often a single keypress is not recognised; multiple keypresses are often required for the system to reboot. >How-To-Repeat: On system with serial console, issue # shutdown -h now command >Fix: In sys/dev/sio.c, function siocnclose() change outb(iobase + com_mcr, sp->mcr | MCR_DTR | MCR_RTS); outb(iobase + com_ier, sp->ier); to outb(iobase + com_mcr, sp->mcr | MCR_DTR | MCR_RTS); if (rebooting == 0) { /* * Only restore the interrupt enables if not rebooting. If * rebooting leave interrupts disabled, else a key press might be * swallowed by the interrupt handler and not seen by the shutdown code. */ outb(iobase + com_ier, sp->ier); } The problem is that the shutdown code looking for a keypress on the console (loop in sys/kern/kern_shutdown.c function shutdown_halt) runs with console interrupts enabled. If the keypress generates a console interrupt then the keypress is swallowed by the console interrupt handler and not seen by the code polling for a keypress. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810130058.m9D0wndN072568>