Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758154AbbEELMR (ORCPT ); Tue, 5 May 2015 07:12:17 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([146.101.78.143]:31877 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752181AbbEELMG convert rfc822-to-8bit (ORCPT ); Tue, 5 May 2015 07:12:06 -0400 Date: Tue, 5 May 2015 12:11:56 +0100 From: Dave P Martin To: Leo Yan Cc: Andrew Jackson , "linux-kernel@vger.kernel.org" , "linaro-kernel@lists.linaro.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH] serial/amba-pl011: fix minor bugs for pio mode Message-ID: <20150505111155.GA16868@e103592.cambridge.arm.com> References: <1430794825-14367-1-git-send-email-leo.yan@linaro.org> MIME-Version: 1.0 In-Reply-To: <1430794825-14367-1-git-send-email-leo.yan@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginalArrivalTime: 05 May 2015 11:11:57.0977 (UTC) FILETIME=[4D559090:01D08724] X-MC-Unique: EIkzHYTmSRm8D5OBZ-rSog-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1967 Lines: 51 Hi, On Tue, May 05, 2015 at 04:00:25AM +0100, Leo Yan wrote: > When use pio mode, there have two issues can be observed: > > - In the commit 2240197 "serial/amba-pl011: Leave the TX IRQ alone when > the UART is not open", it will skip clearing the TX IRQ across > pl011_shutdown() and pl011_startup(); So at the next time after the > uart port has been opened, there have chance for the function > pl011_tx_chars() will not be executed if the TX IRQ will not be > triggered; finally the console cannot output anymore. > > This is caused by the uart FIFO still keep data rather than > the threshold. So revert this patch to make sure every time open the > uart port, it will force to call function pl011_tx_chars(). > > - Sometimes will output the duplicate chars. Function pl011_tx_char() > will firstly send char and check if FIFO is full, and if the FIFO is > full it will return false; Caller function will consider the char > has _NOT_ been send out and resend it again, finally will send the > duplicate chars. So change to check FIFO is full or not, if full then > return false, otherwise send out char and return true. > > Signed-off-by: Leo Yan [...] Thanks for the fixes, but I already posted patches that probably fix the issues you are observing, And Greg took them into his tty-testing branch. Can you give them a try instead of your patches? Dave Martin (2): Revert "serial/amba-pl011: Leave the TX IRQ alone when the UART is not open" serial/amba-pl011: Refactor and simplify TX FIFO handling from git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing It would be good to have some feedback on them. Cheers ---Dave -- 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/