mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ACPI serial fix
@ 2003-10-08 18:41 Bjorn Helgaas
  2003-10-08 20:25 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Helgaas @ 2003-10-08 18:41 UTC (permalink / raw)
  To: Russell King; +Cc: linux-kernel

Here's another little fix for ACPI serial discovery in 2.6.

Intel 870 firmware reports an extra zero-length IO port range, which
is bogus, as far as I can tell.  Ignore it.

===== drivers/serial/8250_acpi.c 1.4 vs edited =====
--- 1.4/drivers/serial/8250_acpi.c	Mon Oct  6 15:57:02 2003
+++ edited/drivers/serial/8250_acpi.c	Wed Oct  8 12:36:31 2003
@@ -38,6 +38,11 @@
 static acpi_status acpi_serial_port(struct serial_struct *req,
 				    struct acpi_resource_io *io)
 {
+	if (!io->range_length) {
+		printk(KERN_ERR "%s: zero-length IO port range?\n", __FUNCTION__);
+		return AE_ERROR;
+	}
+
 	req->port = io->min_base_address;
 	req->io_type = SERIAL_IO_PORT;
 	return AE_OK;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI serial fix
  2003-10-08 18:41 [PATCH] ACPI serial fix Bjorn Helgaas
@ 2003-10-08 20:25 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2003-10-08 20:25 UTC (permalink / raw)
  To: Russell King; +Cc: linux-kernel

On Wednesday 08 October 2003 12:41 pm, Bjorn Helgaas wrote:
> Here's another little fix for ACPI serial discovery in 2.6.

Rats.  Ignore the previous patch and use this, which I've actually
tested with the next step (removal of all the stuff in asm-ia64/serial.h):

Intel 870 firmware reports an extra zero-length IO port range, which
is bogus, as far as I can tell.  Ignore it.

===== drivers/serial/8250_acpi.c 1.4 vs edited =====
--- 1.4/drivers/serial/8250_acpi.c	Mon Oct  6 15:57:02 2003
+++ edited/drivers/serial/8250_acpi.c	Wed Oct  8 14:12:46 2003
@@ -38,8 +38,11 @@
 static acpi_status acpi_serial_port(struct serial_struct *req,
 				    struct acpi_resource_io *io)
 {
-	req->port = io->min_base_address;
-	req->io_type = SERIAL_IO_PORT;
+	if (io->range_length) {
+		req->port = io->min_base_address;
+		req->io_type = SERIAL_IO_PORT;
+	} else
+		printk(KERN_ERR "%s: zero-length IO port range?\n", __FUNCTION__);
 	return AE_OK;
 }
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-08 20:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-08 18:41 [PATCH] ACPI serial fix Bjorn Helgaas
2003-10-08 20:25 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®