From: Peter Hunt <peter.hunt@opengear.com>
To: netdev@vger.kernel.org
Cc: Loic Poulain <loic.poulain@oss.qualcomm.com>,
Sergey Ryazanov <ryazanov.s.a@gmail.com>,
Johannes Berg <johannes@sipsolutions.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org, Daniele Palmas <dnlplm@gmail.com>,
Peter Hunt <peter.hunt@opengear.com>
Subject: [PATCH net-next] net: wwan: mhi_wwan_ctrl: say the DTR drop flush is best effort
Date: Mon, 9 Nov 2026 11:57:31 -0700 [thread overview]
Message-ID: <20261109185731.182990-1-peter.hunt@opengear.com> (raw)
Three comments around the DTR/RTS work don't match the code since
commit 10f51f4fb99d ("net: wwan: mhi_wwan_ctrl: send a DTR drop before
it can be coalesced"):
- the ->dtr_rts() comment says the drop is sent now, but a drop that
hits a full UL ring is retried with whatever state is latest by then,
- the dtr_mdmbits comment only describes coalescing,
- the remove() comment says the removal drop gets one attempt, but the
drop and stop() paths now flush the work as well.
Update them. No functional change.
Link: https://lore.kernel.org/all/179340002701.3131.15535297427661129303@kernel.org/
Signed-off-by: Peter Hunt <peter.hunt@opengear.com>
---
drivers/net/wwan/mhi_wwan_ctrl.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wwan/mhi_wwan_ctrl.c b/drivers/net/wwan/mhi_wwan_ctrl.c
index 772319927867..3610613e442e 100644
--- a/drivers/net/wwan/mhi_wwan_ctrl.c
+++ b/drivers/net/wwan/mhi_wwan_ctrl.c
@@ -68,7 +68,8 @@ struct mhi_wwan_dev {
unsigned int rx_budget;
/* Latest DTR/RTS state for the modem, sent from dtr_work so a burst of
- * changes is coalesced and only the final state has to get through
+ * changes is coalesced and only the final state has to get through.
+ * A DTR drop is flushed out on its own, see mhi_wwan_ctrl_dtr_rts().
*/
unsigned int dtr_mdmbits;
struct delayed_work dtr_work;
@@ -216,7 +217,9 @@ static void mhi_wwan_ctrl_dtr_rts(struct wwan_port *port, unsigned int mdmbits)
schedule_delayed_work(&mhiwwan->dtr_work, 0);
/* A DTR drop matters on its own, e.g. to hang up a modem set to AT&D2,
- * so send it now rather than let a following raise coalesce it away
+ * so try to send it now rather than let a following raise coalesce it
+ * away. This is best effort, a drop that hits a full UL ring is retried
+ * with whatever state is latest by then.
*/
if (drop)
flush_delayed_work(&mhiwwan->dtr_work);
@@ -376,7 +379,7 @@ static void mhi_wwan_ctrl_remove(struct mhi_device *mhi_dev)
struct mhi_wwan_dev *mhiwwan = dev_get_drvdata(&mhi_dev->dev);
wwan_remove_port(mhiwwan->wwan_port);
- /* Give the DTR/RTS drop from removal one attempt, then stop the work */
+ /* Give any pending DTR/RTS state a last attempt, then stop the work */
flush_delayed_work(&mhiwwan->dtr_work);
disable_delayed_work_sync(&mhiwwan->dtr_work);
kfree(mhiwwan);
--
2.43.0
reply other threads:[~2026-11-09 18:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261109185731.182990-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@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--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
all inboxes | Powered by JetHome®