Hi Pekka,
The ofono_sim_driver->query_passwd_state callback will return
OFONO_SIM_PASSWORD_INVALID if SIM is not really ready yet. When the sim
gets ready or timeout occurs, ofono_sim_ready_notify() is called.
this reminds me that the current quirks won't work when entering the
PUK. The only thing hat has been working is when entering the PIN and
waiting for a SIM ready signal. When the PUK is required our code path
is different and it also needs to do the SIM ready notification. You
might wanna have a look into that as well.
Regards
Marcel