diff options
author | Jeffrey Carlyle <jcarlyle@google.com> | 2016-05-11 10:08:55 -0700 |
---|---|---|
committer | Jeffrey Carlyle <jcarlyle@google.com> | 2016-05-12 18:20:34 -0700 |
commit | 03fba180ae4cc3bad27bd792e53dbb7ed2a9f7e7 (patch) | |
tree | febbbf5d9efc36ea5264c25a39a54b3224a035a7 /drivers/staging/greybus/svc.c | |
parent | c77bac08eca8b7dff3f76662cc8d439c111b8d0f (diff) |
greybus: svc: support status in svc_intf_activate response
Update per Greybus spec. Status attribute added to activate
response to return more detailed information about errors during
activate. If the Greybus response is GB_OP_SUCCESS, the caller
must also check the status attribute in the response to determine
if any other errors occurred.
Testing done: along with matchine firmware change, verified that modules
were detected and enumerated as expected.
Signed-off-by: Jeffrey Carlyle <jcarlyle@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/staging/greybus/svc.c')
-rw-r--r-- | drivers/staging/greybus/svc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c index a98593c0a39b..3bdf778d6d5d 100644 --- a/drivers/staging/greybus/svc.c +++ b/drivers/staging/greybus/svc.c @@ -340,6 +340,11 @@ int gb_svc_intf_activate(struct gb_svc *svc, u8 intf_id, u8 *intf_type) SVC_INTF_ACTIVATE_TIMEOUT); if (ret < 0) return ret; + if (response.status != GB_SVC_OP_SUCCESS) { + dev_err(&svc->dev, "failed to activate interface %u: %u\n", + intf_id, response.status); + return -EREMOTEIO; + } *intf_type = response.intf_type; |