Hi, this patch will break cellular connectivity when coming out of flight mode as the modem is still powered off and will lead to ENODEV-error (19). Therefore it should not try to bring cellular-interfaces up or accept ENODEV as valid response.
--cut-- connmand[2510]: plugins/ofono.c:modem_probe() /ril_0 device 0x1cc9d10 connmand[2510]: src/technology.c:__connman_technology_add_device() device 0x1cc9d10 type Cellular connmand[2510]: src/technology.c:technology_get() type 5 connmand[2510]: src/technology.c:technology_find() type 5 connmand[2510]: src/technology.c:technology_get() technology (nil) driver 0xacf38 connmand[2510]: src/technology.c:technology_load() technology 0x1cdef58 connmand[2510]: src/storage.c:storage_load() Loading /var/lib/connman/settings connmand[2510]: src/technology.c:technology_get() technology 0x1cdef58 connmand[2510]: src/device.c:__connman_device_enable() device 0x1cc9d10 connmand[2510]: src/device.c:__connman_device_enable() device 0x1cc9d10, err -19 connmand[2510]: src/storage.c:storage_load() Loading /var/lib/connman/settings connmand[2510]: plugins/ofono.c:modem_set_online() /ril_0 online 1 connmand[2510]: plugins/ofono.c:set_property() /ril_0 path /ril_0 org.ofono.Modem.Online connmand[2510]: src/device.c:connman_device_set_powered() driver 0x1cc9d10 powered 0 connmand[2510]: plugins/ofono.c:modem_changed() /ril_0 Interfaces 0x05 connmand[2510]: plugins/ofono.c:modem_update_interfaces() /ril_0 connmand[2510]: plugins/ofono.c:api_added() cm added connmand[2510]: plugins/ofono.c:get_properties() /ril_0 path /ril_0 org.ofono.ConnectionManager connmand[2510]: plugins/ofono.c:cm_get_contexts() /ril_0 connmand[2510]: plugins/ofono.c:modem_changed() /ril_0 Serial 359745050002549 connmand[2510]: src/service.c:connman_service_create() service 0x1cdb8d0 connmand[2510]: src/service.c:service_initialize() service 0x1cdb8d0 connmand[2510]: src/service.c:service_load() service cellular_244919750451136_context1 connmand[2510]: src/storage.c:storage_load() Loading /var/lib/connman/cellular_244919750451136_context1/settings connmand[2510]: src/service.c:connman_service_create() service 0x1cdb8d0 connmand[2510]: src/service.c:service_initialize() service 0x1cdb8d0 --cut-- Br, Pasi ________________________________________ From: connman [connman-boun...@connman.net] on behalf of Tomasz Bursztyka [tomasz.burszt...@linux.intel.com] Sent: Thursday, August 07, 2014 12:05 To: connman@connman.net Subject: [PATCH v2] device: Make sure the device is up and running before enabling it It can happen that, after a unproper ConnMan exit, a device is still up. Once ConnMan is restarted cleanup_devices() will put this device down. But then, it will never set it up again. 04:08:45 connmand[254]: src/device.c:__connman_device_init() 04:08:45 connmand[254]: src/inet.c:__connman_inet_get_address_netmask() index 2 04:08:45 connmand[254]: src/device.c:cleanup_devices() cleaning up wlan0 index 2 (...) 04:08:45 connmand[254]: wlan0 {newlink} index 2 operstate 2 <DOWN> (...) 04:08:45 connmand[254]: plugins/wifi.c:wifi_newlink() index 2 flags 36866 change 0 04:08:45 connmand[254]: src/technology.c:__connman_technology_add_device() device 0x35e8a8 type WiFi 04:08:45 connmand[254]: src/technology.c:technology_get() type 3 04:08:45 connmand[254]: src/technology.c:technology_find() type 3 04:08:45 connmand[254]: src/device.c:__connman_device_enable() device 0x35e8a8 Reported by Richard Röjfors <richard.rojf...@gmail.com> --- src/device.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/device.c b/src/device.c index a97d790..1a5f0e6 100644 --- a/src/device.c +++ b/src/device.c @@ -185,6 +185,10 @@ int __connman_device_enable(struct connman_device *device) if (device->powered_pending == PENDING_NONE && device->powered) return -EALREADY; + err = connman_inet_ifup(device->index); + if (err < 0 && err != -EALREADY) + return err; + device->powered_pending = PENDING_ENABLE; err = device->driver->enable(device); -- 1.8.5.5 _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman