Commit 9d317a5
platform/x86: hp-wmi: fix fan table parsing
For Victus S devices, the BIOS fan table header was being incorrectly
parsed as:
struct {
u8 unknown;
u8 num_entries;
}
The first field should be num_fans and the second should be unknown. It
is pure coincidence that interpreting an "unknown" field as "num_entries"
worked on multiple device, however for board 8D87 (in an upcoming patch),
this assumption fails, and the hp-wmi driver fails to load.
We fix this by correcting the header definition and compensating for
num_entries by parsing each entry of the fan table until an all-NULL row
is obtained, mirroring the behavior of OMEN Gaming Hub on Windows.
Fixes: 46be145 ("platform/x86: hp-wmi: add manual fan control for Victus S models")
Signed-off-by: Krishna Chomal <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>1 parent 92c36b6 commit 9d317a5
1 file changed
Lines changed: 33 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| 472 | + | |
472 | 473 | | |
473 | | - | |
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
479 | | - | |
| 479 | + | |
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
| |||
2563 | 2563 | | |
2564 | 2564 | | |
2565 | 2565 | | |
2566 | | - | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
2567 | 2569 | | |
2568 | 2570 | | |
2569 | 2571 | | |
| |||
2578 | 2580 | | |
2579 | 2581 | | |
2580 | 2582 | | |
2581 | | - | |
2582 | | - | |
2583 | | - | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
2584 | 2611 | | |
2585 | 2612 | | |
2586 | | - | |
2587 | | - | |
2588 | 2613 | | |
2589 | 2614 | | |
2590 | 2615 | | |
| |||
0 commit comments