diff options
| author | Andy Shevchenko <[email protected]> | 2016-08-31 19:46:55 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2016-09-02 15:03:35 +0200 |
| commit | b3965767d86cf4534dfe1affbde0453d3224ed7f (patch) | |
| tree | 64d94878500dd9fa8755ade0016a9ed78c2a29f6 /tools/perf/scripts/python | |
| parent | 1c06bde643d0a0b17f117539e961300cad69aad3 (diff) | |
serial: 8250_port: fix runtime PM use in __do_stop_tx_rs485()
There are calls to serial8250_rpm_{get|put}() in __do_stop_tx_rs485() that are
certainly placed in a wrong location. I dunno how it had been tested with
runtime PM enabled because it is obvious "sleep in atomic context" error.
Besides that serial8250_rpm_get() is called immediately after an IO just
happened. It implies that the device is already powered on, see implementation
of serial8250_em485_rts_after_send() and serial8250_clear_fifos() for the
details.
There is no bug have been seen due to, as I can guess, use of auto suspend mode
when scheduled transaction to suspend is invoked quite lately than it's needed
for a few writes to the port. It might be possible to trigger a warning if
stop_tx_timer fires when device is suspended.
Refactor the code to use runtime PM only in case of timer function.
Fixes: 0c66940d584d ("tty/serial/8250: fix RS485 half-duplex RX")
Cc: "Matwey V. Kornilov" <[email protected]>
Tested-by: Yegor Yefremov <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions