diff mbox

ACPI: Ignore the upper bits of SystemIO addresses

Message ID 1274206035-10571-1-git-send-email-mjg@redhat.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Matthew Garrett May 18, 2010, 6:07 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c
index e26c17d..ddfb4f1 100644
--- a/drivers/acpi/acpica/hwvalid.c
+++ b/drivers/acpi/acpica/hwvalid.c
@@ -146,15 +146,6 @@  acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
 								      last_address),
 			  byte_width));
 
-	/* Maximum 16-bit address in I/O space */
-
-	if (last_address > ACPI_UINT16_MAX) {
-		ACPI_ERROR((AE_INFO,
-			    "Illegal I/O port address/length above 64K: 0x%p/%X",
-			    ACPI_CAST_PTR(void, address), byte_width));
-		return_ACPI_STATUS(AE_LIMIT);
-	}
-
 	/* Exit if requested address is not within the protected port table */
 
 	if (address > acpi_protected_ports[ACPI_PORT_INFO_ENTRIES - 1].end) {
@@ -222,6 +213,10 @@  acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width)
 	u32 one_byte;
 	u32 i;
 
+	/* Windows only uses the lower 16 bits of an address. Emulate that */
+
+	address &= 0xffff;
+
 	/* Validate the entire request and perform the I/O */
 
 	status = acpi_hw_validate_io_request(address, width);
@@ -279,6 +274,10 @@  acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width)
 	acpi_status status;
 	u32 i;
 
+	/* Windows only uses the lower 16 bits of an address. Emulate that */
+
+	address &= 0xffff;
+
 	/* Validate the entire request and perform the I/O */
 
 	status = acpi_hw_validate_io_request(address, width);