Kernel Bug Tracker – Bug 7002
modem control line handling in 8250/serial_core suspend code broken
Last modified: 2007-07-25 15:17:48 UTC
Hardware Environment: x86, arm (pxa)
there is a bug in recent kernel's suspend code for serial drivers, at least
for 8250 and pxa, probably others though.
When suspending (e.g. apm --suspend) a machine, the serial_core suspend code
tries to disable modem control lines (including RTS):
This is needed to stop the other side of a serial link from sending any data
after our serial port has been disabled.
Now in line 1937 ops->shutdown(port) is called. For 8250 this points to
serial8250_shutdown, for pxa to serial_pxa_shutdown. Both call
xxx__set_mctrl(&up->port, up->port.mctrl) which will restore the old control
line values and reverse the intended effect.
I am not quite sure about the right approach to fixing this. Should
uart_suspend_port set port.mctrl to 0 after saveing it's old value? Or should
serial8250_shutdown simply set port.mctrl to 0?
Not sure, just select one method and post a patch for review... or is it fixed
Any progress here?
No Progress. I posted a patch (1) which was discussed on the linux-arm-kernel
mailinglist (2). As my patch breaks other things it got rejectd.
TBH I can't see any way to solve this. The choice is: we fix this and break
some well defined POSIX behaviour, or we don't fix this and we keep the well
defined POSIX behaviour. I'm afraid this bug gives way to not introducing
So, should we reject the bug and say we're not fixing it?
So what was the verdict? Anyone else might help to make decision?
OK, it looks like we won't be fixing this. hm.