Re: [PATCH v2 2/9] Ignore rild modem devices.



On 06/14/2016 12:42 PM, Dan Williams wrote:
On Fri, 2016-06-10 at 17:56 -0400, Tony Espy wrote:
From: Mathieu Trudel-Lapierre <mathieu trudel-lapierre canonical com>

Gbp-Pq: Name Ignore-rild-modem-devices.patch
---
  src/nm-manager.c | 8 ++++++++
  1 file changed, 8 insertions(+)

diff --git a/src/nm-manager.c b/src/nm-manager.c
index e64c68a..be21baa 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -2057,6 +2057,14 @@ platform_link_added (NMManager *self,
                gboolean ignore = FALSE;
                gs_free_error GError *error = NULL;

+               /* Ignore rild modem devices, which will be handled
by their modem parent */
+               if (g_str_has_prefix (plink->name, "rmnet") ||
+                       g_str_has_prefix (plink->name, "rev_rmnet")
||
+                       g_str_has_prefix (plink->name, "ccmni")) {
+                       _LOGW (LOGD_HW, "Ignoring rild modem device:
%s", plink->name);
+                       return;
+               }
+
                device = nm_device_factory_create_device (factory,
plink->name, plink, NULL, &ignore, &error);
                if (!device) {
                        if (!ignore) {

I pushed an alternate version of this patch to th/review/ofono; Thomas
is right that to put this into the WWAN plugin would require them being
tagged with devtype=WWAN, and none of the drivers do that, at least
from sources I can find.  Since they aren't upstream, we can't fix
them.

Right. We'll see if this is something we can push through on our end, but I'm not too optimistic.

I'm also surprised that from what I've read, this isn't something that could be handled by a udev rule, but apparently DEVTYPE isn't something that can be fixed up.

Instead, I think we should tag them with TYPE_WWAN_NET, and they'll get
automatically ignored by the WWAN plugin.

I guess this is the best we can do, however it still leaves us facing the same problem with the next ISV/ODM unwilling to "do-the-right-thing". ;)-

Thanks,
/tony



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]