Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755494AbZFIPBZ (ORCPT ); Tue, 9 Jun 2009 11:01:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751427AbZFIPBQ (ORCPT ); Tue, 9 Jun 2009 11:01:16 -0400 Received: from earthlight.etchedpixels.co.uk ([81.2.110.250]:53998 "EHLO www.etchedpixels.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751885AbZFIPBQ (ORCPT ); Tue, 9 Jun 2009 11:01:16 -0400 Date: Tue, 9 Jun 2009 16:01:32 +0100 From: Alan Cox To: "Oskar Schirmer" Cc: Sascha Hauer , linux-kernel@vger.kernel.org, Fabian Godehardt , Oskar Schirmer Subject: Re: [PATCH 8/8] imx: serial: add IrDA support to serial driver Message-ID: <20090609160132.31265ffc@lxorguk.ukuu.org.uk> In-Reply-To: <1244555211-15618-9-git-send-email-os@emlix.com> References: <1244555211-15618-1-git-send-email-os@emlix.com> <1244555211-15618-2-git-send-email-os@emlix.com> <1244555211-15618-3-git-send-email-os@emlix.com> <1244555211-15618-4-git-send-email-os@emlix.com> <1244555211-15618-5-git-send-email-os@emlix.com> <1244555211-15618-6-git-send-email-os@emlix.com> <1244555211-15618-7-git-send-email-os@emlix.com> <1244555211-15618-8-git-send-email-os@emlix.com> <1244555211-15618-9-git-send-email-os@emlix.com> X-Mailer: Claws Mail 3.7.0 (GTK+ 2.14.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1019 Lines: 32 > +#ifdef CONFIG_IRDA > +#define USE_IRDA(sport) ((sport)->use_irda) > +#else > +#define USE_IRDA(sport) (0) > +#endif > + You define this but only use it in about half the cases ? > +#ifdef CONFIG_IRDA > + if (sport->use_irda) { > + /* half duplex - wait for end of transmission */ > + int n = 256; Otherwise this series looks sound. While you are fiddling with the baud rate the driver really should work out the resulting actual baud rate and call tty_encode_baud_rate(tty, in-rate, out-rate); that will report back the resulting rate and knows how to encode all the termios fields as well as reporting close values to the requested speed as the speed requested (eg if you ask for B38400 and it tries to encode 38215 or similar it will encode back B38400) Alan -- 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/