summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2014-03-27 11:40:39 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-16 14:19:13 -0700
commitbf903c0c6ddfedec19ba92626ca30e98bfafbe08 (patch)
treeaeeae10a721d1ea20d8a37bf2efa3a8c72751f95 /firmware
parentb2aeb775f814c9543784b15a5f2d87ea91005f3f (diff)
serial_core: Fix pm imbalance on unbind
When a serial port is closed, uart_close() takes care of shutting down the hardware, and powering it down. When a serial port is unbound while in use, uart_close() bypasses all of this, as this is supposed to be done through uart_hangup() (invoked via tty_vhangup() in uart_remove_one_port()). However, uart_hangup() does not set the hardware's power state, leaving it powered up. This may also lead to unbounded nesting counts in clock and power management, depending on their internal implementation. Make sure to power down the port in uart_hangup(), except when the port is used as a serial console. For serial consoles, this operation must be postponed until after the port becomes completely unused. This case is not fixed yet, as it depends on a (future) fix for the tty->count vs. port->count imbalance on failed uart_open(). After this, the module clock used by the sh-sci driver is disabled on unbind while the serial port is in use. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'firmware')
0 files changed, 0 insertions, 0 deletions