Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751254AbbHQSGP (ORCPT ); Mon, 17 Aug 2015 14:06:15 -0400 Received: from mail-bn1bon0083.outbound.protection.outlook.com ([157.56.111.83]:5906 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750803AbbHQSGK (ORCPT ); Mon, 17 Aug 2015 14:06:10 -0400 X-Greylist: delayed 7843 seconds by postgrey-1.27 at vger.kernel.org; Mon, 17 Aug 2015 14:06:09 EDT Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; lists.infradead.org; dkim=none (message not signed) header.d=none; From: Anirudha Sarangi To: Peter Hurley , Michal Simek CC: "linux-kernel@vger.kernel.org" , "monstr@monstr.eu" , Soren Brinkmann , Jiri Slaby , "linux-serial@vger.kernel.org" , Greg Kroah-Hartman , "linux-arm-kernel@lists.infradead.org" Subject: RE: [PATCH 1/4] serial: xuartps: Fix termios issue for enabling odd parity Thread-Topic: [PATCH 1/4] serial: xuartps: Fix termios issue for enabling odd parity Thread-Index: AQHQ2L2HxicYZm/QVEm50kC0921ibJ4PzhiAgACKXTD//4JKAIAAomrw Date: Mon, 17 Aug 2015 18:06:02 +0000 Message-ID: <59506B47DEDD3943ABF9AC60020F4E2978D6EDB3@XAP-PVEXMBX02.xlnx.xilinx.com> References: <5b154ba97bcd79e49e2131152eb2fc1761594a6c.1439796149.git.michal.simek@xilinx.com> <55D20017.4010008@hurleysoftware.com> <59506B47DEDD3943ABF9AC60020F4E2978D6E7EA@XAP-PVEXMBX02.xlnx.xilinx.com> <55D20AB4.4030405@hurleysoftware.com> In-Reply-To: <55D20AB4.4030405@hurleysoftware.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.23.228.144] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21750.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD041;1:Cw+XzVlFO0jfHper/Ggx1ZUJo6OCvRkTSzyahlt8NIi4SdMbZ1hVtXTOE/7mSwtR+r+nnhLniyJwWN6rBXWU97oPeV/Vfz9/mToKi1QBdBfU8K45Hx+SbvVCQP6ZCQe0gVWdU+Ao1Zf4KQGUBgR58HIoqolpTShgxjpCkPkaltW+9xPWkBZhTeSS3OafMQ51q/Hw3DYc/PruBu4aijUCDEBnNK7Hrx+vka2lkz6ZbBj7zg8NNW5LEcmFcPq9rxXk6cC/sKvhRa+orCeHCgRDwpzvOGWFulsBjmdgMtEiBDbpALFfcC3VQNSIy7s/dhYjf/AqW74k6IaeaDKeXGc9PVq8JKM3ss9K6cgGn9SQ4CpZZrZ+PFprTXvy7wJxnfsR X-Forefront-Antispam-Report: CIP:149.199.60.100;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(3050300001)(13464003)(377454003)(24454002)(479174004)(199003)(189002)(46102003)(2656002)(93886004)(87936001)(54356999)(50986999)(33656002)(102836002)(2900100001)(55846006)(2920100001)(47776003)(4001450100002)(76176999)(64706001)(5001960100002)(189998001)(92566002)(5250100002)(2950100001)(23676002)(5890100001)(62966003)(63266004)(50466002)(5003600100002)(5001860100001)(4001540100001)(106466001)(77156002)(5001830100001)(6806004)(19580405001)(81156007)(5001770100001)(106116001)(19580395003)(575784001)(86362001)(107986001)(5001870100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2FFO11HUB027;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11HUB027;2:KG/P5f20TBt1Y/9Rco0r1tOwogZtlbRABEumLgR16ZicQQh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MK9xI1TLXUCQZ7uuiyNHTfuFAJ2U6Vbx743MDtiZ79PyKrs/72Kc3RPVn3lSJuUQlTjGGlQUWnwmM0pEnLKxUGaLNIn10gIGXNoZ8ptOGo9wb20zeCmzp59/ZygOaWBUIkEVJGgpLKOxu47EJziRicng0lAJ4ibppS5jd;4:eAZzJxWo9f0zx2/VLU0e8gbRGTNetV1WeLk+DVAduScizfhRHrqbzjBV/yWv8avM27PNoWS772m7iQKD0O0IJ1VINY3LFssfcRK7yT8IuzTt+et3R7J4du6f1agLKSxWxh/unAJCyEZIWuK+Ks6Hrk6KsqCdpRe3YmElLCANktOcfwVEhJG+HdmsgKE2W4d8afVpRhWEGB/ClhI/qKAX+zHU/HutXgGayGU3/F3Xgddi1ft4TiVXLMDTKptOtJ9gkSKQosBnX1DdKIpZnpSt4yHthqm1N2VjuF16E4m6EONINBlcEA4IeGx4rlSw8HHYe1Ia+vJL/bXyjrbW6VoJGs4bWpy+EhvIbpaZRh9rd6/AdrBnDZUcAfERj0BNwoN4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(8121501016)(8121501027)(8121501046)(3002001);SRVR:BY2FFO11HUB027;BCL:0;PCL:0;RULEID:;SRVR:BY2FFO11HUB027; X-Forefront-PRVS: 0671F32598 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJGRk8xMUhVQjAyNzsyMzowQTlkVlU0Z3h0bVQrRTFTbWdJM0p4cWNB?= =?utf-8?B?YVRxblI1ZDIxazUzdzNDbXZVaVFQa2VhYkhxRzJzUWlsVmppUkxWQUF4MXlN?= =?utf-8?B?SjV0cCtvdW4wczkvMlIwYkhnZjExMEJqVjNJNmw2SkdoRmMwaFZQWmo5UytT?= =?utf-8?B?ajZ3QWQ4TnhISC9rOUtMdWo5bVVsWlU1cC8zUVIwSmpyY1hDWTZGNTlBTzAr?= =?utf-8?B?TjhDV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ZAPuyGBM3xmkm1K5+cafg==;24:l3ri2bG5mNybb0qJFthjiAAn74aMu4IO/PNI/VdJig6Z6xOaiN0ZluKzBxYdOyD0LrRIebL1b5UHwdGEQiU4p9/CIngCZnafz6UcQrf8rgg= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2015 18:06:06.9552 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2FFO11HUB027 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t7HI6K7r011567 Content-Length: 3825 Lines: 97 Hi, > -----Original Message----- > From: Peter Hurley [mailto:peter@hurleysoftware.com] > Sent: Monday, August 17, 2015 9:54 PM > To: Anirudha Sarangi; Michal Simek > Cc: linux-kernel@vger.kernel.org; monstr@monstr.eu; Soren Brinkmann; Jiri > Slaby; linux-serial@vger.kernel.org; Greg Kroah-Hartman; linux-arm- > kernel@lists.infradead.org > Subject: Re: [PATCH 1/4] serial: xuartps: Fix termios issue for enabling odd parity > > On 08/17/2015 11:55 AM, Anirudha Sarangi wrote: > > Hi, > > > >> -----Original Message----- > >> From: Peter Hurley [mailto:peter@hurleysoftware.com] > >> Sent: Monday, August 17, 2015 9:09 PM > >> To: Michal Simek > >> Cc: linux-kernel@vger.kernel.org; monstr@monstr.eu; Anirudha Sarangi; > >> Soren Brinkmann; Jiri Slaby; linux-serial@vger.kernel.org; Greg > >> Kroah-Hartman; linux- arm-kernel@lists.infradead.org > >> Subject: Re: [PATCH 1/4] serial: xuartps: Fix termios issue for > >> enabling odd parity > >> > >> On 08/17/2015 03:22 AM, Michal Simek wrote: > >>> From: Anirudha Sarangi > >>> > >>> Existing set_termios does not handle the option for enabling odd > >>> parity. This patch fixes it. > >> > >> NAK. PARODD does not enable parity generation or detection. > >> > > What if someone is trying to change from even to odd parity? > > If userspace wants odd parity, then c_cflag must have both PARENB and PARODD > set. > > Just PARODD does nothing. > > From SUS v4, General Terminal Interface, 11.2.4 Control Modes; > > "If PARENB is set, parity generation and detection shall be enabled and a parity > bit is added to each byte. If parity is enabled, PARODD shall specify odd parity if > set; otherwise, even parity shall be used." > > Thanks a lot. I will incorporate the changes. > > > In this conditional case, we setup some register bit for the same. > > Is the above use case not a valid one? > > > > Regards > > Anirudha > > > >> Regards, > >> Peter Hurley > >> > >>> Signed-off-by: Anirudha Sarangi > >>> Signed-off-by: Michal Simek > >>> --- > >>> > >>> drivers/tty/serial/xilinx_uartps.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/drivers/tty/serial/xilinx_uartps.c > >>> b/drivers/tty/serial/xilinx_uartps.c > >>> index 009e0dbc12d2..a3020344ac9d 100644 > >>> --- a/drivers/tty/serial/xilinx_uartps.c > >>> +++ b/drivers/tty/serial/xilinx_uartps.c > >>> @@ -723,7 +723,7 @@ static void cdns_uart_set_termios(struct > >>> uart_port > >> *port, > >>> else > >>> cval |= CDNS_UART_MR_STOPMODE_1_BIT; /* 1 STOP bit */ > >>> > >>> - if (termios->c_cflag & PARENB) { > >>> + if ((termios->c_cflag & PARENB) || (termios->c_cflag & PARODD)) > >>> + { > >>> /* Mark or Space parity */ > >>> if (termios->c_cflag & CMSPAR) { > >>> if (termios->c_cflag & PARODD) > >>> > > > > > > > > This email and any attachments are intended for the sole use of the named > recipient(s) and contain(s) confidential information that may be proprietary, > privileged or copyrighted under applicable law. If you are not the intended > recipient, do not read, copy, or forward this email message or any attachments. > Delete this email message and any attachments immediately. > > This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately. ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?