From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] udevng: Add OFONO_PATHNAME property to set modem dbus path name
Date: Wed, 14 Feb 2018 11:04:37 -0600 [thread overview]
Message-ID: <537fc659-a482-c828-e5aa-fed89350f132@gmail.com> (raw)
In-Reply-To: <20180213195338.30077-1-pespin@sysmocom.de>
[-- Attachment #1: Type: text/plain, Size: 2171 bytes --]
Hi Pau,
On 02/13/2018 01:53 PM, Pau Espin Pedrol wrote:
> The current udevng.c implementation sets dbus path names for modems
> based on type and a number incremented seuqntially for each new modem
> found. As a result, the dbus path for a given device is non
> deterministic, since it depends on the devices available during ofono
> startup.
Why should it be deterministic?
>
> Furthermore, if a modem crashes and reboots while in operation, then
> udev will trigger a remove event followed by a create event, and the
> same modem will now be given a different name (as the sequence number is
> bigger).
Yes, and?
>
> This is non suitable for systems handling several modems which want to
> identify them easily based on its path.
>
This sounds like a very specific non-real world usecase, right? I mean
why don't you simply compare the IMEI if you really care?
> This patch introduces a way to be able to set persistent names for
> specific devices while still permitting previous dynamic naming
> methodology.
>
> One can set a persistent name using udev rules for the target device
> which set the OFONO_PATHNAME env property. If ofono finds this property
> set, it will use its value as the dbus path name for the modem.
I'm hesitant to take this patch as udev logic is already complex and
this doesn't seem to be relevant for anyone else besides your test system.
>
> Example:
> $ cat /etc/udev/rules.d/90-local.rules
> SUBSYSTEMS=="usb", DEVPATH=="/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.1/3-1.1.4/3-1.1.4.1/3-1.1.4.1.1", ENV{OFONO_PATHNAME}="foo"
>
> $ udevadm info -p /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.1/3-1.1.4/3-1.1.4.1/3-1.1.4.1.1
> ...
> E: OFONO_PATHNAME=foo
> ...
>
> $ mdbus2 -s org.ofono
> /
> /bluetooth
> /bluetooth/profile
> /bluetooth/profile/dun_gw
> /bluetooth/profile/hfp_ag
> /bluetooth/profile/hfp_hf
> /foo
How are you making sure that dbus path is valid? ofono_modem_create
can fail after all...
> /mbm_0
> ---
> plugins/udevng.c | 22 +++++++++++++++-------
> 1 file changed, 15 insertions(+), 7 deletions(-)
>
Regards,
-Denis
next prev parent reply other threads:[~2018-02-14 17:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 19:53 [PATCH] udevng: Add OFONO_PATHNAME property to set modem dbus path name Pau Espin Pedrol
2018-02-14 17:04 ` Denis Kenzior [this message]
2018-02-14 18:15 ` Pau Espin Pedrol
2018-02-14 20:31 ` Denis Kenzior
2018-02-15 8:47 ` Christophe Ronco
2018-02-15 8:50 ` [PATCH] add syspath property to modem properties Christophe Ronco
2018-02-15 12:09 ` Pau Espin Pedrol
2018-02-15 15:59 ` Denis Kenzior
2018-02-16 15:40 ` Christophe Ronco
2018-02-16 18:19 ` Denis Kenzior
2018-02-19 14:57 ` [PATCH 0/3] Add SystemPath property to modem interface Christophe Ronco
2018-02-19 14:57 ` [PATCH 1/3] udevng: Add modem string SystemPath Christophe Ronco
2018-02-19 14:57 ` [PATCH 2/3] modem: Add SystemPath dbus property Christophe Ronco
2018-02-19 14:57 ` [PATCH 3/3] doc: Add SystemPath to Modem interface Christophe Ronco
2018-02-19 15:36 ` Jonas Bonn
2018-02-19 17:25 ` Denis Kenzior
2018-02-20 8:57 ` [PATCH 1/1] " Christophe Ronco
2018-02-20 17:10 ` [PATCH 0/3] Add SystemPath property to modem interface Denis Kenzior
2018-02-15 12:22 ` [PATCH] modem: ofono_modem_create: log invalid paths Pau Espin Pedrol
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=537fc659-a482-c828-e5aa-fed89350f132@gmail.com \
--to=denkenz@gmail.com \
--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.