lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150121144136.31f328cf@lxorguk.ukuu.org.uk>
Date:	Wed, 21 Jan 2015 14:41:36 +0000
From:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
To:	Peter Hung <hpeter@...il.com>
Cc:	johan@...nel.org, gregkh@...uxfoundation.org,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	tom_tsai@...tek.com.tw, peter_hong@...tek.com.tw,
	Peter Hung <hpeter+linux_kernel@...il.com>
Subject: Re: [PATCH v2 3/4] usb: serial: implement function for F81232


> +	if (cflag & PARENB) {
> +		if (cflag & PARODD)
> +			new_lcr |= UART_LCR_PARITY; /* odd */
> +		else
> +			new_lcr |= SERIAL_EVEN_PARITY; /* even */
> +	}

If you don't support mark/space also clear CMSPAR in the passed termios

> -	if (old_termios)
> -		tty_termios_copy_hw(&tty->termios, old_termios);

Also when you set the baud rate compute the resulting actual baud rate
you generated and set it with

	/* Don't rewrite B0 */
	if (tty_termios_baud_rate(termios))
		tty_termios_encode_baud_rate(termios, baud, baud);

so that the application gets told the baud rate it actually got if it
isn't close to the one they requested.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ