Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging/fwserial: Add Kconfig options for max ports

Allow kernel configuration of max supported ports for
TTY-over-Firewire driver.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peter Hurley and committed by
Greg Kroah-Hartman
87a5a037 49bb8405

+22 -2
+20
drivers/staging/fwserial/Kconfig
··· 9 9 10 10 To compile this driver as a module, say M here: the module will 11 11 be called firewire-serial. 12 + 13 + if FIREWIRE_SERIAL 14 + 15 + config FWTTY_MAX_TOTAL_PORTS 16 + int "Maximum number of serial ports supported" 17 + default "64" 18 + help 19 + Set this to the maximum number of serial ports you want the 20 + firewire-serial driver to support. 21 + 22 + config FWTTY_MAX_CARD_PORTS 23 + int "Maximum number of serial ports supported per adapter" 24 + range 0 FWTTY_MAX_TOTAL_PORTS 25 + default "32" 26 + help 27 + Set this to the maximum number of serial ports each firewire 28 + adapter supports. The actual number of serial ports registered 29 + is set with the module parameter "ttys". 30 + 31 + endif
+2 -2
drivers/staging/fwserial/fwserial.h
··· 291 291 #define FREQ_BREAKS (HZ / 50) 292 292 293 293 /* Ports are allocated in blocks of num_ports for each fw_card */ 294 - #define MAX_CARD_PORTS 32 /* max # of ports per card */ 295 - #define MAX_TOTAL_PORTS 64 /* max # of ports total */ 294 + #define MAX_CARD_PORTS CONFIG_FWTTY_MAX_CARD_PORTS 295 + #define MAX_TOTAL_PORTS CONFIG_FWTTY_MAX_TOTAL_PORTS 296 296 297 297 /* tuning parameters */ 298 298 #define FWTTY_PORT_TXFIFO_LEN 4096