From: Johan Hovold <johan@kernel.org>
To: Florian Zumbiehl <florz@florz.de>
Cc: Johan Hovold <johan@kernel.org>, linux-usb@vger.kernel.org
Subject: usbserial: pl2303 tx xon/xoff flow control
Date: Fri, 18 May 2018 15:16:59 +0200 [thread overview]
Message-ID: <20180518131659.GL30172@localhost> (raw)
On Fri, May 18, 2018 at 06:06:53AM +0200, Florian Zumbiehl wrote:
> Hi,
>
> > > There are historical reasons for a lot of things, but that's not
> > > necessarily a reason to continue taking shortcuts.
> >
> > But on second thought, I think your approach here makes sense. If
> > usbserial ever gains generic IXON support, we'd just fall back to the
> > line-discipline implementation whenever the control characters do no
> > match.
>
> Which wouldn't preclude indicating lack of support while the support is
> lacking?! I mean, unless there is a good reason to pretend ...
Fixing this would be a bit involved. Consider the case where automatic
RTS/CTS cannot be used with XOR/XOFF (pl2303 or ftdi). Here we cannot
simply clear IXON when CRTSCTS is set, just because usbserial does not
support the line discipline IXON implementation.
So I'd rather leave things as is for now.
> (And if anything, the usb serial framework could use that indication to
> recognize the lack of support in a given driver for a given configuration,
> while with the current code there is no way to determine when a
> generic/software implementation would have to be enabled?!)
The line discipline implementation kicks in whenever IXON is set, and
can be used as a fallback for devices where automatic hardware and
software flow control cannot be enabled concurrently in hardware for
example.
While non-hardware assisted usb serial XON/XOFF is currently broken in
that transmission would not be halted, the line discipline would still
swallow any escape characters.
> > bools), and mention why you implemented things the way you did in the
> > commit message.
>
> Not sure what to mention there?! I mean, for the IXON/!IXANY/^S/^Q case, I
> implemented things the way I did because that makes the hardware behave the
> way that a serial interface should behave when IXON/!IXANY/^S/^Q is
> configured, obviously. For all other cases, I have no clue why the
> behaviour is the way it is, as I am just preserving existing behaviour that
> was decided by others before me and the reasons for which are unknown to
> me.
Then please put that in the commit message (i.e. that you do not know
how to change the control characters or enable IXANY so in that case we
fall back to the broken generic implementation).
Johan
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2018-05-18 13:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-18 13:16 Johan Hovold [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-21 8:45 usbserial: pl2303 tx xon/xoff flow control Johan Hovold
2018-05-18 13:09 Johan Hovold
2018-05-18 4:06 Florian Zumbiehl
2018-05-18 4:06 Florian Zumbiehl
2018-05-17 9:19 Johan Hovold
2018-05-17 8:29 Johan Hovold
2018-05-17 3:39 Florian Zumbiehl
2018-05-16 13:28 Johan Hovold
2018-05-14 3:15 Florian Zumbiehl
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=20180518131659.GL30172@localhost \
--to=johan@kernel.org \
--cc=florz@florz.de \
--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;
as well as URLs for NNTP newsgroup(s).