[patch] x86, serial: always probe for legacy COM ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew, if you drop
    revert-x86-serial-convert-legacy-com-ports-to-platform-devices.patch
and apply this, we should have the previous behavior.  I think the
conversion to platform devices is still worthwhile.  Obviously, I intend
this as 2.6.23 material.


Always probe for serial ports at legacy addresses, even if we have PNPBIOS
or ACPI that should tell us about those ports.

We have no reports yet of defective firmware that completely omits ports.
However, Sébastien Dugué <[email protected]> reported that the
NEC Express5800/120Lh with Phoenix BIOS 6.0.5N52, released 7/12/2005,
reports COM2 first, then COM1 in the ACPI namespace.

8250_pnp currently registers devices in namespace order.  On this machine,
that makes ttyS0=COM2 and ttyS1=COM1, the reverse of what we want.

Signed-off-by: Bjorn Helgaas <[email protected]>

Index: w/arch/i386/kernel/legacy_serial.c
===================================================================
--- w.orig/arch/i386/kernel/legacy_serial.c	2007-07-27 10:57:41.000000000 -0600
+++ w/arch/i386/kernel/legacy_serial.c	2007-07-27 10:58:03.000000000 -0600
@@ -11,7 +11,6 @@
  */
 #include <linux/module.h>
 #include <linux/init.h>
-#include <linux/pnp.h>
 #include <linux/serial_8250.h>
 
 /* Standard COM flags (except for COM4, because of the 8514 problem) */
@@ -48,15 +47,8 @@
 	},
 };
 
-static int force_legacy_probe;
-module_param_named(force, force_legacy_probe, bool, 0);
-MODULE_PARM_DESC(force, "Force legacy serial port probe");
-
 static int __init serial8250_x86_com_init(void)
 {
-	if (pnp_platform_devices && !force_legacy_probe)
-		return -ENODEV;
-
 	return platform_device_register(&x86_com_device);
 }
 
Index: w/Documentation/kernel-parameters.txt
===================================================================
--- w.orig/Documentation/kernel-parameters.txt	2007-07-27 10:58:12.000000000 -0600
+++ w/Documentation/kernel-parameters.txt	2007-07-27 10:58:19.000000000 -0600
@@ -859,11 +859,6 @@
 	lasi=		[HW,SCSI] PARISC LASI driver for the 53c700 chip
 			Format: addr:<io>,irq:<irq>
 
-	legacy_serial.force [HW,IA-32,X86-64]
-			Probe for COM ports at legacy addresses even
-			if PNPBIOS or ACPI should describe them.  This
-			is for working around firmware defects.
-
 	llsc*=		[IA64] See function print_params() in
 			arch/ia64/sn/kernel/llsc4.c.
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux