Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'platform-drivers-x86-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Hans de Goede:
"Highlights:

- Fix hp-wmi regression on HP Omen laptops introduced in 5.18

- Several hardware-id additions

- A couple of other tiny fixes"

* tag 'platform-drivers-x86-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
platform/x86/intel: hid: Add Surface Go to VGBS allow list
platform/x86: hp-wmi: Use zero insize parameter only when supported
platform/x86: hp-wmi: Resolve WMI query failures on some devices
platform/x86: gigabyte-wmi: Add support for B450M DS3H-CF
platform/x86: gigabyte-wmi: Add Z690M AORUS ELITE AX DDR4 support
platform/x86: barco-p50-gpio: Add check for platform_driver_register
platform/x86/intel: pmc: Support Intel Raptorlake P
platform/x86/intel: Fix pmt_crashlog array reference
platform/mellanox: Add static in struct declaration.
platform/mellanox: Spelling s/platfom/platform/

+35 -14
+1 -1
drivers/platform/mellanox/Kconfig
··· 85 85 depends on I2C 86 86 depends on REGMAP_I2C 87 87 help 88 - This driver provides support for the Nvidia SN2201 platfom. 88 + This driver provides support for the Nvidia SN2201 platform. 89 89 The SN2201 is a highly integrated for one rack unit system with 90 90 L3 management switches. It has 48 x 1Gbps RJ45 + 4 x 100G QSFP28 91 91 ports in a compact 1RU form factor. The system also including a
+1 -1
drivers/platform/mellanox/nvsw-sn2201.c
··· 326 326 }; 327 327 328 328 /* SN2201 I2C platform data. */ 329 - struct mlxreg_core_hotplug_platform_data nvsw_sn2201_i2c_data = { 329 + static struct mlxreg_core_hotplug_platform_data nvsw_sn2201_i2c_data = { 330 330 .irq = NVSW_SN2201_CPLD_SYSIRQ, 331 331 }; 332 332
+4 -1
drivers/platform/x86/barco-p50-gpio.c
··· 405 405 static int __init p50_module_init(void) 406 406 { 407 407 struct resource res = DEFINE_RES_IO(P50_GPIO_IO_PORT_BASE, P50_PORT_CMD + 1); 408 + int ret; 408 409 409 410 if (!dmi_first_match(dmi_ids)) 410 411 return -ENODEV; 411 412 412 - platform_driver_register(&p50_gpio_driver); 413 + ret = platform_driver_register(&p50_gpio_driver); 414 + if (ret) 415 + return ret; 413 416 414 417 gpio_pdev = platform_device_register_simple(DRIVER_NAME, PLATFORM_DEVID_NONE, &res, 1); 415 418 if (IS_ERR(gpio_pdev)) {
+2
drivers/platform/x86/gigabyte-wmi.c
··· 140 140 }} 141 141 142 142 static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = { 143 + DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B450M DS3H-CF"), 143 144 DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B450M S2H V2"), 144 145 DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550 AORUS ELITE AX V2"), 145 146 DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550 AORUS ELITE"), ··· 157 156 DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 GAMING X"), 158 157 DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 I AORUS PRO WIFI"), 159 158 DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 UD"), 159 + DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("Z690M AORUS ELITE AX DDR4"), 160 160 { } 161 161 }; 162 162
+19 -10
drivers/platform/x86/hp-wmi.c
··· 38 38 #define HPWMI_EVENT_GUID "95F24279-4D7B-4334-9387-ACCDC67EF61C" 39 39 #define HPWMI_BIOS_GUID "5FB7F034-2C63-45e9-BE91-3D44E2C707E4" 40 40 #define HP_OMEN_EC_THERMAL_PROFILE_OFFSET 0x95 41 + #define zero_if_sup(tmp) (zero_insize_support?0:sizeof(tmp)) // use when zero insize is required 41 42 42 43 /* DMI board names of devices that should use the omen specific path for 43 44 * thermal profiles. ··· 221 220 static struct platform_device *hp_wmi_platform_dev; 222 221 static struct platform_profile_handler platform_profile_handler; 223 222 static bool platform_profile_support; 223 + static bool zero_insize_support; 224 224 225 225 static struct rfkill *wifi_rfkill; 226 226 static struct rfkill *bluetooth_rfkill; ··· 292 290 struct bios_return *bios_return; 293 291 union acpi_object *obj = NULL; 294 292 struct bios_args *args = NULL; 295 - int mid, actual_outsize, ret; 293 + int mid, actual_insize, actual_outsize; 296 294 size_t bios_args_size; 295 + int ret; 297 296 298 297 mid = encode_outsize_for_pvsz(outsize); 299 298 if (WARN_ON(mid < 0)) 300 299 return mid; 301 300 302 - bios_args_size = struct_size(args, data, insize); 301 + actual_insize = max(insize, 128); 302 + bios_args_size = struct_size(args, data, actual_insize); 303 303 args = kmalloc(bios_args_size, GFP_KERNEL); 304 304 if (!args) 305 305 return -ENOMEM; ··· 378 374 int val = 0, ret; 379 375 380 376 ret = hp_wmi_perform_query(query, HPWMI_READ, &val, 381 - 0, sizeof(val)); 377 + zero_if_sup(val), sizeof(val)); 382 378 383 379 if (ret) 384 380 return ret < 0 ? ret : -EINVAL; ··· 414 410 return -ENODEV; 415 411 416 412 ret = hp_wmi_perform_query(HPWMI_SYSTEM_DEVICE_MODE, HPWMI_READ, 417 - system_device_mode, 0, sizeof(system_device_mode)); 413 + system_device_mode, zero_if_sup(system_device_mode), 414 + sizeof(system_device_mode)); 418 415 if (ret < 0) 419 416 return ret; 420 417 ··· 502 497 int val = 0, ret; 503 498 504 499 ret = hp_wmi_perform_query(HPWMI_FAN_SPEED_MAX_GET_QUERY, HPWMI_GM, 505 - &val, 0, sizeof(val)); 500 + &val, zero_if_sup(val), sizeof(val)); 506 501 507 502 if (ret) 508 503 return ret < 0 ? ret : -EINVAL; ··· 514 509 { 515 510 int state = 0; 516 511 int ret = hp_wmi_perform_query(HPWMI_FEATURE_QUERY, HPWMI_READ, &state, 517 - 0, sizeof(state)); 512 + zero_if_sup(state), sizeof(state)); 518 513 if (!ret) 519 514 return 1; 520 515 ··· 525 520 { 526 521 u8 state[128]; 527 522 int ret = hp_wmi_perform_query(HPWMI_FEATURE2_QUERY, HPWMI_READ, &state, 528 - 0, sizeof(state)); 523 + zero_if_sup(state), sizeof(state)); 529 524 if (!ret) 530 525 return 1; 531 526 ··· 603 598 int err, i; 604 599 605 600 err = hp_wmi_perform_query(HPWMI_WIRELESS2_QUERY, HPWMI_READ, &state, 606 - 0, sizeof(state)); 601 + zero_if_sup(state), sizeof(state)); 607 602 if (err) 608 603 return err; 609 604 ··· 1012 1007 int err, i; 1013 1008 1014 1009 err = hp_wmi_perform_query(HPWMI_WIRELESS2_QUERY, HPWMI_READ, &state, 1015 - 0, sizeof(state)); 1010 + zero_if_sup(state), sizeof(state)); 1016 1011 if (err) 1017 1012 return err < 0 ? err : -EINVAL; 1018 1013 ··· 1488 1483 { 1489 1484 int event_capable = wmi_has_guid(HPWMI_EVENT_GUID); 1490 1485 int bios_capable = wmi_has_guid(HPWMI_BIOS_GUID); 1491 - int err; 1486 + int err, tmp = 0; 1492 1487 1493 1488 if (!bios_capable && !event_capable) 1494 1489 return -ENODEV; 1490 + 1491 + if (hp_wmi_perform_query(HPWMI_HARDWARE_QUERY, HPWMI_READ, &tmp, 1492 + sizeof(tmp), sizeof(tmp)) == HPWMI_RET_INVALID_PARAMETERS) 1493 + zero_insize_support = true; 1495 1494 1496 1495 if (event_capable) { 1497 1496 err = hp_wmi_input_setup();
+6
drivers/platform/x86/intel/hid.c
··· 122 122 DMI_MATCH(DMI_PRODUCT_NAME, "HP Spectre x360 Convertible 15-df0xxx"), 123 123 }, 124 124 }, 125 + { 126 + .matches = { 127 + DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), 128 + DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go"), 129 + }, 130 + }, 125 131 { } 126 132 }; 127 133
+1
drivers/platform/x86/intel/pmc/core.c
··· 1912 1912 X86_MATCH_INTEL_FAM6_MODEL(ROCKETLAKE, &tgl_reg_map), 1913 1913 X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, &tgl_reg_map), 1914 1914 X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, &adl_reg_map), 1915 + X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &tgl_reg_map), 1915 1916 {} 1916 1917 }; 1917 1918
+1 -1
drivers/platform/x86/intel/pmt/crashlog.c
··· 282 282 auxiliary_set_drvdata(auxdev, priv); 283 283 284 284 for (i = 0; i < intel_vsec_dev->num_resources; i++) { 285 - struct intel_pmt_entry *entry = &priv->entry[i].entry; 285 + struct intel_pmt_entry *entry = &priv->entry[priv->num_entries].entry; 286 286 287 287 ret = intel_pmt_dev_create(entry, &pmt_crashlog_ns, intel_vsec_dev, i); 288 288 if (ret < 0)