mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] Bluetooth: rfcomm: fix modem control handling
Date: Thu, 30 Oct 2025 14:27:07 +0100	[thread overview]
Message-ID: <aQNnq02qzD3rPh2b@hovoldconsulting.com> (raw)
In-Reply-To: <9778a6a1-ffb0-4972-a2e7-893128a51e52@molgen.mpg.de>

On Wed, Oct 29, 2025 at 09:15:28PM +0100, Paul Menzel wrote:

> Am 23.10.25 um 14:05 schrieb Johan Hovold:
> > The RFCOMM driver confuses the local and remote modem control signals,
> > which specifically means that the reported DTR and RTS state will
> > instead reflect the remote end (i.e. DSR and CTS).
> > 
> > This issue dates back to the original driver (and a follow-on update)
> > merged in 2002, which resulted in a non-standard implementation of
> > TIOCMSET that allowed controlling also the TS07.10 IC and DV signals by
> > mapping them to the RI and DCD input flags, while TIOCMGET failed to
> > return the actual state of DTR and RTS.
> > 
> > Note that the bogus control of input signals in tiocmset() is just
> > dead code as those flags will have been masked out by the tty layer
> > since 2003.
> > 
> > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> 
> There is a linux-history git archive [1], if somebody wants dig further. 
> But not relevant for the tag used by the stable folks.

Yeah, that's tree I use.

> Is there any way to test your change, to read DTR and RTS state?

This can be tested using the TIOCMGET and TIOCMSET (or
TIOCMBIS/TIOCMBIC) ioctls. I use a custom c application, and I'm not
aware of any particular application you can you use for testing if
that's what you were after.

Johan

      reply	other threads:[~2025-10-30 13:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-23 12:05 Johan Hovold
2025-10-23 21:40 ` patchwork-bot+bluetooth
2025-10-29 20:15 ` Paul Menzel
2025-10-30 13:27   ` 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=aQNnq02qzD3rPh2b@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=stable@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®