summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/es2.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-04-21 11:31:13 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-04-21 16:11:15 +0900
commita0f997bd5db42eb21d42f04d10cbe03f3fc4fa91 (patch)
tree823ab21262b73664636faf94752132f275682825 /drivers/staging/greybus/es2.c
parent36460e8a895d1f7209c5a0d7c6a87b2ecc68cc4c (diff)
downloadop-kernel-dev-a0f997bd5db42eb21d42f04d10cbe03f3fc4fa91.zip
op-kernel-dev-a0f997bd5db42eb21d42f04d10cbe03f3fc4fa91.tar.gz
greybus: es2: Allow proper release of greybus host device
The usb core disables the Interface prior to calling ->disconnect() for the usb driver. That disallows the es2 driver to remove the greybus host device and every entity below it in a clean way, as the greybus core may want to do few operations over the usb connection before getting removed. And so we see bunch of errors while we remove the es2 module, like: "urb cport in error -108 (dropped)" The usb core has a special per-driver flag, 'soft_unbind', for such usb drivers. If this flag is set by a driver, the usb core doesn't disable the Interface prior to calling ->disconnect(). Set that flag for es2. Tested by removing the gb-es2.ko module on both EVT1.5 and qemu with gbsim. The interface isn't disabled by the core and the driver is still able initiate greybus operations over the Interface. This can be properly tested only after the next patch which removes the greybus host device before disabling the urbs. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/es2.c')
-rw-r--r--drivers/staging/greybus/es2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c
index 9e06efb..0cc9fe6 100644
--- a/drivers/staging/greybus/es2.c
+++ b/drivers/staging/greybus/es2.c
@@ -1083,6 +1083,7 @@ static struct usb_driver es2_ap_driver = {
.probe = ap_probe,
.disconnect = ap_disconnect,
.id_table = id_table,
+ .soft_unbind = 1,
};
module_usb_driver(es2_ap_driver);
OpenPOWER on IntegriCloud