Re: [PATCH] bus: mhi: host: pci_generic: Disable doorbell burst mode for Quectel RM500Q-AE

From: Muhammad Huda Nugroho

Date: Sat Dec 05 2026 - 18:25:21 EST


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