Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030311AbbKDAWS (ORCPT ); Tue, 3 Nov 2015 19:22:18 -0500 Received: from mail-bn1on0094.outbound.protection.outlook.com ([157.56.110.94]:20064 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030200AbbKDAVM (ORCPT ); Tue, 3 Nov 2015 19:21:12 -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 0/9] tty: xuartps: Fix lock ups Date: Tue, 3 Nov 2015 16:20:41 -0800 Message-ID: <1446596450-20918-1-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 2.6.2.3.ga463a5b MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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;BN1AFFO11FD029;1:ikJH++/b7M8WcMMJaVOkL4cohRCMn7At8LbFNs34uZU/L9CeJLwIPUuiITlUzR60X3bEwCIy61+6/WvSuSBxKMcG2ZbMfoGq1gLC+zg9GnQLtgsn17A8PEpaPrOCqc/u6UjvZhLglP6w7lyn/cLlVEjyS04L7MtAKdxIa0VH9Rkil3mxsx5PcXKR1ZmcJuZxArnXakYzN7/V2G9ojX1MVBz8gvl9KJm96ehj7dDCO4N67i0SB+iGI3hS5uQOEwEsFt2CSqe57U0+a+0n2la5yk5xS9m8gCmaNzrxWIJISYdjfLa1BSwic+C+AFSVDjni7KplwMEyOcAHjb0P6Eyv0K/T4FG+dEj2tKjkZfy/yg4= X-Forefront-Antispam-Report: CIP:149.199.60.100;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(229853001)(5008740100001)(16796002)(50226001)(4001430100002)(5007970100001)(50466002)(86362001)(87936001)(189998001)(6806005)(5001960100002)(107886002)(77096005)(36756003)(5820100001)(33646002)(5001770100001)(36386004)(76506005)(57986006)(63266004)(106466001)(81156007)(50986999)(92566002)(47776003)(23676002)(107986001)(5001870100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1AFFO11HUB036;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11HUB036;2:DYxP8B1JQKSM9ykKQugEkt7zcHm3whOzUxoDFOFEb1YBn1C0gUM5DW+JWDeX8OkPbhoLn3gck3buJw3xZQ6hkXg/LoE05QBX2P0k1eti5EheyOhZxZTIyABDjpQjo1fxHzzS9CN3hB8nCISPTRGsmL6PUI5DA16sw8rBwKK96Gg=;3:dLgfPJ08Gt82gVZWp1564LGLa5tG2If7gXMDTIFpzRF70LuQLM6QjWojuedqmPTfsPvNZFZoENln/JH4W6VWO0JHW6rib+9ckOw/6WQ4ntSi3oo7sxv9qlUVJa2241H/oYCYy5vl2ZcbBtkoLoshb7y2+HoZuoKmsp5FXv8UQq7WnFyNbNFAcdGQxTaS6UqLe/EKVl/2Lk4aguWw4tr8ThdDRexIpUjl4cMT0VEylIqlNqEDEs2ab1qrj924KGMYtbKFuEPytBevB5NPBdRkrw==;25:WPsOvrsNgupdA01TIU1aUsq4Kvme61J0ioiojuTxdCc7jEIoQQwJS2wAYQbXbVjQNjtP5PRQxX873Pm92Hm7CIAwwr6isZNyL2knwKaT8WCGZQhShstQYmgDbOuvc3nu3hsCRcJLobq0l6WWzOp1nifqfBK51TfOqQZtc/mqlaoEyaEWnszRr6zLjD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X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001);SRVR:BN1AFFO11HUB036;BCL:0;PCL:0;RULEID:;SRVR:BN1AFFO11HUB036; X-Forefront-PRVS: 0750463DC9 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjFBRkZPMTFIVUIwMzY7MjM6VU81NndCdXBQWlhCM3ZMYXNxOEZnVWlF?= =?utf-8?B?dHlnMlg2ZWx3YVZYL25pNkw1dXo1aWhNN1RLeGpzd1A3V2NWSmcxbGdESkQ1?= =?utf-8?B?a3UwR2lIaDN3TVNXNW8zV0pkRTl6Zml4eldjSEs3YUNydm85cm85M1VJTzhw?= =?utf-8?B?OXhGd2lId3d6NkNwUzA1MS9JdWlDMTE5bkprZUVRcHM5MTRwYWJMcDNJM3BH?= =?utf-8?B?STd4ZVlFRjZQRk1vNzZjdldIM3plUUN0ZDRMaWx2dzlMa3o4MkhjOFQzYzhx?= =?utf-8?B?Ujc5NDBOeXJlR1hiQVBOUks4QU1XTnMvLzdZN2ptb0pITnRKeXdpbkFtbFN5?= =?utf-8?B?dEVRVm9CaTVzQ3VYMzN1N1FISCtRbW5kNGxTTE51Vjdhb0ZuSjUrYUNNRVdC?= =?utf-8?B?aS9TRjZNYk9GdlhSM3NSN0NIVGtKS3FvMjhtZ1pJcXBhTm9iR3NReFZzbkVr?= =?utf-8?B?T2prUXlzWTRoRkZ4bFhodzdYdmN3RHptcWdsQnlyMFAxN0ZlOTNyUkswdGdM?= =?utf-8?B?alRyRlZJSjhzMzN1MnNwaGpMcXZLMjh5SDVyZUdBMERoOE9LNnNRcllCTllu?= =?utf-8?B?ODBtNUhaeWF2emlmU2NWVkNnTjh1ZGJyN1RKTVM0VTlKSHd2M0VVR2tBNUJr?= =?utf-8?B?NXV2WU83OWVmdW1hd1kxcm0zL1R5UG5wcnNnL0F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R+g1M50kicHugwk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2015 00:21:09.8577 (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: BN1AFFO11HUB036 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1505 Lines: 39 Hi, I recently found my system locking up under some conditions. I dug through the code a bit and the result is this collections of various changes. Some of it may not be required and has just been created out of half-baked theories and re-reading the documentation. The actual failing scenarios seem to be: - RX IRQ conditions are handled while the receiver is disabled, leaving the driver in an infinite loop - console_put_char seems to be interrupted by uart_shutdown disabling the transmitter while/just before printing I.e. overall I tried to serialize all operations using the port lock to avoid such interaction. Sören Sören Brinkmann (9): tty: xuartps: Beautify read-modify writes tty: xuartps: Use spinlock to serialize HW access tty: xuartps: Always enable transmitter in start_tx tty: xuartps: Clear interrupt status register in shutdown tty: xuartps: Improve startup function tty: xuartps: Keep lock for whole ISR tty: xuartps: Acquire port lock for shutdown tty: xuartps: Move RX path into helper function tty: xuartps: Only handle RX IRQs when RX is enabled drivers/tty/serial/xilinx_uartps.c | 129 ++++++++++++++++++++++--------------- 1 file changed, 78 insertions(+), 51 deletions(-) -- 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/