greybus: set route before sending packets
The route for a connection needs to be set *before* we initialize the connection. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
Родитель
8a9bf8a996
Коммит
65e50f95f1
|
@ -130,13 +130,21 @@ gb_module_interface_init(struct gb_module *gmod, u8 interface_id, u8 device_id)
|
|||
interface_id);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
ret = svc_set_route_send(interface, gmod->hd);
|
||||
if (ret) {
|
||||
dev_err(gmod->hd->parent, "failed to set route (%d)\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = gb_interface_connections_init(interface);
|
||||
if (ret) {
|
||||
dev_err(gmod->hd->parent, "module interface init error %d\n",
|
||||
ret);
|
||||
/* XXX clear route */
|
||||
return ret;
|
||||
}
|
||||
interface->device_id = device_id;
|
||||
|
||||
return svc_set_route_send(interface, gmod->hd);
|
||||
return 0;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче