Bug 7002 - modem control line handling in 8250/serial_core suspend code broken
Summary: modem control line handling in 8250/serial_core suspend code broken
Status: REJECTED WILL_NOT_FIX
Alias: None
Product: Power Management
Classification: Unclassified
Component: Hibernation/Suspend (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Rafael J. Wysocki
URL:
Keywords:
Depends on:
Blocks: 7216
  Show dependency tree
 
Reported: 2006-08-14 02:36 UTC by Uli Luckas
Modified: 2007-07-25 15:17 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.18-rc3
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Uli Luckas 2006-08-14 02:36:45 UTC
Hardware Environment: x86, arm (pxa)
Problem Description:
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):
http://sosdg.org/~coywolf/lxr/source/drivers/serial/serial_core.c?v=2.6;a=arm#L1926
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?
Comment 1 Pavel Machek 2006-10-08 13:22:19 UTC
Not sure, just select one method and post a patch for review... or is it fixed
already?
Comment 2 Rafael J. Wysocki 2007-05-30 11:11:53 UTC
Any progress here?
Comment 3 Uli Luckas 2007-05-31 05:00:24 UTC
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.

1) http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=3498/1
2) http://www.spinics.net/lists/arm-kernel/msg33755.html
Comment 4 Russell King 2007-05-31 12:22:50 UTC
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
a regression.
Comment 5 Rafael J. Wysocki 2007-06-01 09:35:52 UTC
I see.

So, should we reject the bug and say we're not fixing it?
Comment 6 Natalie Protasevich 2007-07-07 01:19:47 UTC
So what was the verdict? Anyone else might help to make decision?
Thanks.
Comment 7 Andrew Morton 2007-07-25 15:17:48 UTC
OK, it looks like we won't be fixing this.  hm.

Note You need to log in before you can comment on or make changes to this bug.