All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: Timeout/Reliability issue with my plugin
Date: Sat, 12 Mar 2016 09:52:00 -0600	[thread overview]
Message-ID: <56E43B20.9090100@gmail.com> (raw)
In-Reply-To: <loom.20160312T152722-352@post.gmane.org>

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

Hi Holger,

On 03/12/2016 09:03 AM, Holger Freyther wrote:
> Hi,
>
> my plugin is opening the serial on _enable and on _disable it is issuing a
> AT+CFUN=0 and waits for the result before discarding the atchat.
>
> $ ./tests/enable-modem /wavecom_0
> ...
> $ lsof | grep ttyUSB0 | wc -l
> 1
>
> $ ./tests/disable-modem /wavecom_0
> $ lsof | grep ttyUSB0 | wc -l
> 0
>
> So far so good. But if I run the above in a loop.. then I see dbus timeouts and
> when I execute lsof.. I see that ofonod has 1023 FDs open. So at some point in
> time either the state is messed up or the AT+CFUN doesn't respond.. but we open
> the same device more than once.

Without seeing the modem driver code, I can't comment.  The core does 
set a timeout whenever .set_powered() method is called.  If the method 
does not return in that time, the core does what cleanup that it can. 
Refer to src/modem.c for details.

However, the modem driver is still responsible for cleaning up after 
itself, since the core has no visibility into what resources are being 
used by the modem driver.

>
> Is this known? Does ofono start timers? Does the GAtChat have a way to timeout
> commands and then disclose it? How do other modems handle such situation?
>

GAtChat does not timeout the individual commands.  The atom drivers 
would have no idea what to do with commands that timeout anyway.  And we 
have never needed this capability in practice.  Your modem driver would 
need to handle any modem idiosyncrasies, such as the modem firmware 
resetting on CFUN=0 and never returning an OK.

Regards,
-Denis

  reply	other threads:[~2016-03-12 15:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-12 15:03 Timeout/Reliability issue with my plugin Holger Freyther
2016-03-12 15:52 ` Denis Kenzior [this message]
2016-03-12 17:10   ` Holger Freyther
2016-03-12 17:23     ` Denis Kenzior
2016-03-12 19:20       ` Holger Freyther

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=56E43B20.9090100@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.