Re: S3 suspend and serial console

Carl-Daniel Hailfinger
2005-02-05T13:29:52Z

Carl-Daniel Hailfinger schrieb:
> Hi,
>
> on resume from S3, my serial console prints garbage and stops working.
> I assume the BIOS resets the serial port on resume, but I have
> abolutely no idea how to find out what speed and parity the serial
> port has after resume. A quick try of 9600,57600,115200 didn't
> succeed and I now wonder if
> - the kernel could reset the serial ports on resume
> - the kernel could read the current parameters from the UART and print
> them out so I can adjust my serial console.
>
> Oh well... after some investigation, it seems the serial console
> goes back to normal after issuing the command
> echo foo >/dev/ttyS0

>/dev/ttyS0
fixes it, too. So you're right, Pavel.

> Could it be that the UART state is out-of-sync or something like that
> after resume and the serial console code doesn't notice?

If you add an open()/close() to the S3 wakeup code, how can you
find out which device you're supposed to open, that is which device
the serial console is attached to? And how early can you open() the
serial port? Before the "Back to C!" printk?

Once you have a patch, please mail it to me. I'll surely test it ;-)

Regards,
Carl-Daniel
--