public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: "Filip Žaludek" <filip.zaludek@oracle.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, Konrad Wilk <konrad.wilk@oracle.com>
Subject: Re: [External] : Re: data throttling under load when serial to usb adapter is used
Date: Mon, 20 Dec 2021 15:04:56 +0100	[thread overview]
Message-ID: <YcCNiH0fH6J5GZSe@hovoldconsulting.com> (raw)
In-Reply-To: <67ff29fb-98cd-1835-ee6e-4eba67ff269c@oracle.com>

On Mon, Dec 20, 2021 at 11:19:03AM +0100, Filip Žaludek wrote:

>   Yes, you are right! Such gadget hardware is without hw flow control.
>   I am using serial line only to capture console logs. I've tested
>   both commands also with sw flow control ixon, ixoff with similar
>   results.

The FTDI and PL2303 chips typically support automatic hardware flow
control, but you need to make sure the signals are wired up.

>   Hopefully somebody sitting on scarce big iron with both usb port and
>   serial port with proper hw flow control from this list gets
>   attracted to kindly re-test.

No need to retest anything. Just enable hardware flow control otherwise
there cannot be any guarantees.

> Interesting part for me is that only serial to usb direction is
> failing..

But in this case, it looks like your test script is just broken. You
kill the consumer before it has read all the data:

	uart_send__cat()
	{
	    cat < "$1" > /tmp/d16 &
	    RX_PID=$!
	    cat /tmp/d16_0 > "$2"
	    stty sane                           # better results
	    kill $RX_PID
	    wait $RX_PID
	    uart_info "$3"
	}

	...

	stty -F /dev/$SER 115200 raw -echo
	stty -F /dev/$USB 115200 raw -echo

	while true
	do
	    uart_send__cat /dev/$SER /dev/$USB "u->s"
	    uart_send__cat /dev/$USB /dev/$SER "s->u"
	done

Johan

      parent reply	other threads:[~2021-12-20 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20  8:11 data throttling under load when serial to usb adapter is used Filip Žaludek
2021-12-20  8:28 ` Greg KH
2021-12-20 10:19   ` [External] : " Filip Žaludek
2021-12-20 10:45     ` Greg KH
2021-12-20 14:04     ` Johan Hovold [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=YcCNiH0fH6J5GZSe@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=filip.zaludek@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-usb@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