All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] sim: showing lock state with call meter
Date: Fri, 25 Feb 2011 11:07:06 -0600	[thread overview]
Message-ID: <4D67E1BA.90109@gmail.com> (raw)
In-Reply-To: <1298639971.18254.15.camel@jussi-desktop>

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

Hi Jussi,

On 02/25/2011 07:19 AM, Jussi Kangas wrote:
> Hi,
> 
> On Thu, 2011-02-24 at 22:17 +0200, Denis Kenzior wrote: 
> 
>> We have to check for the PUK2 case above since we might be in PUK2
>> required state already.  If we fail to unlock the PUK2, then
>>       pin_type = puk2pin(pin_type);
>> will never be executed.
>>
>> And I'm fine with your suggestion of blacklisting PIN2 from
> LockedPins,
>> but lets handle this separately.
> 
> Yes let's handle that as separate issue if at all. What I was trying to 
> say was that there was no situation in my testings where PUK2 would be 
> required in this part of code. If PUK2 is required pin_type is still
> PIN2 here. Situation you describe has to happen with other modems.
>

Looking at the code there might be possibilities when pin_type is in
fact PUK2.  The puk2pin code is executed only if pin_type does not match
sim->pin_type.  So if you're already in PUK2 state, and fail to unlock
again, you need to check against PUK2, not PIN2.

>> Again, my point here is that you have this code at the bottom of the
>> function:
>>
>>         if (pin_type == OFONO_SIM_PASSWORD_NONE)
>>                 sim_initialize_after_pin(sim);
>>
>> If you want the SIM initialization to proceed then you need to add a
>> check for SIM PIN2/PUK2.
> 
> You are writing about adding PIN2 and PUK2 to this check? I rechecked 
> my AT command API specification and PIN2 and PUK2 cannot be required in
> startup. (Speculation about bug in my previous mail was wrong) And if
> PIN2 or PUK2 is required in other time there is no need for
> sim_initialization. You must be writing about situation where oFono is
> run workstation environment and restarted without booting the modem? Ok,
> I'll change that but I think I'll add a check to prevent sim
> initialization in sim state READY situation. 
> 
> What is your general opinion about making amends in oFono code to enable
> nice working in workstation? My previous hotswap patch does not work if
> you disable modem without restarting oFono. It lacks initialization of
> have_sim parameter in init_sim_reporting method. 
> 

We need to make every reasonable effort to make oFono work in these
cases.  We can't assume that the driver can reset the modem properly
when powering up.  And in fact most USB data sticks on the market do not
support modem resets short of pulling the hardware.  If the modem
firmware is buggy, then there's obviously nothing we can do.

Regards,
-Denis

  reply	other threads:[~2011-02-25 17:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22 12:05 [PATCH] sim: showing lock state with call meter Jussi Kangas
2011-02-23  6:15 ` Denis Kenzior
2011-02-23 15:24   ` Jussi Kangas
2011-02-24 20:17     ` Denis Kenzior
2011-02-25 13:19       ` Jussi Kangas
2011-02-25 17:07         ` Denis Kenzior [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-02-25 13:20 Jussi Kangas
2011-02-25 17:58 ` Denis Kenzior

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=4D67E1BA.90109@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.