Re: serial console problems with 2.4.4

From: Eric W. Biederman (ebiederm@xmission.com)
Date: Thu May 03 2001 - 03:15:03 EST


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);
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 07 2001 - 21:00:15 EST