From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759127AbZEMAgu (ORCPT ); Tue, 12 May 2009 20:36:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758310AbZEMAfq (ORCPT ); Tue, 12 May 2009 20:35:46 -0400 Received: from plexity.net ([206.123.115.38]:35621 "EHLO plexity.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756809AbZEMAfo (ORCPT ); Tue, 12 May 2009 20:35:44 -0400 Date: Wed, 13 May 2009 00:34:51 +0000 From: Deepak Saxena To: Linus Torvalds Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Alan Cox Subject: Re: [PATCH] 8250: Don't restore NS16550 mode when console suspend is disabled Message-ID: <20090513003451.GB28422@plexity.net> Reply-To: dsaxena@plexity.net References: <20090512210015.GA25540@plexity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Plexity, LLC User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On May 12 2009, at 15:00, Linus Torvalds was caught saying: > > Hmm. I already applied this, but then after looking closer, I undid that. > Why? It looks buggy: > > > - if (up->capabilities & UART_NATSEMI) { > > + if ((up->capabilities & UART_NATSEMI) && > > + (!uart_console(&up->port) && console_suspend_enabled)) { > > unsigned char tmp; > > Isn't that second test wrong? Should it not be > > if ((up->capabilities & UART_NATSEMI) && > (console_suspend_enabled || !uart_console(&up->port)) { > > instead? Yep, thinko on my end. > /* > * Suspend the uart port unless it's a console. > * > * But suspend even consoles if "console_suspend_enabled" > * is set. > */ > static inline int do_suspend_uart(struct uart_port *port) > { > return console_suspend_enabled || !uart_console(port); > } > > and then make all these things (including the _existing_ cases in > uart_suspend_port() use that helper function, rather than writing it out. Sounds good. Alan? ~Deepak -- In the end, they will not say, "those were dark times," they will ask "why were their poets silent?" - Bertold Brecht