All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Pellegrino <paolo.pellegrino@zirak.it>
To: ofono@ofono.org
Subject: Re: Udev detection broken?
Date: Thu, 15 Sep 2011 16:33:32 +0200	[thread overview]
Message-ID: <4E720CBC.2010507@zirak.it> (raw)
In-Reply-To: <4E71ADD3.7060305@makhutov.org>

[-- Attachment #1: Type: text/plain, Size: 2304 bytes --]

Hi Artem,

Il 15/09/2011 9.48, Artem Makhutov ha scritto:
> Hi,
> 
> Artem Makhutov schrieb:
>> Hello,
>> 
>> I am trying to setup ofono on my PC again, unfortunatly ofono
>> does not pick up the connected huawei modem. [...]
> 
> I have done some more testing. Looks like the "OFONO_DRIVER=huawei"
> is getting removed somehow by udev.
> 
> With "udevadm monitor --property" I can see that
> OFONO_DRIVER=huawei was set for
> /devices/pci0000:00/0000:00:02.1/usb1/1-3 But "udevadm info
> --query=all --path=/devices/pci0000:00/0000:00:02.1/usb1/1-3" does
> not show it. Ofono also can't find it.
> 
> Any ideas that to do to trace down the problem?

We incurred in a similar problem some months ago, but we thought the
issue was related to some specific udev library version we were using
(v153 if I remember well).

Here is a patch we applied to ofono.rules to fix the problem, maybe it
will solve your issue, too:

@@ -0,0 +1,25 @@
+diff --git a/plugins/ofono.rules b/plugins/ofono.rules
+index 5a36380..bff8102 100644
+--- a/plugins/ofono.rules
++++ b/plugins/ofono.rules
+@@ -362,8 +362,18 @@ KERNEL=="shrm0", ENV{OFONO_DRIVER}="u8500"
+
+ LABEL="ofono_isi_end"
+
+-SUBSYSTEM!="usb", GOTO="ofono_end"
+-ENV{DEVTYPE}!="usb_device", GOTO="ofono_end"
++# Possibly unmatched rules if CONFIG_USB_DEVICE_CLASS=y
++# (deprecated config option)
++# See http://permalink.gmane.org/gmane.linux.lfs.devel/5791
++SUBSYSTEM!="usb", GOTO="test_usb_device"
++ENV{DEVTYPE}!="usb_device", GOTO="test_usb_device"
++GOTO="set_ofono_driver"
++
++LABEL="test_usb_device"
++# Workaround in case the above rules do not match
++SUBSYSTEM!="usb_device", GOTO="ofono_end"
++
++LABEL="set_ofono_driver"
+
+ # Novatel Wireless
+ ATTRS{idVendor}=="1410", ENV{OFONO_DRIVER}="novatel"

Very likely it can be rewritten in some cleaner way.
It just falls back to checking usb_device as SUBSYSTEM in addition to
what it checks now (i.e., usb as SUBSYSTEM or usb_device as ENV{DEVTYPE}).
Also current checks could probably be removed as related to some
deprecated kernel configurations, but we left there for compatibility
reasons (they appear to be harmless after all).

Hope this patch may help! :)

> Some logs are attached.
> 
> Thanks, Artem
Regards,
  Paolo

  reply	other threads:[~2011-09-15 14:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-14 22:01 Udev detection broken? Artem Makhutov
2011-09-08  8:49 ` Denis Kenzior
2011-09-15 18:03   ` Artem Makhutov
2011-09-15  7:48 ` Artem Makhutov
2011-09-15 14:33   ` Paolo Pellegrino [this message]
2011-09-15 18:24     ` Artem Makhutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E720CBC.2010507@zirak.it \
    --to=paolo.pellegrino@zirak.it \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.