mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Muhammad Huda Nugroho <mhudan21@gmail.com>
To: stevemeek82@gmail.com
Cc: manivannan.sadhasivam@oss.qualcomm.com,
	jeff.hugo@oss.qualcomm.com, mhi@lists.linux.dev,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bus: mhi: host: pci_generic: Disable doorbell burst mode for Quectel RM500Q-AE
Date: Sun, 06 Dec 2026 06:25:10 +0700	[thread overview]
Message-ID: <20261205232510.MxJpT%mhudan21@gmail.com> (raw)

Hi Steve,

A datapoint from another IPQ5018 board with a different Quectel modem,
because the signature you describe is the one I spent a while chasing.

The board is a whitelabel IPQ5018 CPE (QDM530) with a Quectel RG520N-EB
(SDX6x) on PCIe/MHI. It enumerates as the plain 17cb:0308, so it falls
through to the generic modem_qcom_v1 table rather than em1xx, and it runs
mhi_net + rmnet/QMAP on 6.18.60 (OpenWrt/ImmortalWrt), two Cortex-A53 at
1 GHz doing NAT, routing and Wi-Fi at the same time.

The failure reads the same as yours: under sustained downlink the rmnet
rx counter freezes mid-transfer while tx keeps rising, the link and the
registration stay up, the MHI state stays M0, nothing appears in the log,
and only a modem reset or a reboot brings the downlink back. It wedged
after 30-43k rmnet packets, a few tens of MB.

Where my evidence differs from yours is the doorbell. At the stall,
debugfs showed that the host's doorbell had been rung and did cover the
queued buffers: on IP_HW0(101) the write pointer was ~56 elements ahead
of the read pointer with db >= wp, while the dedicated DL event ring had
its read pointer caught up to its write pointer and the MSI for it had
gone silent. That does not match a cleared db_mode the device never asked
to leave - unless the doorbell I was looking at was written after the
device had already stopped. It is a single sample taken after the fact, so
I cannot time the two against each other, and I would not claim it rules
your mechanism out.

What fixed it here was ring depth: IP_HW0 UL/DL 128 -> 512 in
modem_qcom_v1, which Mani applied as cc3a63ee69b3. With doorbell burst
mode left enabled, that alone carried 648 MB of sustained downlink,
450,768 rmnet packets at ~2.0k packets/s, with rx_err, rx_drop and
rx_fifo all zero, where the unpatched driver wedged an order of magnitude
earlier.

I also ran your knob, since I had suspected the same thing you found:
burst mode disabled on the two hardware channels, on top of the 512-entry
ring, same load script. 648 MB and zero freeze as well - indistinguishable
from the ring change on its own. With the deeper ring I was never able to
reproduce the wedge with burst mode either on or off, so this board cannot
separate the two mechanisms. It only says the deeper ring was sufficient at
the rate I can reach.

That rate is the caveat. This cell gives me 25-35 Mbps, with QMAP
aggregating ~13 rmnet packets per MHI transfer. Your 16-stream, 135 Mbps
regime is well past anything I have measured, so if the lost handshake is
driven by how fast the ring drains, my runs would not have seen it.

If it would help decide whether the generic modem_qcom_v1 table wants
burst mode off as well, I am happy to run whatever you would like on this
board: burst on/off against a 128 or 512 ring in any combination, plus the
debugfs snapshot at the stall. The combination I never tried is the
interesting one - 128-entry ring with burst mode disabled - because that is
what would show whether turning burst mode off is enough on its own, or
whether the two are the same window seen from different sides.

Thanks,
Muhammad Huda Nugroho

         reply	other threads:[~2026-12-05 23:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13 14:14 Steve Meek via B4 Relay
2026-11-05 13:35 ` Steve Meek
2026-12-02  4:44 ` Manivannan Sadhasivam
2026-12-05 23:25 ` Muhammad Huda Nugroho [this message]
2026-12-06 12:06   ` Steve Meek
2026-12-05 23:32 ` Muhammad Huda Nugroho

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=20261205232510.MxJpT%mhudan21@gmail.com \
    --to=mhudan21@gmail.com \
    --cc=jeff.hugo@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@oss.qualcomm.com \
    --cc=mhi@lists.linux.dev \
    --cc=stevemeek82@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®