Re: wrong number of serial port detected

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

 



On Wed, Dec 07, 2005 at 06:03:02PM -0500, Dave Jones wrote:
> Ok, how about something along the lines of this (completely untested) patch,
> which adds a runtime param to lower the number of registered ports,
> also allowing a default to be set for common cases.
> 
> Would something like this be acceptable ?

Sure, looks fine.  The new parameter should probably be documented
though, so folk know about it.

> @@ -2653,6 +2657,9 @@ module_param(share_irqs, uint, 0644);
>  MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 devices"
>  	" (unsafe)");
>  
> +module_param(nr_uarts, uint, 0644);
> +MODULE_PARM_DESC(nr_uarts, "Maximum number of UARTs supported.");

Should this help string include the compile-time maximum somehow?

What limits it to the compile-time maximum?

> diff -urpN --exclude-from=/home/devel/davej/.exclude vanilla/drivers/serial/Kconfig linux-2.6.14/drivers/serial/Kconfig
> --- vanilla/drivers/serial/Kconfig	2005-12-07 17:56:56.000000000 -0500
> +++ linux-2.6.14/drivers/serial/Kconfig	2005-12-07 17:53:34.000000000 -0500
> @@ -95,6 +100,15 @@ config SERIAL_8250_NR_UARTS
>  	  PCI enumeration and any ports that may be added at run-time
>  	  via hot-plug, or any ISA multi-port serial cards.
>  
> +config SERIAL_8250_RUNTIME_UARTS
> +	int "Number of 8250/16550 serial ports to register at runtime"
> +	depends on SERIAL_8250
> +	default "4"

Can this be restricted to a range of 1 to SERIAL_8250_UARTS ?

> +	help
> +	  Set this to the maximum number of serial ports you want
> +	  the kernel to register at boot time.  This can be overriden
> +	  with the parameter "nr_uarts".

And should we also give a pointer to the boot-time parameter (which
I think will be 8250.nr_uarts ?)

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
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