Commit 65f936f
platform/x86: hp-wmi: Use zero insize parameter only when supported
commit be9d73e ("platform/x86: hp-wmi: Fix 0x05 error code reported by
several WMI calls") and commit 12b19f1 ("platform/x86: hp-wmi: Fix
hp_wmi_read_int() reporting error (0x05)") cause ACPI BIOS Error (bug):
Attempt to CreateField of length zero (20211217/dsopcode-133) because of
the ACPI method HWMC, which unconditionally creates a Field of
size (insize*8) bits:
CreateField (Arg1, 0x80, (Local5 * 0x08), DAIN)
In cases where args->insize = 0, the Field size is 0, resulting in
an error.
Fix this by using zero insize only if 0x5 error code is returned
Tested on Omen 15 AMD (2020) board ID: 8786.
Fixes: be9d73e ("platform/x86: hp-wmi: Fix 0x05 error code reported by several WMI calls")
Signed-off-by: Bedant Patnaik <bedant.patnaik@gmail.com>
Tested-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/41be46743d21c78741232a47bbb5f1cdbcc3d21e.camel@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>1 parent dc6a6ab commit 65f936f
1 file changed
+15
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
| 224 | + | |
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
| |||
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
379 | | - | |
| 381 | + | |
380 | 382 | | |
381 | 383 | | |
382 | 384 | | |
| |||
412 | 414 | | |
413 | 415 | | |
414 | 416 | | |
415 | | - | |
| 417 | + | |
| 418 | + | |
416 | 419 | | |
417 | 420 | | |
418 | 421 | | |
| |||
499 | 502 | | |
500 | 503 | | |
501 | 504 | | |
502 | | - | |
| 505 | + | |
503 | 506 | | |
504 | 507 | | |
505 | 508 | | |
| |||
511 | 514 | | |
512 | 515 | | |
513 | 516 | | |
514 | | - | |
| 517 | + | |
515 | 518 | | |
516 | 519 | | |
517 | 520 | | |
| |||
522 | 525 | | |
523 | 526 | | |
524 | 527 | | |
525 | | - | |
| 528 | + | |
526 | 529 | | |
527 | 530 | | |
528 | 531 | | |
| |||
600 | 603 | | |
601 | 604 | | |
602 | 605 | | |
603 | | - | |
| 606 | + | |
604 | 607 | | |
605 | 608 | | |
606 | 609 | | |
| |||
1009 | 1012 | | |
1010 | 1013 | | |
1011 | 1014 | | |
1012 | | - | |
| 1015 | + | |
1013 | 1016 | | |
1014 | 1017 | | |
1015 | 1018 | | |
| |||
1485 | 1488 | | |
1486 | 1489 | | |
1487 | 1490 | | |
1488 | | - | |
| 1491 | + | |
1489 | 1492 | | |
1490 | 1493 | | |
1491 | 1494 | | |
1492 | 1495 | | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
1493 | 1500 | | |
1494 | 1501 | | |
1495 | 1502 | | |
| |||
0 commit comments