All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonas Bonn <jonas@norrbonn.se>
To: ofono@ofono.org
Subject: Re: [PATCH] src/modem: connection timeout to 60 seconds
Date: Tue, 23 Oct 2018 12:45:01 +0200	[thread overview]
Message-ID: <d27aeefc-d5fe-5ec6-1af6-650e14deeb68@norrbonn.se> (raw)
In-Reply-To: <CAKSBH7FhE7LKByNODgqqXQTdna37_f6cVxPvSY5PxnG3kwKYfA@mail.gmail.com>

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



On 23/10/18 11:26, Giacinto Cifelli wrote:
> Hi Jonas
>>
>> This is where I think adding a data item in udevng would be in order.
>> ...set_int(..., "PoweredTimeout", 60)... or something like that.  It's a
>> device quirk, after all.  I've dealt with modems that were slow to boot,
>> but usually they don't present the USB interfaces until they are ready
>> to go.
> 
> I had in mind a plugin function that would return the timeout it needs
> (to be called between .probe and .enable), something like .get_params.
> 
> Your parameter should be set in a udev rule, otherwise it would apply
> to all modems connected, and so it is marginally better than the
> current hardcoding.
> Adding udev rules is tedious, USB devices are supposed to work 'out of
> the box', without manual tweaks.

No, not in a udev rule.  I was thinking of adding a line like this to 
setup_gemalto() in plugins/udevng.c:

if (g_strcmp0(modem->model, "xxxx"))
	ofono_modem_set_int(modem->modem, "PoweredTimeout", 60);

('model' is hexadecimal, numeric value, so you could parse it and do a 
switch() on it if you don't like the strcmp...)

Then query the setting in src/modem.c.

/Jonas

  reply	other threads:[~2018-10-23 10:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23  7:50 [PATCH] src/modem.c/call_watches null pointer check Giacinto Cifelli
2018-10-23  7:50 ` [PATCH] src/modem: connection timeout to 60 seconds Giacinto Cifelli
2018-10-23  8:34   ` Jonas Bonn
2018-10-23  8:40     ` Giacinto Cifelli
2018-10-23  8:53       ` Jonas Bonn
2018-10-23  9:26         ` Giacinto Cifelli
2018-10-23 10:45           ` Jonas Bonn [this message]
2018-10-23 15:08       ` Denis Kenzior
2018-10-23 18:34         ` Giacinto Cifelli
2018-10-23 10:35   ` Slava Monich
2018-10-23 14:30 ` [PATCH] src/modem.c/call_watches null pointer check Denis Kenzior
2018-10-23 14:44   ` Giacinto Cifelli
2018-10-23 14:47     ` Denis Kenzior
2018-10-23 16:39       ` Giacinto Cifelli
2018-10-23 16:50         ` Denis Kenzior
2018-10-23 17:30           ` Giacinto Cifelli
2018-10-23 17:40             ` Denis Kenzior
2018-10-23 17:51               ` Giacinto Cifelli

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=d27aeefc-d5fe-5ec6-1af6-650e14deeb68@norrbonn.se \
    --to=jonas@norrbonn.se \
    --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.