From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2 1/1] he910: reset modem after IO disconnect
Date: Thu, 08 May 2014 09:06:29 -0500 [thread overview]
Message-ID: <536B8F65.7010903@gmail.com> (raw)
In-Reply-To: <536B2709.7040200@southpole.se>
[-- Attachment #1: Type: text/plain, Size: 1743 bytes --]
Hi Jonas,
>>
>>> Somehow we need to be able to recreate this data structure, but since
>>> it's created in the modem's init function it won't be unless we "power
>>> down" the modem (or something along those lines).
>>
>> You would need to re-create the affected atoms. In this case this would
>> be the gprs-context atom.
>
> The gprs-context is created in post_online... we require functioning
> communication to the modem to get that far.
So here's the thing, when you pull the SIM and call
ofono_sim_inserted_notify(modem, FALSE) all post_sim and post_online
atoms get destroyed. So everything would be re-created anyway once you
reach post_sim/post_online state again. So in theory, the only thing
you need to take care of is re-open the modem chat port and re-set the
slave.
>
> When the modem or aux port HUP's, io_disconnect cleans up the at_chat
> and chat structures associated with it. This means that the
> command_queue disappears and no more commands can be sent to the modem
> via that chat (which we still reference). We can hook into
> user_disconenct to find out that the chat has been cleaned up and drop
> our references, but we need to get the modem back on its feet again by
> reopening the modem and aux ports and redoing the modem initialization.
>
So I'm confused, you said that the aux port is not HUPed. If that is
the case, then the AUX queue (which is used by every atom except
gprs-context) is not cleared. Essentially you need to issue an
ofono_sim_inserted_notify(modem, FALSE) and re-create the modem chat.
After that things should just work.
> SIM hotswap is definitely supported by this hardware.
Okay, cool. That is good to know.
Regards,
-Denis
prev parent reply other threads:[~2014-05-08 14:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-02 14:15 [PATCH 1/1] he910: set modem unpowered after IO disconnect Jonas Bonn
2014-05-06 13:38 ` Denis Kenzior
2014-05-07 6:29 ` Jonas Bonn
2014-05-07 16:03 ` Denis Kenzior
2014-05-07 12:14 ` [PATCH v2 1/1] he910: reset modem " Jonas Bonn
2014-05-07 16:28 ` Denis Kenzior
2014-05-08 6:41 ` Jonas Bonn
2014-05-08 14:06 ` Denis Kenzior [this message]
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=536B8F65.7010903@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox