mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
greybus: svc: Set interface's hotplug attributes before using them
gb_svc_read_and_clear_module_boot_status() relies on the values of
ddbl1_manufacturer_id and ddbl1_product_id to distinguish between ES2
and ES3 chips, but those values are set for the interface structure only
after gb_svc_read_and_clear_module_boot_status() is called.
This makes ES2 module to fail with following errors:
greybus 1-2: Module not ready yet
greybus 1-svc: failed to clear boot status of interface 2: -19
Fix this by setting these values before calling
gb_svc_read_and_clear_module_boot_status().
Fixes: 51f1dc421b1f ("firmware and svc: detect the difference between ES2 and ES3 chips")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
72e53aed1d
commit
63d742b68a
1 changed files with 5 additions and 5 deletions
|
|
@ -425,6 +425,11 @@ static void gb_svc_process_intf_hotplug(struct gb_operation *operation)
|
|||
return;
|
||||
}
|
||||
|
||||
intf->ddbl1_manufacturer_id = le32_to_cpu(request->data.ddbl1_mfr_id);
|
||||
intf->ddbl1_product_id = le32_to_cpu(request->data.ddbl1_prod_id);
|
||||
intf->vendor_id = le32_to_cpu(request->data.ara_vend_id);
|
||||
intf->product_id = le32_to_cpu(request->data.ara_prod_id);
|
||||
|
||||
ret = gb_svc_read_and_clear_module_boot_status(intf);
|
||||
if (ret) {
|
||||
dev_err(&svc->dev, "failed to clear boot status of interface %u: %d\n",
|
||||
|
|
@ -432,11 +437,6 @@ static void gb_svc_process_intf_hotplug(struct gb_operation *operation)
|
|||
goto destroy_interface;
|
||||
}
|
||||
|
||||
intf->ddbl1_manufacturer_id = le32_to_cpu(request->data.ddbl1_mfr_id);
|
||||
intf->ddbl1_product_id = le32_to_cpu(request->data.ddbl1_prod_id);
|
||||
intf->vendor_id = le32_to_cpu(request->data.ara_vend_id);
|
||||
intf->product_id = le32_to_cpu(request->data.ara_prod_id);
|
||||
|
||||
/*
|
||||
* Create a device id for the interface:
|
||||
* - device id 0 (GB_DEVICE_ID_SVC) belongs to the SVC
|
||||
|
|
|
|||
Loading…
Reference in a new issue