mm_port_subsys_to_qmi_endpoint_type() should not assume that WWAN == PCIe
Moved here from !549 (merged); it doesn't seem to cause any problems at the moment so we don't necessarily need to solve this before merge.
mm_port_subsys_to_qmi_endpoint_type()
contains this comment at the moment:
/* ... */
case MM_PORT_SUBSYS_RPMSG:
case MM_PORT_SUBSYS_QRTR:
return QMI_DATA_ENDPOINT_TYPE_EMBEDDED;
/* The WWAN subsystem abstracts the underlying transport bus, and so
* endpoint type can not be deducted from that. This function should
* then be revisited, but in practice, only MHI/PCI modem ports are
* exposed through the WWAN subsystem for now.
*/
case MM_PORT_SUBSYS_WWAN:
return QMI_DATA_ENDPOINT_TYPE_PCIE;
/* ... */
This is no longer true. With https://lore.kernel.org/netdev/20210618075243.42046-1-stephan@gerhold.net/ RPMSG can also go through the WWAN subsystem now. In that case we would want to return QMI_DATA_ENDPOINT_TYPE_EMBEDDED
. We need some way to better detect the kind of device that provides the WWAN ports.
For now this does not seem to cause any problems, I suspect the endpoint type does not actually end up being used for RPMSG+BAM-DMUX at the moment. ctx->use_endpoint
in mm-port-qmi.c
shouldn't end up being set for the RPMSG+BAM-DMUX case but if this changes at some point we'll need to fix this.