Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Dec 2002 19:22:51 -0800 (PST)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 22647 for review
Message-ID:  <200212230322.gBN3MpPo084081@repoman.freebsd.org>

index | next in thread | raw e-mail

http://perforce.freebsd.org/chv.cgi?CH=22647

Change 22647 by marcel@marcel_nfs on 2002/12/22 19:22:20

	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 and consequently left us we sio(4) devices
	without I/O port AND without memory addresses.
	
	While here, remove redundant parenthesis and reindent the
	debug print.

Affected files ...

.. //depot/projects/ia64/sys/dev/acpica/acpi_resource.c#6 edit

Differences ...

==== //depot/projects/ia64/sys/dev/acpica/acpi_resource.c#6 (text+ko) ====

@@ -238,10 +238,10 @@
 				     "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 @@
 				     "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;
 	    }
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212230322.gBN3MpPo084081>