Skip to content

Commit eb5e56d

Browse files
committed
Merge tag 'platform-drivers-x86-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fixes from Ilpo Järvinen: "Fixes: - Fix ACPI notifier racing with itself (intel-vbtn) - Initialize local variable to cover a timeout corner case (intel/ifs) - WMI docs spelling New device IDs: - amd/{pmc,pmf}: AMD 1Ah model 60h series. - amd/pmf: SPS quirk support for ASUS ROG Ally X" * tag 'platform-drivers-x86-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86/intel/ifs: Initialize union ifs_status to zero platform/x86: msi-wmi-platform: Fix spelling mistakes platform/x86/amd/pmf: Add new ACPI ID AMDI0107 platform/x86/amd/pmc: Send OS_HINT command for new AMD platform platform/x86/amd: pmf: Add quirk for ROG Ally X platform/x86: intel-vbtn: Protect ACPI notify handler against recursion
2 parents b446a2d + 3114f77 commit eb5e56d

File tree

7 files changed

+27
-5
lines changed

7 files changed

+27
-5
lines changed

Documentation/wmi/devices/msi-wmi-platform.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,12 @@ data using the `bmfdec <https://github.com/pali/bmfdec>`_ utility:
130130

131131
Due to a peculiarity in how Windows handles the ``CreateByteField()`` ACPI operator (errors only
132132
happen when a invalid byte field is ultimately accessed), all methods require a 32 byte input
133-
buffer, even if the Binay MOF says otherwise.
133+
buffer, even if the Binary MOF says otherwise.
134134

135135
The input buffer contains a single byte to select the subfeature to be accessed and 31 bytes of
136136
input data, the meaning of which depends on the subfeature being accessed.
137137

138-
The output buffer contains a singe byte which signals success or failure (``0x00`` on failure)
138+
The output buffer contains a single byte which signals success or failure (``0x00`` on failure)
139139
and 31 bytes of output data, the meaning if which depends on the subfeature being accessed.
140140

141141
WMI method Get_EC()
@@ -147,7 +147,7 @@ data contains a flag byte and a 28 byte controller firmware version string.
147147
The first 4 bits of the flag byte contain the minor version of the embedded controller interface,
148148
with the next 2 bits containing the major version of the embedded controller interface.
149149

150-
The 7th bit signals if the embedded controller page chaged (exact meaning is unknown), and the
150+
The 7th bit signals if the embedded controller page changed (exact meaning is unknown), and the
151151
last bit signals if the platform is a Tigerlake platform.
152152

153153
The MSI software seems to only use this interface when the last bit is set.

drivers/platform/x86/amd/pmc/pmc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)
764764
case AMD_CPU_ID_CB:
765765
case AMD_CPU_ID_PS:
766766
case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
767+
case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT:
767768
return MSG_OS_HINT_RN;
768769
}
769770
return -EINVAL;
@@ -967,6 +968,7 @@ static const struct pci_device_id pmc_pci_ids[] = {
967968
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RV) },
968969
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_SP) },
969970
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_ROOT) },
971+
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_ROOT) },
970972
{ }
971973
};
972974

drivers/platform/x86/amd/pmc/pmc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ void amd_mp2_stb_deinit(struct amd_pmc_dev *dev);
6767
#define AMD_CPU_ID_PS 0x14E8
6868
#define AMD_CPU_ID_SP 0x14A4
6969
#define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507
70+
#define PCI_DEVICE_ID_AMD_1AH_M60H_ROOT 0x1122
7071
#define PCI_DEVICE_ID_AMD_MP2_STB 0x172c
7172

7273
#endif /* PMC_H */

drivers/platform/x86/amd/pmf/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#define AMD_CPU_ID_RMB 0x14b5
4242
#define AMD_CPU_ID_PS 0x14e8
4343
#define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507
44+
#define PCI_DEVICE_ID_AMD_1AH_M60H_ROOT 0x1122
4445

4546
#define PMF_MSG_DELAY_MIN_US 50
4647
#define RESPONSE_REGISTER_LOOP_MAX 20000
@@ -249,6 +250,7 @@ static const struct pci_device_id pmf_pci_ids[] = {
249250
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RMB) },
250251
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_PS) },
251252
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_ROOT) },
253+
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_ROOT) },
252254
{ }
253255
};
254256

@@ -382,6 +384,7 @@ static const struct acpi_device_id amd_pmf_acpi_ids[] = {
382384
{"AMDI0102", 0},
383385
{"AMDI0103", 0},
384386
{"AMDI0105", 0},
387+
{"AMDI0107", 0},
385388
{ }
386389
};
387390
MODULE_DEVICE_TABLE(acpi, amd_pmf_acpi_ids);

drivers/platform/x86/amd/pmf/pmf-quirks.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ static const struct dmi_system_id fwbug_list[] = {
2929
},
3030
.driver_data = &quirk_no_sps_bug,
3131
},
32+
{
33+
.ident = "ROG Ally X",
34+
.matches = {
35+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
36+
DMI_MATCH(DMI_PRODUCT_NAME, "RC72LA"),
37+
},
38+
.driver_data = &quirk_no_sps_bug,
39+
},
3240
{}
3341
};
3442

@@ -48,4 +56,3 @@ void amd_pmf_quirks_init(struct amd_pmf_dev *dev)
4856
dmi_id->ident);
4957
}
5058
}
51-

drivers/platform/x86/intel/ifs/runtest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ static int doscan(void *data)
221221
*/
222222
static void ifs_test_core(int cpu, struct device *dev)
223223
{
224+
union ifs_status status = {};
224225
union ifs_scan activate;
225-
union ifs_status status;
226226
unsigned long timeout;
227227
struct ifs_data *ifsd;
228228
int to_start, to_stop;

drivers/platform/x86/intel/vbtn.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
*/
88

99
#include <linux/acpi.h>
10+
#include <linux/cleanup.h>
1011
#include <linux/dmi.h>
1112
#include <linux/input.h>
1213
#include <linux/input/sparse-keymap.h>
1314
#include <linux/kernel.h>
1415
#include <linux/module.h>
16+
#include <linux/mutex.h>
1517
#include <linux/platform_device.h>
1618
#include <linux/suspend.h>
1719
#include "../dual_accel_detect.h"
@@ -66,6 +68,7 @@ static const struct key_entry intel_vbtn_switchmap[] = {
6668
};
6769

6870
struct intel_vbtn_priv {
71+
struct mutex mutex; /* Avoid notify_handler() racing with itself */
6972
struct input_dev *buttons_dev;
7073
struct input_dev *switches_dev;
7174
bool dual_accel;
@@ -155,6 +158,8 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)
155158
bool autorelease;
156159
int ret;
157160

161+
guard(mutex)(&priv->mutex);
162+
158163
if ((ke = sparse_keymap_entry_from_scancode(priv->buttons_dev, event))) {
159164
if (!priv->has_buttons) {
160165
dev_warn(&device->dev, "Warning: received 0x%02x button event on a device without buttons, please report this.\n",
@@ -290,6 +295,10 @@ static int intel_vbtn_probe(struct platform_device *device)
290295
return -ENOMEM;
291296
dev_set_drvdata(&device->dev, priv);
292297

298+
err = devm_mutex_init(&device->dev, &priv->mutex);
299+
if (err)
300+
return err;
301+
293302
priv->dual_accel = dual_accel;
294303
priv->has_buttons = has_buttons;
295304
priv->has_switches = has_switches;

0 commit comments

Comments
 (0)