greybus: interface: fix hot-unplug control-connection timeouts
authorJohan Hovold <johan@hovoldconsulting.com>
Tue, 15 Dec 2015 14:28:57 +0000 (15:28 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 15 Dec 2015 22:23:37 +0000 (14:23 -0800)
commit141af4f05435ac217b9e1fc8260b42e460997fb6
treed4b4d0b040b1162c3ae9180041c25ae0c67036a6
parentc634650ecc5b3db9ac4f1258387b87ff66386906
greybus: interface: fix hot-unplug control-connection timeouts

Set an interface disconnected flag when the interface has been
hot-unplugged (e.g. forcibly removed or after a reboot), and use it to
disable the control connection early when deregistering the interface
and its bundles.

This avoids a one-second (default) timeout for every enabled connection
(e.g. one per bundle) at hot-unplug, something which for the default
gpbridge manifest currently amounts to five seconds.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/interface.c
drivers/staging/greybus/interface.h
drivers/staging/greybus/svc.c