qcom-soc: add BAM-DMUX data path support#2312
Conversation
Test Results 103 files ± 0 632 suites ±0 5h 6m 1s ⏱️ - 1h 36m 19s For more details on these failures, see this check. Results for commit 0169c08. ± Comparison against base commit 30e5a33. This pull request removes 2 and adds 1 tests. Note that renamed tests count towards both. |
This PR contains exactly 1 commit. |
lumag
left a comment
There was a problem hiding this comment.
Missing commit message. Also unsquash your patches.
|
You used AI to generate a long PR description but no commit message at all, get your agent to read and consume AGENTS.md (https://github.com/qualcomm-linux/meta-qcom/blob/master/AGENTS.md#7-commit-message-best-practices-project-style). |
Apologies for the confusion, this PR is only having 1 commit as all of the 4 commits from the MR 1452 has been included in a single patch, please let me know if you want all those 4 commits message included in that single patch, then I will update the same. |
I will add the commit message shortly. |
6c83d28 to
e5c6cf1
Compare
|
I have updated the MR also, now it's having a single commit. |
For BAM-DMUX based qcom-soc modems, the wwan0 net interface only
appears after a DPM Open Port command is sent during modem init.
This patch adds full BAM-DMUX data path support:
1. Sends DPM Open Port during enabling_modem_init() in the qcom-soc
plugin to trigger wwan0 creation by the kernel bam-dmux driver.
2. Allows modem creation without a net port when BAM-DMUX is pending
by adding mm_base_modem_get_bam_dmux_pending(). IPA modems always
have a data port at probe time so this heuristic is safe.
3. Pre-configures the QMI port net driver to "bam-dmux" before wwan0
appears so the correct endpoint type is set for WDA requests.
4. Uses BindMuxDataPort with ep-type=BAM_DMUX, mux-id=0 for WDS
client binding instead of the SIO port or rmnet mux paths.
5. Fixes QRTR WDA endpoint TLV handling: removes the bam-dmux
exclusion from use_endpoint=TRUE, defaults UNDEFINED endpoint
type to EMBEDDED/0, and handles firmware that returns
InvalidArgument instead of MissingArgument when the endpoint
TLV is absent.
All changes are guarded by driver string comparisons or the
mm_base_modem_get_bam_dmux_pending() predicate. USB, PCIe, and
IPA-based modems are completely unaffected.
Signed-off-by: Harsh Sharma <hsharm@qti.qualcomm.com>
Why??? |
Problem
Qualcomm SoC modems using the BAM-DMUX kernel data path driver were not functional in ModemManager. Two separate issues prevented them from working:
Probe-time failure: The
wwan0net interface is not created at boot for BAM-DMUX modems. It only appears after the modem firmware receives a DPM Open Port command, which is sent during modem initialization — afterorganize_ports()has already run. This caused modem creation to fail because no net port was present at probe time.WDA data format failure: The WDA GET DATA FORMAT command on QRTR ports requires an endpoint TLV identifying the data endpoint. The bam-dmux driver was excluded from the endpoint TLV path, causing the request to be sent without it. Some firmware versions reject this with an
InvalidArgumenterror instead of the more descriptiveMissingArgument.Solution
The MR contains 1 commit, and the corresponding PR has 1 commit touching the subsystems:
1.
port/qmi: add BAM-DMUX DPM support and fix QRTR WDA endpoint handlingAdd
dpm_open_port_bam_dmux()with the correct BAM-DMUX DPM parameters and wire it into the data format step machine alongside the existing IPA pathRemove the bam-dmux exclusion from the
use_endpoint=TRUEpath; for ports with an unrecognized net driver, default the endpoint type toEMBEDDED/0instead of the invalidUNDEFINEDtypeAdd a fallback in
get_data_format_ready()to retry without the endpoint TLV when the modem rejects it, handling firmware that usesInvalidArgumentinstead ofMissingArgumentAdd
mm_port_qmi_set_net_driver(),mm_port_qmi_get_net_driver(), andmm_port_qmi_peek_device()public API2.
base-modem: allow QMI modem creation without net port for BAM-DMUXAdd
mm_base_modem_get_bam_dmux_pending()which returnsTRUEwhen the plugin is"qcom-soc"and no data port has been grabbed yet; IPA modems always have a data port at probe time so this is safeSkip the net port and data port error checks in
organize_ports()when BAM-DMUX is pendingPre-configure the QMI port's net driver to
"bam-dmux"beforewwan0appears so the correct endpoint type is set for WDA requests3.
bearer/qmi: use BindMuxDataPort for BAM-DMUX WDS client bindingAdd a BAM-DMUX branch at the bind data port steps that sends
BindMuxDataPortwithep-type=BAM_DMUX, mux-id=0; the existing SIO port and rmnet mux paths are unchanged4.
plugins/qcom-soc: send DPM open port during enabling_modem_initOverride
enabling_modem_init()to send DPM Open Port early in the enable sequence, triggeringwwan0creation; only runs for BAM-DMUX modems, IPA modems return immediately without any actionFix
peek_port_qmi_for_data_bam_dmux()to useQMI_SIO_PORT_NONEsince BAM-DMUX usesBindMuxDataPortrather thanBindDataPortNon-regression
Every change is guarded by a driver string comparison or the
mm_base_modem_get_bam_dmux_pending()predicate, which returnsFALSEfor all non-BAM-DMUX modems:Known limitation
mm_base_modem_get_bam_dmux_pending()checks the plugin name"qcom-soc"in core code. The preferred approach would be a virtual method inMMBroadbandModemQmiClass, but that requires a larger refactor. This is explicitly documented with aNOTE:comment and can be addressed in a follow-up patch.Testing
Tested on Shikra platform (qcom-soc, BAM-DMUX data path, QRTR transport):
wwan0appears after DPM Open Port duringenabling_modem_initWDA GET DATA FORMAT succeeds
Modem reaches
searching→registeredstateIPv4 data connection established and verified
qcom-soc IPA modem tested in parallel: no regression observed
Signed-off-by: Harsh Sharma hsharm@qti.qualcomm.com