diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-10-13 13:36:24 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-10-14 12:54:21 +0000 |
commit | c06ca6df3f096a53665611b26b4add933317e873 (patch) | |
tree | da85629db2f5597bae02bf49efd0861b19638383 /plugins/qcom-soc | |
parent | f9645c30b7ad511e5af2b9ad50386da5fb4edd37 (diff) |
qcom-soc: require udev tag for ports
Since the 'wwan' subsystem addition to the qcom-soc plugin, the rules
to say a modem is handled by this plugin are too broad, and the plugin
attempts to support any kind of device exposed by the WWAN subsystem,
not just those from Qualcomm SoCs.
Update the plugin to require a new ID_MM_QCOM_SOC udev tag that is set
in the plugin udev rules, given that these rules already check for the
expected SoC drivers (bam-dmux, ipa, qcom-q6v5-mss).
Diffstat (limited to 'plugins/qcom-soc')
-rw-r--r-- | plugins/qcom-soc/77-mm-qcom-soc.rules | 5 | ||||
-rw-r--r-- | plugins/qcom-soc/mm-plugin-qcom-soc.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/qcom-soc/77-mm-qcom-soc.rules b/plugins/qcom-soc/77-mm-qcom-soc.rules index 32195c1a..6511bf20 100644 --- a/plugins/qcom-soc/77-mm-qcom-soc.rules +++ b/plugins/qcom-soc/77-mm-qcom-soc.rules @@ -2,7 +2,7 @@ ACTION!="add|change|move|bind", GOTO="mm_qcom_soc_end" -# Process only known net and rpmsg ports +# Process only known wwan, net and rpmsg ports SUBSYSTEM=="net", DRIVERS=="bam-dmux", GOTO="mm_qcom_soc_process" SUBSYSTEM=="net", DRIVERS=="ipa", GOTO="mm_qcom_soc_process" SUBSYSTEM=="wwan", DRIVERS=="qcom-q6v5-mss", GOTO="mm_qcom_soc_process" @@ -11,6 +11,9 @@ GOTO="mm_qcom_soc_end" LABEL="mm_qcom_soc_process" +# Flag the port as being part of the SoC +ENV{ID_MM_QCOM_SOC}="1" + # # Add a common physdev UID to all ports in the Qualcomm SoC, so that they # are all bound together to the same modem object. diff --git a/plugins/qcom-soc/mm-plugin-qcom-soc.c b/plugins/qcom-soc/mm-plugin-qcom-soc.c index 35b5981b..58743a8d 100644 --- a/plugins/qcom-soc/mm-plugin-qcom-soc.c +++ b/plugins/qcom-soc/mm-plugin-qcom-soc.c @@ -68,6 +68,10 @@ G_MODULE_EXPORT MMPlugin * mm_plugin_create (void) { static const gchar *subsystems[] = { "wwan", "rpmsg", "net", "qrtr", NULL }; + static const gchar *udev_tags[] = { + "ID_MM_QCOM_SOC", + NULL + }; return MM_PLUGIN ( g_object_new (MM_TYPE_PLUGIN_QCOM_SOC, @@ -75,6 +79,7 @@ mm_plugin_create (void) MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems, MM_PLUGIN_ALLOWED_AT, TRUE, MM_PLUGIN_ALLOWED_QMI, TRUE, + MM_PLUGIN_ALLOWED_UDEV_TAGS, udev_tags, NULL)); } |