From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932404AbbCFJZJ (ORCPT ); Fri, 6 Mar 2015 04:25:09 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:21005 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752009AbbCFJZC (ORCPT ); Fri, 6 Mar 2015 04:25:02 -0500 Message-ID: <54F96F5B.2090601@huawei.com> Date: Fri, 6 Mar 2015 17:11:55 +0800 From: Zhang Zhen User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: , CC: , , , , , , Subject: [RFC] With 8250 Designware UART, if writes to the LCR failed the kernel will hung up Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.68.57] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.54F96F6B.004B,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 9051cb87d0172501a73bc62a18ec162c Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I'm testing 4.0-rc1 kernel on my board with 8250 Designware UART.(ARM Cortex-a15 single core). I found if serial is busy and writes to the LCR failed after tried 1000 times. The kernel will hung up. The system boot success after changed from: 95 static void dw8250_serial_out(struct uart_port *p, int offset, int value) 96 { 97 struct dw8250_data *d = p->private_data; 98 ... ... 112 writeb(value, p->membase + (UART_LCR << p->regshift)); 113 } 114 dev_err(p->dev, "Couldn't set LCR to %d\n", value); 115 } 116 } to: 95 static void dw8250_serial_out(struct uart_port *p, int offset, int value) 96 { 97 struct dw8250_data *d = p->private_data; 98 ... ... 112 writeb(value, p->membase + (UART_LCR << p->regshift)); 113 } 114 dev_info(p->dev, "Couldn't set LCR to %d\n", value); //changed here 115 } 116 } The reason is serial8250_console_write can't get port->lock because serial8250_do_set_termios has got port->lock. So i think here we should change from dev_err to dev_info ? Any suggestions are welcome. Best regards!