Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030268AbbKDAVk (ORCPT ); Tue, 3 Nov 2015 19:21:40 -0500 Received: from mail-by2on0071.outbound.protection.outlook.com ([207.46.100.71]:36779 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030207AbbKDAVO (ORCPT ); Tue, 3 Nov 2015 19:21:14 -0500 Authentication-Results: spf=pass (sender IP is 149.199.60.83) 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 3/9] tty: xuartps: Always enable transmitter in start_tx Date: Tue, 3 Nov 2015 16:20:44 -0800 Message-ID: <1446596450-20918-4-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 2.6.2.3.ga463a5b In-Reply-To: <1446596450-20918-1-git-send-email-soren.brinkmann@xilinx.com> References: <1446596450-20918-1-git-send-email-soren.brinkmann@xilinx.com> X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21918.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD051;1:OvJFkCmz56PIr1J7Lf4L9yVIyMx36Uh0eQFp1VbLLHktr6QIQnC7AuuDkWMchKpskw4G9KnSPXzPKge7aYXgGunosv0A1wF4WZxPwnAT7Fy39cEPslJsr2zQUhJIPhh5sK/Zv2qTCrfSVV9bw8MUWxw6FZ8TZ1l6j5HM/+ffV9BrNh8tUsqnz5k6tDqWHb1Lw+b9IFbmd6qgBzXO7yGqXM3pmH8nzoBz3P3ovWHBzboYnGCggiLXC4vC5ueVIjY1DzRfzYJykAzvYnQQBacWdYd65wO0JEBLBGmIsrdbztn/IQZb75CchgEogfiirfWknX96kzv/BnXsOP+fLx2JX7aI5TTH3naEJSWaZRsvG9A= X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(63266004)(19580395003)(36756003)(5001960100002)(107886002)(19580405001)(189998001)(48376002)(2950100001)(47776003)(57986006)(33646002)(50226001)(16796002)(76176999)(50466002)(50986999)(76506005)(77096005)(106466001)(5008740100001)(5007970100001)(92566002)(36386004)(229853001)(4001430100002)(5001770100001)(5003940100001)(81156007)(575784001)(87936001)(86362001)(6806005)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1BFFO11HUB036;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;PTR:unknown-60-83.xilinx.com;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11HUB036;2:AeO+KZ7zeZBMkwzUI0y5wIJZiFnoN/1eTIFXOA0jXTUeQh2mEbFV9bWbj7l5UdaVr12Ezv3WAWgH0TwNqrQ8lJprmlIp3ix12CPSwhTpUUywUXmYpKi4K3pvDU2B0fdzfaxvt8Fiie5Xqasv5kFvsT690Ot3F6d+6lUCroxvC6A=;3:cE6ybGauQrkUcyWfWva+jvOYJk7WvbjxESk0+EXRKQ5tSK1flakFiZhemI0EHH94p/yTCKwFoLHToegZm6N/99CdbO4yAWz6yru6gKJzpUPI1vQLbQ6yF8QcEu7foroWx7cpscaJDd5ppOQB7TaxIddz8EO/LFaGL8DozHgaljyc6tZNF7mDM9iEtXovaUKKEYSJV48RWvDg6u3sWziF4FozsqSFD34oBEA2URozGe73EphOxm77ZvAuO++TPv+Bxh7Y5V3YtStMiZGOWNVKtA==;25:lShgaB4iSL5Dq8Zuce+c9v9W5AxbVpeOgKDiY3lCymOLmDPz9abuA2e78CXIy3gdSdYBtL5k1Edze24RkCUrmtppEtTMMASKvxNWuE80IvzF9YM948n+/HHH/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iea27kLWS9AE2ISX6LjVI72uBf9rKx7YEJOfPSMYmdp/do+Pr9kgz2mNOnUbiIpWcMSVm3dk2BgCt 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)(8121501046)(5005006)(10201501046)(3002001);SRVR:BN1BFFO11HUB036;BCL:0;PCL:0;RULEID:;SRVR:BN1BFFO11HUB036; X-Forefront-PRVS: 0750463DC9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1BFFO11HUB036;23:1jB4YZ5QZ2LQKYhI2w7deqdJPob8ZI5VJD8IEOC?= =?us-ascii?Q?7UGE9hi31gzA1hRV+S4wQ1aRivRTvtmIrbP/nvOL3qpZWY02jeEKcM2k3BFq?= =?us-ascii?Q?BG+kXEJhbI7hk7Nms0CCsHVHEU37NASowgooxjgZ4GR0GEbYDI38gr6UbFcb?= =?us-ascii?Q?TFLk3Y+uI4YfV7fn9uIn5jW7l6QD/H/OFi7z7QJLMwrJ8N/zBvagp5jFx2Pf?= =?us-ascii?Q?vbvoNWuWuNsQzV11yCMvG7vNRn62fleOY7efSQQenjERfAcZ4c76smZ90q1j?= =?us-ascii?Q?jTX6my/OjBP8TF9zVesfsXXUB/tbDJS8c1RoGgRC8UGtbcYhSAhCnrWMUNZY?= =?us-ascii?Q?9NVPvQ3Gkw4zj22XHpahRtQUm5lDyHgGnHwOiAyKdbs3TWm/0v+e1DqtcMjy?= =?us-ascii?Q?DTnLP2KDTUKk9F3vPXmCl+zfx0mUks1jdnSZRKrj0hlIYaMNIba171VKqkrh?= =?us-ascii?Q?mKribf+H453OAQK2kkWwACHXCRT4tnlzW4J/CtoHO23oaBPet994ZsVkr2e2?= =?us-ascii?Q?v4pr6aUQkvPjngApwqttZQVUMdYqX1NG8EWvM27Lc0dMNIGJPLwi7PS2p9bq?= =?us-ascii?Q?VlSs6MQmF98ecs9wj5vlOVvZZEiLGOP/PkehgnQi9XqcDWWQojQAgGfyvVsD?= =?us-ascii?Q?RkBV37snlbBWkgU6QXITxbfcUEl8lbul7aHxQyZJ0fuD0cj3hbAA44gH3ji+?= =?us-ascii?Q?JTJW/AnlyELlBViMjxR2Sw+UhCdkMWQAfMyXtkgh3af8/VhdGeYOJoT6avha?= =?us-ascii?Q?Fcx7r9ZvUmkN7GHXICBLFmB8dahIGaIm/5AMikALOTmFVD26OTLt6IR+nQ/R?= =?us-ascii?Q?HCl1TbSXJOsxSgtLZLDuFBHpFg3jwSRLkZb8g5VO2LHHaUu0J9zHyRBNSvWh?= =?us-ascii?Q?orlGqSchjh24cYQ5hvxUs2DrkfcI2AyjJ/1bZ3DBAj7wLfSCrdCVk+AWy6qL?= =?us-ascii?Q?fnRDZTIm6BwJZN+wbsxSkDWj0LDV7nRVscu3hncCdsAm8R9ohS5GcBIGBVfB?= =?us-ascii?Q?h9whE6tYVrqkhkKQKSZ6ph9OQ11x9LOou62vp40dBXHkPhyYMyfKPqHveI3I?= =?us-ascii?Q?n+c45dYu5uef3ai/ht9BuPf5wpqrY?= X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11HUB036;5:LpQygTgpITTxc4xDCRdHbWaMWslREAcOh+Uc84/xutQ6+U14vTBxLiNRI8Ujx0kWtGc7DJ36WZ+Z6ve5pn4Ocs3/qelzd7hQMD9PZw2WvtfGQUnoIJcqR5oth1Z7M5p7iAXar94jtRP6yeuemz3z4w==;24:X16ls3y2PIajad0InhJTjMoUNnT9HFhMSjUAqBfID5G1A1Xz3qlQ+6r9QnKsPyPvt2rWqfUiVTc9OyEgZIbpfZ+aBzMp0/FAQDMK3LnwO58= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2015 00:21:10.9947 (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.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1BFFO11HUB036 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 dc1987f3dc0a..5edd1efca015 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/