All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Organov <sorganov@gmail.com>
To: linux-serial@vger.kernel.org
Cc: Petr Slansky <slansky@gmail.com>
Subject: Re: Serial raw mode. Bug in serial driver in Linux kernel? Is documentation correct?
Date: Wed, 12 Aug 2020 22:09:30 +0300	[thread overview]
Message-ID: <rh1epa$guv$1@ciao.gmane.io> (raw)
In-Reply-To: CA+ww9hwAzFHCYhkQUev2_VBN=8gMsxBcnExG53_gCkC6++-ScA@mail.gmail.com

Petr Slansky <slansky@gmail.com> writes:

> Hi Linux-Serial,
>
> I was fixing "pirate-loader" for BusPirate device, firmware loader utility.
> The design followed documentation for serial communication for "row"
> serial mode but it was not working. I modified flags and utility works
> now but my modification doesn't match documentation. That is strange
> from my point of view. Have I discovered a bug in the kernel? Could
> you check??
>
> Details are here, second comment, the long one:
> https://github.com/BusPirate/Bus_Pirate/issues/140
>
> This is the core of my fix, I changed CSIZE flag:
>
>         cfmakeraw(&g_new_tio);
>
> -       g_new_tio.c_cflag |=  (CS8 | CLOCAL | CREAD);
> -       g_new_tio.c_cflag &= ~(PARENB | CSTOPB | CSIZE);

You got a bug right here. Just swap these 2 lines. You should first
clear CSIZE bits, then set CS8 size.

-- Sergey Organov


  reply	other threads:[~2020-08-12 19:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12 16:51 Serial raw mode. Bug in serial driver in Linux kernel? Is documentation correct? Petr Slansky
2020-08-12 19:09 ` Sergey Organov [this message]
2020-08-12 19:14 ` Sergey Organov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='rh1epa$guv$1@ciao.gmane.io' \
    --to=sorganov@gmail.com \
    --cc=linux-serial@vger.kernel.org \
    --cc=slansky@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.