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

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

 



> +	/* Mask termios capabilities we don't support */
> +	termios->c_cflag &= ~CMSPAR;
> +	termios->c_iflag &= ~(IXON | IXOFF | IXANY);

The kernel will handle IXON/IXOFF/IXANY in software if the hardware
doesn't do it so you only need the CMSPAR one.

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


Looks good to me barring those trivial bits that can be fixed up with a
follow up patch

Acked-by: Alan Cox <alan@xxxxxxxxxxxxxxx>

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