Skip to content

Commit

Permalink
staging/fwserial: Add Kconfig options for max ports
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Hurley authored and Greg Kroah-Hartman committed Dec 9, 2013
1 parent 49bb840 commit 87a5a03
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions drivers/staging/fwserial/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,23 @@ config FIREWIRE_SERIAL

To compile this driver as a module, say M here: the module will
be called firewire-serial.

if FIREWIRE_SERIAL

config FWTTY_MAX_TOTAL_PORTS
int "Maximum number of serial ports supported"
default "64"
help
Set this to the maximum number of serial ports you want the
firewire-serial driver to support.

config FWTTY_MAX_CARD_PORTS
int "Maximum number of serial ports supported per adapter"
range 0 FWTTY_MAX_TOTAL_PORTS
default "32"
help
Set this to the maximum number of serial ports each firewire
adapter supports. The actual number of serial ports registered
is set with the module parameter "ttys".

endif
4 changes: 2 additions & 2 deletions drivers/staging/fwserial/fwserial.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ struct fwtty_port {
#define FREQ_BREAKS (HZ / 50)

/* Ports are allocated in blocks of num_ports for each fw_card */
#define MAX_CARD_PORTS 32 /* max # of ports per card */
#define MAX_TOTAL_PORTS 64 /* max # of ports total */
#define MAX_CARD_PORTS CONFIG_FWTTY_MAX_CARD_PORTS
#define MAX_TOTAL_PORTS CONFIG_FWTTY_MAX_TOTAL_PORTS

/* tuning parameters */
#define FWTTY_PORT_TXFIFO_LEN 4096
Expand Down

0 comments on commit 87a5a03

Please sign in to comment.