mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rocker Dude <life.does.rock@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Serial Flow Control
Date: Tue, 17 Mar 2009 23:31:20 +0530	[thread overview]
Message-ID: <bc9165390903171101s454838bci158ee1c32134af74@mail.gmail.com> (raw)
In-Reply-To: <20090317085714.54bcd51c@lxorguk.ukuu.org.uk>

Hi Alan,

Thank you very much for the prompt reply!

I debugged out the problem though. I will describe it, even if it
seems childish!

I was using the flow control on the console serial. As a result, any
data being sent to the powerpc from the x86 was also being read by the
console driver, and being responded to. As a result, many of times, my
actual serial read application would lose bytes and sit idle. I
changed the console port and observed data validity perfectly.

However, I have some few queires.

1. To prove flow control, I sleep for 5 seconds after every read.
Although my logic says that both the xmitter and the reciever in this
case should complete the process within a few time difference, I find
that my xmitter exits out after sending the chunk; while my receiver
keeps on receiving it for a few more time. And this time is almost a
minute or something. I did find out the xmitter 4K page buffers, but
it was too misleading for me to believe this!

Alan, I will once again go through the discipline drivers more before
I shoot may doubts!

Thanx a lot for the help and replies,

Thanx!
Sundar

On Tue, Mar 17, 2009 at 2:27 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Tue, 17 Mar 2009 11:04:36 +0530
> Rocker Dude <life.does.rock@gmail.com> wrote:
>
>> Hi All,
>>
>> I am using a powerpc8548e custom hardware and testing flow control on
>> it. I have cross-wired the RTS/CTS of the board with my host terminal.
>> I find that when I am reading from the powerpc, it does not change the
>> CTS signal when it is running out of buffers and hence it is dropping
>> bytes.
>>
>> I referred to something similar at http://lkml.org/lkml/2007/7/26/46.
>>
>> Can anyone please tell me if this flow control needs to be done by the SW?
>
> Flow control needs to be enabled by the user space software (if not
> enabled already), managed by the line discipline and implemented by the
> device driver (or automatically in hardware in some cases)
>
> Basically; App "set CRTSCTS"
> Ldisc: buffers full/not full logic for throttling
> Driver: throttling events -> flow control, honour flow on write
>

      reply	other threads:[~2009-03-17 18:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bc9165390903160912u79693a1dve975f559bfab103e@mail.gmail.com>
     [not found] ` <bc9165390903162233o48e02d94v6bb216e5d68d9e77@mail.gmail.com>
2009-03-17  5:34   ` Rocker Dude
2009-03-17  8:57     ` Alan Cox
2009-03-17 18:01       ` Rocker Dude [this message]

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=bc9165390903171101s454838bci158ee1c32134af74@mail.gmail.com \
    --to=life.does.rock@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®