comgt hotplug mishandles "bind" event
Username: andres-h
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=2439
My 3g modem goes “unavailable” shortly after being plugged in. Even though the device /dev/ttyUSB* exists, “ifup” has no effect and “ifstatus” shows:
{
"up": false, "pending": false, "available": false, "autostart": true, "dynamic": false, "proto": "3g", "data": {
}, "errors": [ { "subsystem": "interface", "code": "NO_DEVICE" } ]
}
I found that this is caused by incorrect logic at
Namely, the “add” event is followed by “bind” event, which causes:
proto_set_available “$cfg” 0
And
BTW
, isn’t there a race condition with hotplug at
?