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).
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
ACTION!="add|change|move|bind", GOTO="mm_qcom_soc_end"
|
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=="bam-dmux", GOTO="mm_qcom_soc_process"
|
||||||
SUBSYSTEM=="net", DRIVERS=="ipa", 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"
|
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"
|
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
|
# Add a common physdev UID to all ports in the Qualcomm SoC, so that they
|
||||||
# are all bound together to the same modem object.
|
# are all bound together to the same modem object.
|
||||||
|
@@ -68,6 +68,10 @@ G_MODULE_EXPORT MMPlugin *
|
|||||||
mm_plugin_create (void)
|
mm_plugin_create (void)
|
||||||
{
|
{
|
||||||
static const gchar *subsystems[] = { "wwan", "rpmsg", "net", "qrtr", NULL };
|
static const gchar *subsystems[] = { "wwan", "rpmsg", "net", "qrtr", NULL };
|
||||||
|
static const gchar *udev_tags[] = {
|
||||||
|
"ID_MM_QCOM_SOC",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
return MM_PLUGIN (
|
return MM_PLUGIN (
|
||||||
g_object_new (MM_TYPE_PLUGIN_QCOM_SOC,
|
g_object_new (MM_TYPE_PLUGIN_QCOM_SOC,
|
||||||
@@ -75,6 +79,7 @@ mm_plugin_create (void)
|
|||||||
MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
|
MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
|
||||||
MM_PLUGIN_ALLOWED_AT, TRUE,
|
MM_PLUGIN_ALLOWED_AT, TRUE,
|
||||||
MM_PLUGIN_ALLOWED_QMI, TRUE,
|
MM_PLUGIN_ALLOWED_QMI, TRUE,
|
||||||
|
MM_PLUGIN_ALLOWED_UDEV_TAGS, udev_tags,
|
||||||
NULL));
|
NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -144,7 +144,8 @@ mm_kernel_device_qrtr_init (MMKernelDeviceQrtr *self)
|
|||||||
/* Set properties*/
|
/* Set properties*/
|
||||||
g_object_set_data_full (G_OBJECT (self), ID_MM_PORT_TYPE_QMI, g_strdup ("true"), g_free);
|
g_object_set_data_full (G_OBJECT (self), ID_MM_PORT_TYPE_QMI, g_strdup ("true"), g_free);
|
||||||
g_object_set_data_full (G_OBJECT (self), ID_MM_CANDIDATE, g_strdup ("1"), g_free);
|
g_object_set_data_full (G_OBJECT (self), ID_MM_CANDIDATE, g_strdup ("1"), g_free);
|
||||||
|
/* For now we're assuming that QRTR ports are available exclusively on Qualcomm SoCs */
|
||||||
|
g_object_set_data_full (G_OBJECT (self), "ID_MM_QCOM_SOC", g_strdup ("1"), g_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user