Linux USB
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Johan Hovold <johan@kernel.org>
Cc: "Marek Behún" <kabel@kernel.org>,
	linux-usb@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v2 6/7] USB: serial: ftdi_sio: Fix custom_divisor and c_*speed for ASYNC_SPD_CUST
Date: Wed, 14 Sep 2022 10:48:31 +0200	[thread overview]
Message-ID: <20220914084831.wboticmzy33guzam@pali> (raw)
In-Reply-To: <YyCayj7H/3My2amz@hovoldconsulting.com>

On Tuesday 13 September 2022 16:59:22 Johan Hovold wrote:
> On Thu, Aug 18, 2022 at 04:09:52PM +0200, Pali Rohár wrote:
> > On Sunday 24 July 2022 15:08:09 Johan Hovold wrote:
> > > On Sun, Jul 24, 2022 at 02:59:08PM +0200, Pali Rohár wrote:
> > > > On Sunday 24 July 2022 14:54:58 Johan Hovold wrote:
> > > > > On Sun, Jul 24, 2022 at 02:33:51PM +0200, Pali Rohár wrote:
> > > 
> > > > > > What is updated is the real baudrate in c_ispeed and c_ospeed
> > > > > > extensions.
> > > > > > 
> > > > > > It is really wrong? I thought that c_cflag should stay unchanged at
> > > > > > B38400 when ASYNC_SPD_CUST is used.
> > > > > 
> > > > > Yeah, cflags stay unchanged, but you shouldn't touch those fields when
> > > > > using the deprecated ASYNC_SPD_CUST hack.
> > > > 
> > > > Hm... Why? I thought that new extended fields (c_ispeed and c_ospeed)
> > > > should contain current real speed. What is the reason that c_*speed
> > > > fields should have 38400 when ASYNC_SPD_CUST hack is set?
> > > 
> > > Because we shouldn't go adding new features built around the deprecated
> > > ASYNC_SPD_CUST hack.
> > 
> > But this is not a new feature in the old deprecated hack. It for the
> > new interface.
> 
> I think I understand what you're getting at, but no. Let's not add more
> features built around ASYNC_SPD_CUST.
> 
> Johan

Seems that you did not understand the point. So I will try to explain it
again. This is not a new feature for _old_ ASYNC_SPD_CUST. This is the
fix for the _new_ TCGETS2 API, to ensure that driver will always returns
corrects values in c_*speed fields. If driver is not going to fix this
_new_ TCGETS2 API then there is _NO_ point to use this new API in
userspace and it is better to stick with the old ASYNC_SPD_CUST. And
this is the current userspace state. So based on your input, it is the
time to deprecate TCGETS2?

  reply	other threads:[~2022-09-14  8:48 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12 11:52 [PATCH v2 0/7] ftdi_sio driver improvements Marek Behún
2022-07-12 11:53 ` [PATCH v2 1/7] USB: serial: ftdi_sio: Fix divisor overflow Marek Behún
2022-07-24 12:02   ` Johan Hovold
2022-07-12 11:53 ` [PATCH v2 2/7] USB: serial: ftdi_sio: Add missing baud rate validation Marek Behún
2022-07-12 17:27   ` Rob Pearce
2022-07-12 22:24     ` Marek Behún
2022-07-12 11:53 ` [PATCH v2 3/7] USB: serial: ftdi_sio: Extract SIO divisor code to function Marek Behún
2022-07-24 12:06   ` Johan Hovold
2022-08-18 14:11     ` Pali Rohár
2022-09-13 14:49       ` Johan Hovold
2022-09-13 15:30         ` Pali Rohár
2022-09-13 15:44           ` Johan Hovold
2022-07-12 11:53 ` [PATCH v2 4/7] USB: serial: ftdi_sio: Do not reset baud rate to 9600 Baud on error Marek Behún
2022-07-24 12:20   ` Johan Hovold
2022-08-18 14:12     ` Pali Rohár
2022-09-13 14:54       ` Johan Hovold
2022-07-12 11:53 ` [PATCH v2 5/7] USB: serial: ftdi_sio: Fix baud rate rounding for ASYNC_SPD_CUST Marek Behún
2022-07-24 12:26   ` Johan Hovold
2022-07-12 11:53 ` [PATCH v2 6/7] USB: serial: ftdi_sio: Fix custom_divisor and c_*speed " Marek Behún
2022-07-24 12:28   ` Johan Hovold
2022-07-24 12:33     ` Pali Rohár
2022-07-24 12:54       ` Johan Hovold
2022-07-24 12:59         ` Pali Rohár
2022-07-24 13:08           ` Johan Hovold
2022-08-18 14:09             ` Pali Rohár
2022-09-13 14:59               ` Johan Hovold
2022-09-14  8:48                 ` Pali Rohár [this message]
2022-09-14  8:58                   ` Johan Hovold
2022-09-14  9:10                     ` Pali Rohár
2022-09-14  9:18                       ` Johan Hovold
2022-09-14  9:20                         ` Pali Rohár
2022-07-12 11:53 ` [PATCH v2 7/7] USB: serial: ftdi_sio: Fill c_*speed fields with real baud rate Marek Behún
2022-07-24 12:41   ` Johan Hovold
2022-08-18 14:17     ` Pali Rohár
2022-09-13 15:02       ` Johan Hovold
2022-09-13 15:24         ` Pali Rohár
2022-09-13 15:34           ` Johan Hovold

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=20220914084831.wboticmzy33guzam@pali \
    --to=pali@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=kabel@kernel.org \
    --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