linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Serial console not accepting input
@ 2002-03-22 22:48 Ho-Kuo Chan
  2002-03-23 10:00 ` Gerard Basler
  0 siblings, 1 reply; 2+ messages in thread
From: Ho-Kuo Chan @ 2002-03-22 22:48 UTC (permalink / raw)
  To: linuxppc-embedded


Hi,
    I have managed to get kernel 2-4-19-pre3 booting on my PPC405 GP based
custom board (which is based on the Walnut). The problem is that the serial
console does not accept any input. When I say this I mean the typed
characters are receievd but ignored. I know this because I turned on the
SERIAL_DEBUG_INTR flag on and the chars are received. I then traced the code
to find that in receive_chars in drivers/char/serial.c, the chars are only
accepted if the ignore_status_mask does not have the recieve buffer not
empty bit set. Well the ignore_status_mask is set in the function
change_speed if the cflag variable is not equal to CREAD:

if ((cflag & CREAD) == 0)
    info->ignore_status_mask |= UART_LSR_DR;

The cflag is equal to the tty's termios.c_cflag which I believe is set to
the serial console driver's cflag. I checked the sercons.cflag and it is
originally set to CREAD | HUPCL | CLOCAL in serial_console_setup called when
the driver is registered in register_console via serial_console_init.
However, the sercons.cflag is set to 0 in rs_open() in drivers/serial.c
which is called when tty_open is called. tty_open is called several times
during the boot process and as such, results in the ignore_status_mask being
set, causing the console to ignore input chars. So my question in all of
this is: why is the sercons.cflag set to 0 in rs_open?

Thanks in advance!!!

Ho-Kuo Chan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Serial console not accepting input
  2002-03-22 22:48 Serial console not accepting input Ho-Kuo Chan
@ 2002-03-23 10:00 ` Gerard Basler
  0 siblings, 0 replies; 2+ messages in thread
From: Gerard Basler @ 2002-03-23 10:00 UTC (permalink / raw)
  To: Ho-Kuo Chan; +Cc: linuxppc-embedded


Hi!

This seems to be the same problem we had same days ago.
First the shell didn't start because we hadn't turned FPU emulation on.
Then the shell started but we couldn't see any reaction on the typed
characters.
Which root filesystem do you use?
We used an old root filesystem from Montavista.
Because this was rather old we cross-compiled several packages from
www.linuxfromscratch.org and tested them.
Replacing the old "/sbin/init" with a newer version solved this problem
(statically linked).
Download it from here:
ftp.linuxfromscratch.org/lfs-packages/3.2/sysvinit-2.84.tar.bz

Perhaps someone has an explanation for this!
What has changed in newever kernels?

Regards,
Gérard

On Fri, 22 Mar 2002, Ho-Kuo Chan wrote:

>
> Hi,
>     I have managed to get kernel 2-4-19-pre3 booting on my PPC405 GP based
> custom board (which is based on the Walnut). The problem is that the serial
> console does not accept any input. When I say this I mean the typed
> characters are receievd but ignored. I know this because I turned on the
> SERIAL_DEBUG_INTR flag on and the chars are received. I then traced the code
> to find that in receive_chars in drivers/char/serial.c, the chars are only
> accepted if the ignore_status_mask does not have the recieve buffer not
> empty bit set. Well the ignore_status_mask is set in the function
> change_speed if the cflag variable is not equal to CREAD:
>
> if ((cflag & CREAD) == 0)
>     info->ignore_status_mask |= UART_LSR_DR;
>
> The cflag is equal to the tty's termios.c_cflag which I believe is set to
> the serial console driver's cflag. I checked the sercons.cflag and it is
> originally set to CREAD | HUPCL | CLOCAL in serial_console_setup called when
> the driver is registered in register_console via serial_console_init.
> However, the sercons.cflag is set to 0 in rs_open() in drivers/serial.c
> which is called when tty_open is called. tty_open is called several times
> during the boot process and as such, results in the ignore_status_mask being
> set, causing the console to ignore input chars. So my question in all of
> this is: why is the sercons.cflag set to 0 in rs_open?
>
> Thanks in advance!!!
>
> Ho-Kuo Chan
>
>
>
>


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-03-23 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-22 22:48 Serial console not accepting input Ho-Kuo Chan
2002-03-23 10:00 ` Gerard Basler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).