@@ -1907,7 +1926,14 @@ static int i3c_master_bus_init(struct i3c_master_controller *master)This looks wrong the previous patch adds unconditional call to i3c_master_add_spd_dev() and this patch makes it conditional. Can previous patch then cause a regression if applied without this one?
goto err_bus_cleanup;
}
- i3c_master_add_spd_dev(master, i3cboardinfo);
+ /*
+ * If the I3C slave on the bus is SPD device, then do not follow the regular
+ * DAA process. Also, as per SPD spec SETAASA is required for the bus discovery
+ * and sending RSTDAA and DISEC is considered as illegal. So skip the entire process
+ * if the jdec_spd flag has been identified from the BIOS.
+ */
+ if (master->jdec_spd)
+ return i3c_master_add_spd_dev(master, i3cboardinfo);
if (master->ops->set_speed) {
ret = master->ops->set_speed(master, I3C_OPEN_DRAIN_SLOW_SPEED);
@@ -2311,6 +2337,10 @@ static int i3c_acpi_configure_master(struct i3c_master_controller *master)
return -ENODEV;
}
+ status = acpi_evaluate_object(master->ahandle, "_STR", NULL, NULL);
+ if (ACPI_SUCCESS(status))
+ master->jdec_spd = true;
+