greybus: es1: create svc connection early enough
The svc connection needs to be ready before creating the URBs, otherwise the svc version request might come in before the AP was ready to parse them. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
4bc88276eb
commit
5a202efe63
|
@ -563,6 +563,12 @@ static int ap_probe(struct usb_interface *interface,
|
||||||
return PTR_ERR(hd);
|
return PTR_ERR(hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Initialize AP's greybus interface */
|
||||||
|
if (!gb_ap_svc_connection_create(hd)) {
|
||||||
|
retval = -EINVAL;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
es1 = hd_to_es1(hd);
|
es1 = hd_to_es1(hd);
|
||||||
es1->hd = hd;
|
es1->hd = hd;
|
||||||
es1->usb_intf = interface;
|
es1->usb_intf = interface;
|
||||||
|
@ -632,12 +638,6 @@ static int ap_probe(struct usb_interface *interface,
|
||||||
es1->cport_out_urb_busy[i] = false; /* just to be anal */
|
es1->cport_out_urb_busy[i] = false; /* just to be anal */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize AP's greybus interface */
|
|
||||||
if (!gb_ap_svc_connection_create(hd)) {
|
|
||||||
retval = -EINVAL;
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
apb1_log_enable_dentry = debugfs_create_file("apb1_log_enable",
|
apb1_log_enable_dentry = debugfs_create_file("apb1_log_enable",
|
||||||
(S_IWUSR | S_IRUGO),
|
(S_IWUSR | S_IRUGO),
|
||||||
gb_debugfs_get(), es1,
|
gb_debugfs_get(), es1,
|
||||||
|
|
|
@ -663,6 +663,12 @@ static int ap_probe(struct usb_interface *interface,
|
||||||
return PTR_ERR(hd);
|
return PTR_ERR(hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Initialize AP's greybus interface */
|
||||||
|
if (!gb_ap_svc_connection_create(hd)) {
|
||||||
|
retval = -EINVAL;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
es1 = hd_to_es1(hd);
|
es1 = hd_to_es1(hd);
|
||||||
es1->hd = hd;
|
es1->hd = hd;
|
||||||
es1->usb_intf = interface;
|
es1->usb_intf = interface;
|
||||||
|
@ -736,12 +742,6 @@ static int ap_probe(struct usb_interface *interface,
|
||||||
es1->cport_out_urb_busy[i] = false; /* just to be anal */
|
es1->cport_out_urb_busy[i] = false; /* just to be anal */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize AP's greybus interface */
|
|
||||||
if (!gb_ap_svc_connection_create(hd)) {
|
|
||||||
retval = -EINVAL;
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
apb1_log_enable_dentry = debugfs_create_file("apb1_log_enable",
|
apb1_log_enable_dentry = debugfs_create_file("apb1_log_enable",
|
||||||
(S_IWUSR | S_IRUGO),
|
(S_IWUSR | S_IRUGO),
|
||||||
gb_debugfs_get(), es1,
|
gb_debugfs_get(), es1,
|
||||||
|
|
Loading…
Reference in a new issue