Fix a De Morgan bug: If we only expect a memory range OR an

I/O port range, then we should ignore a resource if it's NOT
a memory range AND NOT an I/O port range.
The OR in the condition caused us to ignore perfectly valid
memory addresses.

While here, remove redundant parenthesis and reindent the
debug print to avoid long lines.
This commit is contained in:
Marcel Moolenaar 2002-12-23 03:48:59 +00:00
parent dcedf26597
commit 991fcff585

View file

@ -238,10 +238,10 @@ acpi_parse_resources(device_t dev, ACPI_HANDLE handle, struct acpi_parse_resourc
"IO" : "Memory"));
break;
}
if ((res->Data.Address32.ResourceType != ACPI_MEMORY_RANGE) ||
(res->Data.Address32.ResourceType != ACPI_IO_RANGE)) {
ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES,
"ignored Address32 for non-memory, non-I/O\n"));
if (res->Data.Address32.ResourceType != ACPI_MEMORY_RANGE &&
res->Data.Address32.ResourceType != ACPI_IO_RANGE) {
ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES,
"ignored Address32 for non-memory, non-I/O\n"));
break;
}
@ -296,10 +296,10 @@ acpi_parse_resources(device_t dev, ACPI_HANDLE handle, struct acpi_parse_resourc
"IO" : "Memory"));
break;
}
if ((res->Data.Address16.ResourceType != ACPI_MEMORY_RANGE) ||
(res->Data.Address16.ResourceType != ACPI_IO_RANGE)) {
ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES,
"ignored Address16 for non-memory, non-I/O\n"));
if (res->Data.Address16.ResourceType != ACPI_MEMORY_RANGE &&
res->Data.Address16.ResourceType != ACPI_IO_RANGE) {
ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES,
"ignored Address16 for non-memory, non-I/O\n"));
break;
}