acpi_iicbus: Shift slave address

The address is expected to need shifting.
see https://uefi.org/specs/ACPI/6.5/13_System_Mgmt_Bus_Interface_Specification.html#smbus-slave-addresses

Reviewed by: imp, markj, Elliott Mitchell
Pull Request: https://github.com/freebsd/freebsd-src/pull/1125
This commit is contained in:
Ahmad Khalifa 2024-04-19 16:43:19 -06:00 committed by Warner Losh
parent 493715f9b8
commit 67677a654a

View file

@ -254,6 +254,9 @@ acpi_iicbus_space_handler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address,
sc = __containerof(info, struct acpi_iicbus_softc, space_handler_info);
dev = sc->super_sc.dev;
/* the address is expected to need shifting */
sb->SlaveAddress <<= 1;
switch (Function) {
case AML_FIELD_ATTRIO(AML_FIELD_ATTRIB_SEND_RECEIVE, ACPI_READ):
val = acpi_iicbus_recvb(dev, sb->SlaveAddress, gsb->data);