Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161975AbbKEHWl (ORCPT ); Thu, 5 Nov 2015 02:22:41 -0500 Received: from mail-bn1on0079.outbound.protection.outlook.com ([157.56.110.79]:31363 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1032390AbbKEHVh (ORCPT ); Thu, 5 Nov 2015 02:21:37 -0500 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; linuxfoundation.org; dkim=none (message not signed) header.d=none;linuxfoundation.org; dmarc=bestguesspass action=none header.from=xilinx.com; From: Soren Brinkmann To: Greg Kroah-Hartman , Jiri Slaby CC: Michal Simek , , , , "Soren Brinkmann" Subject: [PATCH v2 03/10] tty: xuartps: Always enable transmitter in start_tx Date: Wed, 4 Nov 2015 23:21:12 -0800 Message-ID: <1446708079-1105-4-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 2.6.2.3.ga463a5b In-Reply-To: <1446708079-1105-1-git-send-email-soren.brinkmann@xilinx.com> References: <1446708079-1105-1-git-send-email-soren.brinkmann@xilinx.com> X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21920.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD008;1:JJmBH72urivlm8PKpYuHemfUA6Gop6fmDFumhE+Yr5x+rsbWXUyFFUR1rUBi97PSNsG1yj9h8hEFTjCXyWEUh25EDKYFAbkc9QcdCetMA53EEJtrue7N68i4JaISgvuoKxXvWqQoWTEApjeUyRAKKGq6BxoqC30pHWY7RyP+b2VKXWFjo+4Q4NnliPWRQ14f+WxDFjrO0EnUHj8XGZ1EgBjO7AJAK1GEnzrXBfGO4xBA/dGctlSZ2PpBA/toEwSCDqXgOtTxpTjkmsFy8i9tqTDKLs5DgcK7upUaLngrADNbstd/NFOKhOs/1hlLkoSqUpsnoTRoqIPWXwHPIPXGPLMtSZetkoF2FS10yFOtFSY13MogUmTaVC8TobH5+06N X-Forefront-Antispam-Report: CIP:149.199.60.100;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(19580405001)(76176999)(19580395003)(11100500001)(6806005)(50466002)(50986999)(48376002)(87936001)(4001430100002)(86362001)(2950100001)(5003940100001)(5007970100001)(5008740100001)(92566002)(33646002)(106466001)(57986006)(36386004)(47776003)(16796002)(50226001)(36756003)(81156007)(5001770100001)(189998001)(63266004)(77096005)(229853001)(5001960100002)(76506005)(107886002)(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;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11HUB027;2:qdq2YsYulmUdY5Q5uk9lYrRrdrK3hsyl+5e5Kv8dhmMmnqRH278rPYuziu378gqjJpG1yQC4VSUA5q/4/wCdIsiryWlGWWm+dPt46ZJKZSqrJ958IZZNHmmwZBdd7V8N/vO/su3CY0cdFqMijgXfbUsBPoRzggro8gOqRnj4TT0=;3:3sqDTnyyWbFMyESVz+v4cyvcvU7X3pzs3tdU+cuZLoRZB+lsEavyohkPjPhHYcuqeRLl7ky95jM5z9j9mlj9bSyG9oTXQmmaBsniSDzxfuRiDJbLRbhTkVz/NRgrCkfTnc7Py1cDP/mgh8ohrAQD5wVR50gzyS4viFK5/e+QfP/9yfDW58WoKbb1HIu24dEfl+Z7xXEUMcIJWACxBV/U+j6C4z4B0JIg5sKLQmqTkr+qiRejnTQQ3jo539EOYVBeqCkQy4SMbuUglcEosF+5JQ==;25:ETaGox/Ws+iMr7Pat9A/cc804h+lz8Eh901xgYmU3x97r/vW2+p7rUPnOwqSvelFhHTvUJQdVMxIJdZh99qISgbJBWktnn/rxVZL1pE+tRKhlQTFhzd5jGGbQ60wdeDthretxFWxOJA4rcjhtmHMyl3zv7W3+EcV31MTk4xoWTdxHhDBl7ZIGb9F0VvkpoMCUizkRxiojW0ZSukPYne4NB+rFnXSdfBYCZQ8dyJfpdgwaOoh88apAs9FfyDcfj/Z3saXq0xc8GC/yz0JJF7lvw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501001);SRVR:BY2FFO11HUB027; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11HUB027;20:4kIh2fkSxO+C4Ywj/92myUfnDuAg0ZFz/jsA0YxW7AFvd6rfY48CgeCCow5e5yNbMcBzwg3qCWko46CJ8KnBMX31EEJLwrF1mwbI71NklOZQyfXO6iqmMncN6AB3kcPi2VAfavvdquXWPF1jR05AI1i1pDA77zeicVcmk5IpS74k58bHFF71R+dHR/3K9usuYzmOR/NIagv2Mq+R9oWBXzigQ8mX9C3I+9xZvH2+7vyldi3Aieg39w8/vZ2PQmFCIPhUvvZcnE9ZhecDTHDuQE00j5rJvWZd0UBnSV/++cIU6x18yLzGBwMW0KOe8o7eZ4jX5afbWABARaKBF2CUWuQlsxVWZcFxgAmYDs8rMugw7SXlHmhYMoSx0+bvinnO4Fi1TJlRHd1YcpwVhiQ1YjOzIduylM5TcKcYwmQXm3iTo/0hBI+1SXUBQEk9N++pcB5+7L3YOt6BznPGHfxHgr1GliyH7ibjV6UZE53UQ+MRkDLZwzsk7joNZN64S/UV;4:6Qd2r2J7bgJRW9me4l3nOCg1XR/n1QUDq2HElWrX208zUYktXB2XpF4bK8J7vx9t7FKlatqUKIB3uJouj8eS4dNHfkWwi1uW5UAJscpfR5JEcxgVf56qBT3BblyWPyNX0VDYGkC23pUu0RDn1zlG/gfOr319j9LUkfdcX/5sVsD4cwkoS26e9wYXdmk4l87/YAFELb+HmwS166LQDWkx8p2w9RCy+rrtqTGcrIOEe8gJatmtbafM0hdduMcg6lReMIwRAyFI/dxY+T4xAj5lT6KqJ38JpzC/hOMqU6pb53GxLjqbnBWHIbz5cYO7DHZt0X123H8ddkQCMAHDiIJugQqcQFB+kn9suHKLT9vBpkNeZJjrzMsvJGYttj6H7MGX X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(10201501046)(3002001);SRVR:BY2FFO11HUB027;BCL:0;PCL:0;RULEID:;SRVR:BY2FFO11HUB027; X-Forefront-PRVS: 0751474A44 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2FFO11HUB027;23:KtGMV001mRHUe1e2zexGH/w0tfH3EubnTQFH5akM?= =?us-ascii?Q?52EvfA5qA30Py1dv/Y+X8XDJPXMcpKDZ1Xg3gVVm+BhsvDYVP90VfOytI4TU?= =?us-ascii?Q?UqECYhm4Cewhc8dLlHKcDMHSLsC9IaWnScoKzmk7hCbks3nLF4RaKFn4/XnR?= =?us-ascii?Q?tpmivjR++iLJZOwG6a5IP2C/FeIy902yTL1diUyIlw+39oMCjBoHkCLuc3w+?= =?us-ascii?Q?LsoHQ1wwsePpQEhMNa7TspYjGIiLFQyUrTDBkMd/Jr7Zmgpw1zqGxKUDEGZ1?= =?us-ascii?Q?I3w3+o4SsNEVzEq2pR8LWaJzX9ycRlqDoBpCi56dGHstWTToZTtY+4qCAmuf?= =?us-ascii?Q?XtlwEznmKcj8Cy7gwwEBGgD33QlFYpumn3EUJwIarmHneqf1Bptka+uxwS5F?= =?us-ascii?Q?Wz+JxFhpqoODUul6mW1OTcO4qLXYVDTf7ZEvx7yT3lTIIK4qqMj3dLpYUne3?= =?us-ascii?Q?WgCM8/Xpu7PPnbAl/xJCkKIzGwE+r3jhWdLdidBW8yZG7GUX4v8hvuZJvWk2?= =?us-ascii?Q?3bSNSdHgCte9IYoeN+d8srNN0Jpcd5RZlkYIS7TkQAXn8ffFcUGzl/CldhME?= =?us-ascii?Q?BU2kZ/I10TzxUeKUvWVnykZ7UtGn2G/agXHUAzmDNz1+RuVmfukiD0lN0Ee5?= =?us-ascii?Q?g9a4TK/RrQso26z4KYJghfE5PYVzIYwEFxHOGRdg3Njydt/+kzvgfS71iqIC?= =?us-ascii?Q?P1uqpQjEK8B4Jr6ggfCERNAWWXgLhmz+kImmkkKCpFqhO920jqCYVe3EZEzh?= =?us-ascii?Q?AaqeB2KP2fidrbqJQqhva06lBoaJJBh0k70rpW6gcOe7Y20pid/xzSPCau/L?= =?us-ascii?Q?WBtm7tT1q9lQjIfZ9EXYoGIF5LA9rgmFnZxpfcEhkAWruW37x/scHzEaa6WN?= =?us-ascii?Q?IwH10D/xv1ATiaD3hic8nMHgYMwq2HZ4rVkFGG7Bih2HwC6/MONltBaPu9hv?= =?us-ascii?Q?rF9Vrp9qgTjNATwO9tdIqBnCkrVKXu8IHgTA5XL2I7m6cjM0+K7vKDRn61lC?= =?us-ascii?Q?Q4taBKQLK5SIsURu9g9abE9730tO3/a5DloYDkAKMVnIh524XWW8QbGg3B64?= =?us-ascii?Q?gIy363JxbLyeQDa/H2qBRwfRzJFcFlskMDWenAp8hkwrOKr+X7W6kHY/pnRq?= =?us-ascii?Q?8Ko4UW9PXBU=3D?= X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11HUB027;5:Rjczb3b2quW6rTNF2N5p/mYuYkjG/DPfGNqNqccKsUbq3b600bxPpJ8CU2nAq+R5u53sZbUea0Nqy7sWrJ39DTfqedW/S9bN4z9AM1mCmjI99+ZkkIZpqG5HSiJbTPAxdyInnZmzLEgi/0UgWKW+FA==;24:Lk+kKmBgI4xqvqU6KE+Wc/QxR7aFXOWtaDmADBbfrKMXDszQN1rcji8kq4gLmOOWLn2IqfE/KrvgsWaRaWFZ1sGhNy0Cq5LgfGSCDnssCJ4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2015 07:21:34.9776 (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-Length: 1501 Lines: 40 start_tx must start transmitting characters. Regardless of the state of the circular buffer, always enable the transmitter hardware. Signed-off-by: Soren Brinkmann --- drivers/tty/serial/xilinx_uartps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 2c98c357d9a0..df6778d17949 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -512,9 +512,6 @@ static void cdns_uart_start_tx(struct uart_port *port) { unsigned int status, numbytes = port->fifosize; - if (uart_circ_empty(&port->state->xmit) || uart_tx_stopped(port)) - return; - /* * Set the TX enable bit and clear the TX disable bit to enable the * transmitter. @@ -524,6 +521,9 @@ static void cdns_uart_start_tx(struct uart_port *port) status |= CDNS_UART_CR_TX_EN; writel(status, port->membase + CDNS_UART_CR_OFFSET); + if (uart_circ_empty(&port->state->xmit) || uart_tx_stopped(port)) + return; + while (numbytes-- && ((readl(port->membase + CDNS_UART_SR_OFFSET) & CDNS_UART_SR_TXFULL)) != CDNS_UART_SR_TXFULL) { /* Break if no more data available in the UART buffer */ -- 2.6.2.3.ga463a5b -- 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/