mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Serial Console changes in linux 2.4.15??
@ 2002-02-18 22:16 Craig
  2002-02-18 22:41 ` Alan Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Craig @ 2002-02-18 22:16 UTC (permalink / raw)
  To: linux-kernel


Hi all,

I have run into a problem with using my serial port as a console in linux
2.4.17, and tracked down the change.  Just wondering if anyone could shed some
light on the situation.  Here's the scoop:

In Linux 2.4.10 -> 2.4.14 (and probably earlier than 2.4.10, but i didn't
check) my serial console port works just fine.  I then started using 2.4.17 and
the serial port would continue to spit out output, but would not accept any
input.   I turned on the debugging statements and traced the problem down to the
following piece of code from "drivers/char/serial.c".

function -> "change_speed"

#if 0 /* breaks serial console during boot stage */
        /*
         * !!! ignore all characters if CREAD is not set
         */
        if ((cflag & CREAD) == 0)
                info->ignore_status_mask |= UART_LSR_DR;
#endif


The "#if 0" statements exist in 2.4.10 -> 2.4.14.
In Linux 2.4.15, the "#if 0" statements were removed, so now that code is hit,
and all the input characters are now ignored.
It is still missing in 2.4.16 & 2.4.17.
If i manually put the lines back (the "#if 0" and "#endif"), then my serial
console works just fine.

Did someone submit serial.c with the "#if 0" lines removed by accident?
I did look at the 2.4.15 changelog and could not see any changes regarding this.

My other question is: Why does this break the serial console?
Someone must have know it has that affect in 2.4 because of the comment that is
in the "#if 0" line.  Any idea what is causing 'cflag' to be improperly set in
the serial driver?
I'd much prefer to fix the root problem, as opposed to putting in the "#if 0"
work-around.

Any ideas or pointers would be most appreciated.
Thanks.

--
Craig.
+------------------------------------------------------+
http://www.wombat.ca               Why? Why not.
http://www.washington.edu/pine/    Pine @ the U of Wash.
+-------------=*sent via Pine4.42*=--------------------+






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

* Re: Serial Console changes in linux 2.4.15??
  2002-02-18 22:16 Serial Console changes in linux 2.4.15?? Craig
@ 2002-02-18 22:41 ` Alan Cox
  2002-02-18 22:54   ` Craig
  2002-02-19  4:49   ` Eric W. Biederman
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Cox @ 2002-02-18 22:41 UTC (permalink / raw)
  To: Craig; +Cc: linux-kernel

> If i manually put the lines back (the "#if 0" and "#endif"), then my serial
> console works just fine.

Except that you broke serial support for CREAD control

> Did someone submit serial.c with the "#if 0" lines removed by accident?

No

> My other question is: Why does this break the serial console?

Your user space is buggy I think, and didn't set CREAD

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

* Re: Serial Console changes in linux 2.4.15??
  2002-02-18 22:41 ` Alan Cox
@ 2002-02-18 22:54   ` Craig
  2002-02-19  4:49   ` Eric W. Biederman
  1 sibling, 0 replies; 5+ messages in thread
From: Craig @ 2002-02-18 22:54 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

On Mon, 18 Feb 2002, Alan Cox wrote:

> > If i manually put the lines back (the "#if 0" and "#endif"), then my serial
> > console works just fine.
>
> Except that you broke serial support for CREAD control
>
> > Did someone submit serial.c with the "#if 0" lines removed by accident?
>
> No


If it was removed on purpose, why was the code commented out in the first place?
Why remove it in 2.4.15?  Just curious on why that release.

--
Craig.
+------------------------------------------------------+
http://www.wombat.ca               Why? Why not.
http://www.washington.edu/pine/    Pine @ the U of Wash.
+-------------=*sent via Pine4.42*=--------------------+




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

* Re: Serial Console changes in linux 2.4.15??
  2002-02-18 22:41 ` Alan Cox
  2002-02-18 22:54   ` Craig
@ 2002-02-19  4:49   ` Eric W. Biederman
  2002-02-22  1:00     ` SOLVED -> " Craig
  1 sibling, 1 reply; 5+ messages in thread
From: Eric W. Biederman @ 2002-02-19  4:49 UTC (permalink / raw)
  To: Alan Cox; +Cc: Craig, linux-kernel

Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

> > If i manually put the lines back (the "#if 0" and "#endif"), then my serial
> > console works just fine.
> 
> Except that you broke serial support for CREAD control
> 
> > Did someone submit serial.c with the "#if 0" lines removed by accident?
> 
> No
> 
> > My other question is: Why does this break the serial console?
> 
> Your user space is buggy I think, and didn't set CREAD

Old versions of /sbin/init are broken and clear CREAD.  Most getty's (except
mingetty) do the right thing.  I saw the change at 2.4.2 -> 2.4.3.  I
don't why some people have managed to avoid it for longer periods of
time.

The great mystery is how /sbin/init managed to work in 2.4.2....

Eric

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

* SOLVED -> Re: Serial Console changes in linux 2.4.15??
  2002-02-19  4:49   ` Eric W. Biederman
@ 2002-02-22  1:00     ` Craig
  0 siblings, 0 replies; 5+ messages in thread
From: Craig @ 2002-02-22  1:00 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: Alan Cox, linux-kernel

On 18 Feb 2002, Eric W. Biederman wrote:

> Old versions of /sbin/init are broken and clear CREAD.  Most getty's (except
> mingetty) do the right thing.  I saw the change at 2.4.2 -> 2.4.3.  I
> don't why some people have managed to avoid it for longer periods of
> time.
>
> The great mystery is how /sbin/init managed to work in 2.4.2....
>
> Eric
>


Eric,
  Thanks very much to both you and Alan.  You were exactly right.  The version
of /sbin/init on our filesystem was quite old (2 years old).  I grabbed the tar
ball of the newest version, and using this version (without the "#if 0" lines)
works just fine because it sets up the console properly.

Thanks again.

--
Craig.
+------------------------------------------------------+
http://www.wombat.ca               Why? Why not.
http://www.washington.edu/pine/    Pine @ the U of Wash.
+-------------=*sent via Pine4.42*=--------------------+




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

end of thread, other threads:[~2002-02-22  1:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-18 22:16 Serial Console changes in linux 2.4.15?? Craig
2002-02-18 22:41 ` Alan Cox
2002-02-18 22:54   ` Craig
2002-02-19  4:49   ` Eric W. Biederman
2002-02-22  1:00     ` SOLVED -> " Craig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®