mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 23:02:02 -04:00
Fix two typos from PR: 65694
1) In pci.c, we need to check the child device's state, not the parent device's state. 2) In acpi_pci.c, we have to run the power state change after the acpi method when the old_state is > new state, not the other way around. Submitted by: Dmitry Remesov PR: 65694
This commit is contained in:
parent
a606451bd2
commit
1c168bb710
2 changed files with 2 additions and 2 deletions
|
|
@ -207,7 +207,7 @@ acpi_pci_set_powerstate_method(device_t dev, device_t child, int state)
|
|||
acpi_state, device_get_nameunit(child),
|
||||
AcpiFormatException(status));
|
||||
}
|
||||
if (state > old_state)
|
||||
if (old_state > state)
|
||||
return (pci_set_powerstate_method(dev, child, state));
|
||||
else
|
||||
return (0);
|
||||
|
|
|
|||
|
|
@ -495,7 +495,7 @@ pci_set_powerstate_method(device_t dev, device_t child, int state)
|
|||
/*
|
||||
* Dx -> Dx is a nop always.
|
||||
*/
|
||||
if (pci_get_powerstate(dev) == state)
|
||||
if (pci_get_powerstate(child) == state)
|
||||
return (0);
|
||||
|
||||
if (cfg->pp.pp_cap != 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue