From: Peter Hunt <peter.hunt@opengear.com>
To: loic.poulain@oss.qualcomm.com
Cc: Daniele Palmas <dnlplm@gmail.com>,
ryazanov.s.a@gmail.com, johannes@sipsolutions.net,
mani@kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, mhi@lists.linux.dev,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v8 1/2] net: wwan: core: propagate modem control signals to port drivers
Date: Sat, 10 Oct 2026 11:15:31 -0600 [thread overview]
Message-ID: <20261010171531.1659006-1-peter.hunt@opengear.com> (raw)
In-Reply-To: <20261009001714.1078580-1-peter.hunt@opengear.com>
Hi Loic,
A follow-up to my reply, as I overstated one point and would rather ask
than argue on both. (Adding Daniele, as the first question touches his
recent QCDM ioctl work.)
On the AT-only check: I said QCDM has no DTR semantics, but I don't
actually know that. I've only verified DTR/RTS on the AT (DUN) port of a
Sierra EM9291. I don't know whether the DIAG channel behind QCDM ports
honours DTR on these modems, or whether libqcdm relies on it now that
QCDM ports have the TIOCM ioctls. So I see two options:
a) Keep it AT-only in all four places (open, close, removal, ioctl).
b) Call ->dtr_rts for any port with the TIOCM ioctls (AT and QCDM)
whenever the driver implements it, again in all four places, and
leave it to the driver to ignore ports where it doesn't apply.
Which would you prefer? If you or Daniele know that QCDM/DIAG ports
care about DTR, that would settle it for b).
On the locking: I agree the data_lock/ops_lock split is awkward, and
it's this series that made the two locks interact. Most of the races
found in earlier versions came from it. My only concern is the blocking
write case I mentioned, so the options as I see them are:
a) Use only ops_lock, with the whole ioctl handler under a guard and
mutex_lock_interruptible() so a waiting ioctl can be interrupted,
accepting the wait behind a blocking write on rpmsg ports.
b) Keep data_lock for the termios/TIOCM state and take ops_lock,
interruptibly, only around the ->dtr_rts call. v9 already limits
that to when DTR or RTS actually changes.
I'm happy to do either in v9, which do you prefer?
Thanks,
Peter
next prev parent reply other threads:[~2026-10-10 17:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 18:22 [PATCH net-next v8 0/2] net: wwan: support DTR/RTS on AT ports via MHI IP_CTRL Peter Hunt
2026-10-07 18:22 ` [PATCH net-next v8 1/2] net: wwan: core: propagate modem control signals to port drivers Peter Hunt
2026-10-08 15:19 ` Loic Poulain
2026-10-09 0:17 ` Peter Hunt
2026-10-10 17:15 ` Peter Hunt [this message]
2026-10-07 18:22 ` [PATCH net-next v8 2/2] net: wwan: mhi_wwan_ctrl: drive DTR/RTS via the IP_CTRL channel Peter Hunt
2026-10-08 15:30 ` Loic Poulain
2026-10-09 0:17 ` Peter Hunt
2026-10-11 19:10 ` netdev-bot+sashiko
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=20261010171531.1659006-1-peter.hunt@opengear.com \
--to=peter.hunt@opengear.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dnlplm@gmail.com \
--cc=edumazet@google.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=mani@kernel.org \
--cc=mhi@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ryazanov.s.a@gmail.com \
/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