All of lore.kernel.org
 help / color / mirror / Atom feed
* serial console problems with 2.4.4
@ 2001-05-02  9:54 Reto Baettig
  2001-05-02 11:15 ` Fabrice Gautier
  0 siblings, 1 reply; 6+ messages in thread
From: Reto Baettig @ 2001-05-02  9:54 UTC (permalink / raw)
  To: Linux Alpha mailing list, Linux Kernel Mailinglist

Hi

I just installed 2.4.4 on our alpha SMP boxes (ES40) and now I have
problems with the serial console:

sulogin does not accept input from the serial line
mingetty does not accept input from the serial line
agetty works fine

Everything works fine for the 2.4.2 kernel. I took the .config file from
the 2.4.2 kernel to compile the 2.4.4 kernel.

Any ideas?

Reto


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

* Re: serial console problems with 2.4.4
  2001-05-02  9:54 serial console problems with 2.4.4 Reto Baettig
@ 2001-05-02 11:15 ` Fabrice Gautier
  2001-05-02 16:37   ` Eric W. Biederman
  0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Gautier @ 2001-05-02 11:15 UTC (permalink / raw)
  To: Reto Baettig; +Cc: Linux Alpha mailing list, Linux Kernel Mailinglist


On Wed, 02 May 2001 11:54:11 +0200
Reto Baettig <baettig@scs.ch> wrote:

> Hi
> 
> I just installed 2.4.4 on our alpha SMP boxes (ES40) and now I have
> problems with the serial console:

I get same kind of problem when upgrading from 2.4.2 to 2.4.3 and using
busybox as init/getty 

The problem was a bug in busybox. The console initialisation code was
not correct.
> 
> sulogin does not accept input from the serial line
> mingetty does not accept input from the serial line
> agetty works fine

So this this probably a sulogin/mingetty problem. They should set the
CREAD flag in your tty c_cflag.

the patch for busybox repalced the line
	tty.c_cflag |= HUPCL|CLOCAL
by
	tty.c_cflag |= CREAD|HUPCL|CLOCAL
	
Hope this help.

-- 
Fabrice Gautier <gautier@email.enstfr>


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

* Re: serial console problems with 2.4.4
  2001-05-02 11:15 ` Fabrice Gautier
@ 2001-05-02 16:37   ` Eric W. Biederman
  2001-05-02 18:52     ` Fabrice Gautier
  0 siblings, 1 reply; 6+ messages in thread
From: Eric W. Biederman @ 2001-05-02 16:37 UTC (permalink / raw)
  To: Fabrice Gautier
  Cc: Reto Baettig, Linux Alpha mailing list, Linux Kernel Mailinglist

Fabrice Gautier <gautier@email.enst.fr> writes:

> On Wed, 02 May 2001 11:54:11 +0200
> Reto Baettig <baettig@scs.ch> wrote:
> 
> > Hi
> > 
> > I just installed 2.4.4 on our alpha SMP boxes (ES40) and now I have
> > problems with the serial console:
> 
> I get same kind of problem when upgrading from 2.4.2 to 2.4.3 and using
> busybox as init/getty 
> 
> The problem was a bug in busybox. The console initialisation code was
> not correct.
> > 
> > sulogin does not accept input from the serial line
> > mingetty does not accept input from the serial line
> > agetty works fine
> 
> So this this probably a sulogin/mingetty problem. They should set the
> CREAD flag in your tty c_cflag.
> 
> the patch for busybox repalced the line
> 	tty.c_cflag |= HUPCL|CLOCAL
> by
> 	tty.c_cflag |= CREAD|HUPCL|CLOCAL
> 	
> Hope this help.

This part is correct.  

However the kernel sets CREAD by default.  
sysvinit (and possibly other inits) clears CREAD.
I wish I knew where the breakage actually occured.

And then sulogin/mingetty need to reenable it.

It's not too big of a deal except the serial code doesn't accept SAK's
when CREAD is clear.

Eric

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

* Re: serial console problems with 2.4.4
  2001-05-02 16:37   ` Eric W. Biederman
@ 2001-05-02 18:52     ` Fabrice Gautier
  2001-05-03  8:15       ` Eric W. Biederman
  0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Gautier @ 2001-05-02 18:52 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: Linux Kernel Mailinglist


On 02 May 2001 10:37:21 -0600
ebiederm@xmission.com (Eric W. Biederman) wrote:

> Fabrice Gautier <gautier@email.enst.fr> writes:
> > So this this probably a sulogin/mingetty problem. They should set the
> > CREAD flag in your tty c_cflag.
> > 
> > the patch for busybox repalced the line
> > 	tty.c_cflag |= HUPCL|CLOCAL
> > by
> > 	tty.c_cflag |= CREAD|HUPCL|CLOCAL
> > 	
> > Hope this help.
> 
> This part is correct.  
> 
> However the kernel sets CREAD by default.  

Are your sure? Wasn't this the behaviour for 2.4.2  but changed in 2.4.3

> sysvinit (and possibly other inits) clears CREAD.

In my case I was using busybox as init. So there is no sysinit or any other
init called before this line.


> I wish I knew where the breakage actually occured.

Just look at this diff on serial.c between 2.4.2 and 2.4.3:

--- serial.c	Sat Apr 21 17:22:53 2001
+++ ../../../linux-2.4.2/drivers/char/serial.c	Sat Feb 17 01:02:36 2001
@@ -1764,8 +1765,8 @@
 	/*
 	 * !!! ignore all characters if CREAD is not set
 	 */
-//	if ((cflag & CREAD) == 0)
-//		info->ignore_status_mask |= UART_LSR_DR;
+	if ((cflag & CREAD) == 0)
+		info->ignore_status_mask |= UART_LSR_DR;
 	save_flags(flags); cli();
 	if (uart_config[info->state->type].flags & UART_STARTECH) {
 		serial_outp(info, UART_LCR, 0xBF);


-- 
Fabrice Gautier <gautier@email.enstfr>


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

* Re: serial console problems with 2.4.4
  2001-05-02 18:52     ` Fabrice Gautier
@ 2001-05-03  8:15       ` Eric W. Biederman
  2001-05-03 12:30         ` Fabrice Gautier
  0 siblings, 1 reply; 6+ messages in thread
From: Eric W. Biederman @ 2001-05-03  8:15 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: Linux Kernel Mailinglist

Fabrice Gautier <gautier@email.enst.fr> writes:

> On 02 May 2001 10:37:21 -0600
> ebiederm@xmission.com (Eric W. Biederman) wrote:
> 
> > Fabrice Gautier <gautier@email.enst.fr> writes:
> > > So this this probably a sulogin/mingetty problem. They should set the
> > > CREAD flag in your tty c_cflag.
> > > 
> > > the patch for busybox repalced the line
> > > 	tty.c_cflag |= HUPCL|CLOCAL
> > > by
> > > 	tty.c_cflag |= CREAD|HUPCL|CLOCAL
> > > 	
> > > Hope this help.
> > 
> > This part is correct.  
> > 
> > However the kernel sets CREAD by default.  
> 
> Are your sure? Wasn't this the behaviour for 2.4.2  but changed in 2.4.3

init=/bin/bash works fine over a serial console in 2.4.4.  So I am
certain.

I get the impression that something in 2.4.3 fixed CREAD handling, and we
started noticing the buggy user space.

> > sysvinit (and possibly other inits) clears CREAD.
> 
> In my case I was using busybox as init. So there is no sysinit or any other
> init called before this line.

The busy box init is also clearing CREAD (as of 0.51 anyway).

> > I wish I knew where the breakage actually occured.
> 
> Just look at this diff on serial.c between 2.4.2 and 2.4.3:

If it was a real diff between 2.4.2 and 2.4.3 I would agree, however it looks
like your attempt to fix 2.4.3. 

Eric


> --- serial.c	Sat Apr 21 17:22:53 2001
> +++ ../../../linux-2.4.2/drivers/char/serial.c	Sat Feb 17 01:02:36 2001
> @@ -1764,8 +1765,8 @@
>  	/*
>  	 * !!! ignore all characters if CREAD is not set
>  	 */
> -//	if ((cflag & CREAD) == 0)
> -//		info->ignore_status_mask |= UART_LSR_DR;
> +	if ((cflag & CREAD) == 0)
> +		info->ignore_status_mask |= UART_LSR_DR;
>  	save_flags(flags); cli();
>  	if (uart_config[info->state->type].flags & UART_STARTECH) {
>  		serial_outp(info, UART_LCR, 0xBF);
> 


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

* Re: serial console problems with 2.4.4
  2001-05-03  8:15       ` Eric W. Biederman
@ 2001-05-03 12:30         ` Fabrice Gautier
  0 siblings, 0 replies; 6+ messages in thread
From: Fabrice Gautier @ 2001-05-03 12:30 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: Linux Kernel Mailinglist


On 03 May 2001 02:15:03 -0600
ebiederm@xmission.com (Eric W. Biederman) wrote:

> 
> I get the impression that something in 2.4.3 fixed CREAD handling, and we
> started noticing the buggy user space.

That's my impression too...

> > > I wish I knew where the breakage actually occured.
> > 
> > Just look at this diff on serial.c between 2.4.2 and 2.4.3:
> 
> If it was a real diff between 2.4.2 and 2.4.3 I would agree, however it looks
> like your attempt to fix 2.4.3. 

Err... Yes sorry, in fact this was a workaround proposed by Kanoj, the 
maintener of serial.c (I think)...

Regards.

-- 
Fabrice Gautier <gautier@email.enstfr>


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

end of thread, other threads:[~2001-05-03 12:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-02  9:54 serial console problems with 2.4.4 Reto Baettig
2001-05-02 11:15 ` Fabrice Gautier
2001-05-02 16:37   ` Eric W. Biederman
2001-05-02 18:52     ` Fabrice Gautier
2001-05-03  8:15       ` Eric W. Biederman
2001-05-03 12:30         ` Fabrice Gautier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.