mirror_ubuntu-kernels/drivers/thermal/intel/int340x_thermal
Sumeet Pawnikar 2685c77b80 thermal/drivers/int340x: Fix RFIM mailbox write commands
The existing mail mechanism only supports writing of workload types.

However, mailbox command for RFIM (cmd = 0x08) also requires write
operation which is ignored. This results in failing to store RFI
restriction.

Fixint this requires enhancing mailbox writes for non workload
commands too, so remove the check for MBOX_CMD_WORKLOAD_TYPE_WRITE
in mailbox write to allow this other write commands to be supoorted.

At the same time, however, we have to make sure that there is no
impact on read commands, by avoiding to write anything into the
mailbox data register.

To properly implement that, add two separate functions for mbox read
and write commands for the processor thermal workload command type.
This helps to distinguish the read and write workload command types
from each other while sending mbox commands.

Fixes: 5d6fbc96bd ("thermal/drivers/int340x: processor_thermal: Export additional attributes")
Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Cc: 5.14+ <stable@vger.kernel.org> # 5.14+
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-12-30 16:42:53 +01:00
..
acpi_thermal_rel.c thermal: int340x: Use struct_group() for memcpy() region 2021-11-24 14:31:56 +01:00
acpi_thermal_rel.h thermal: int340x: Use struct_group() for memcpy() region 2021-11-24 14:31:56 +01:00
int340x_thermal_zone.c thermal/drivers/intel: Initialize RW trip to THERMAL_TEMP_INVALID 2021-05-14 09:37:27 +02:00
int340x_thermal_zone.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
int3400_thermal.c thermal: int340x: delete bogus length check 2021-10-05 16:46:27 +02:00
int3401_thermal.c thermal/drivers/int340x: Improve the tcc offset saving for suspend/resume 2021-10-21 11:46:24 +02:00
int3402_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
int3403_thermal.c thermal: int340x: Support Alder Lake 2020-12-17 15:29:30 +01:00
int3406_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Kconfig thermal: int340x: Limit Kconfig to 64-bit 2021-11-16 20:16:35 +01:00
Makefile thermal/drivers/int340x/processor_thermal: Add PCI MMIO based thermal driver 2021-07-04 18:28:04 +02:00
processor_thermal_device_pci_legacy.c thermal/drivers/int340x: Improve the tcc offset saving for suspend/resume 2021-10-21 11:46:24 +02:00
processor_thermal_device_pci.c thermal/drivers/int340x: Improve the tcc offset saving for suspend/resume 2021-10-21 11:46:24 +02:00
processor_thermal_device.c thermal/drivers/int340x: Improve the tcc offset saving for suspend/resume 2021-10-21 11:46:24 +02:00
processor_thermal_device.h thermal/drivers/int340x: Fix RFIM mailbox write commands 2021-12-30 16:42:53 +01:00
processor_thermal_mbox.c thermal/drivers/int340x: Fix RFIM mailbox write commands 2021-12-30 16:42:53 +01:00
processor_thermal_rapl.c thermal: int340x: processor_thermal: Refactor MMIO interface 2020-12-10 12:29:47 +01:00
processor_thermal_rfim.c thermal/drivers/int340x: Fix RFIM mailbox write commands 2021-12-30 16:42:53 +01:00