Re: [PATCH 1/2] serial: New serial driver SCCNXP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 29 Aug 2012 22:26:42 +0400
Alexander Shiyan <shc_work@xxxxxxx> wrote:

> On Wed, 29 Aug 2012 14:46:07 +0100
> Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> Thanks for review.
> 
> > > +	baud = uart_get_baud_rate(port, termios, old, 50,
> > > +				  (s->flags & SCCNXP_HAVE_MR0) ?
> > > +				  230400 : 38400);
> > > +	sccnxp_set_baud(port, baud);
> > You should also write the *actal* baud rate you end up with back into
> > termios unless B0 is requested (see 8250.c for an example). The tty core
> > code will deal with minor variations and the detail for you (eg a user
> > asking for B9600 and getting 9605 will be told they got their baud rate
> > as asked)
> 
> And AFAIK uart_get_baud_rate cannot return 0 for us, so check for zero baud
> is not needed before call tty_termios_encode_baud_rate. Right?

B0 is a bit weird. A request for 0 baud means "hang up" not "change the
speed". So the check is needed really.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux