This is the mail archive of the
mailing list for the eCos project.
Re: Baud rate range validation in serial devices
- From: "Alexander Aganichev" <aaganichev at gmail dot com>
- To: ecos-patches at ecos dot sourceware dot org
- Date: Mon, 9 Jul 2007 07:48:17 +0400
- Subject: Re: Baud rate range validation in serial devices
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LnNrw/GrQ54vFVDlCeu3oILBCS/eDBHRM7yVJ60xYFO6HGY0+Jm/f5MMb9D0zCE+WIgMhneN+0UHu6SH7WsUedWofLJhyREXasTwaOte82tcl8YPcPMuX2dzBTB9YZBtcGLtxOBMH8dxDqkDIjwRkRtWjCORPEYBTd7fu9GE9KM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=aniUWe8Tkg5nipiFVrH0GGfymZBmFcKGrG+w7N7UUucq6c2TvYNgUhhe7EBLjsXwAMm9X88FRCrFyhwxwOp/aRLEK0LBQbuXp05+FGMbFfW/zM2pzCxpZxdouwduIOG7TgMGnI5REe8VnAln5t5pmH63fyFtypzwWdgXVybh20M=
- References: <email@example.com> <firstname.lastname@example.org> <20070708191200.GI24630@lunn.ch>
On 7/8/07, Andrew Lunn <email@example.com> wrote:
On Mon, Jun 25, 2007 at 05:00:51PM +0400, Alexander Aganichev wrote:
> Sorry, I'm an idiot :( Not tested patch well and put reverse
> conditions everywhere.
> Here is corrected patch.
> On 6/25/07, Alexander Aganichev <firstname.lastname@example.org> wrote:
>> Here is a small patch applied to the lot's of serial device drivers
>> files that validates that baud rate is within the defined table. The
>> intention of the patch is to make easier to add support for the higher
>> speeds on platforms where that could be required without need to
>> update all other platforms every time.
Could you expand on that a little bit. What is there in the current
code which does not allow this? Range checking is nice, but i don't
see how it allows you to add additional baud rates.
The patch allowing it by adding baud rate range validation :-) Just
because of if you modify top level to allow faster baudrates you make
think all developers that these baud rates are supported or at least
properly handled, but it is not. With the validation code they will
get proper error code, so at application level there should be no
condition compiled code for different platforms.