From 80c2891ad954dbf47618c6f777c6aecbf6085638 Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Mon, 28 Jan 2013 20:57:44 -0500 Subject: [PATCH] --- yaml --- r: 354275 b: refs/heads/master c: 06b8f14dc2649ee12ff5194fc562d74353c8b4ba h: refs/heads/master i: 354273: 4d35dcafdd45461a7f405f59211864764ac37d90 354271: e52b6ecd44e9ff4d15de28ddbc7c604b1ff78be0 v: v3 --- [refs] | 2 +- trunk/drivers/staging/fwserial/fwserial.c | 3 --- trunk/drivers/staging/fwserial/fwserial.h | 15 ++++++--------- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index bc6cd499eace..0d6358d22a55 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b360cb9726ce04480840e279150a907c21837334 +refs/heads/master: 06b8f14dc2649ee12ff5194fc562d74353c8b4ba diff --git a/trunk/drivers/staging/fwserial/fwserial.c b/trunk/drivers/staging/fwserial/fwserial.c index d03a7f57e8d4..01257381ab5c 100644 --- a/trunk/drivers/staging/fwserial/fwserial.c +++ b/trunk/drivers/staging/fwserial/fwserial.c @@ -40,12 +40,10 @@ static int num_ttys = 4; /* # of std ttys to create per fw_card */ /* - doubles as loopback port index */ static bool auto_connect = true; /* try to VIRT_CABLE to every peer */ static bool create_loop_dev = true; /* create a loopback device for each card */ -bool limit_bw; /* limit async bandwidth to 20% of max */ module_param_named(ttys, num_ttys, int, S_IRUGO | S_IWUSR); module_param_named(auto, auto_connect, bool, S_IRUGO | S_IWUSR); module_param_named(loop, create_loop_dev, bool, S_IRUGO | S_IWUSR); -module_param(limit_bw, bool, S_IRUGO | S_IWUSR); /* * Threshold below which the tty is woken for writing @@ -2940,4 +2938,3 @@ MODULE_DEVICE_TABLE(ieee1394, fwserial_id_table); MODULE_PARM_DESC(ttys, "Number of ttys to create for each local firewire node"); MODULE_PARM_DESC(auto, "Auto-connect a tty to each firewire node discovered"); MODULE_PARM_DESC(loop, "Create a loopback device, fwloop, with ttys"); -MODULE_PARM_DESC(limit_bw, "Limit bandwidth utilization to 20%."); diff --git a/trunk/drivers/staging/fwserial/fwserial.h b/trunk/drivers/staging/fwserial/fwserial.h index caa1c1ea82d5..e157318cb7da 100644 --- a/trunk/drivers/staging/fwserial/fwserial.h +++ b/trunk/drivers/staging/fwserial/fwserial.h @@ -351,7 +351,6 @@ struct fw_serial { #define TTY_DEV_NAME "fwtty" /* ttyFW was taken */ static const char tty_dev_name[] = TTY_DEV_NAME; static const char loop_dev_name[] = "fwloop"; -extern bool limit_bw; struct tty_driver *fwtty_driver; @@ -370,18 +369,16 @@ static inline void fwtty_bind_console(struct fwtty_port *port, /* * Returns the max send async payload size in bytes based on the unit device - * link speed - if set to limit bandwidth to max 20%, use lookup table + * link speed. Self-limiting asynchronous bandwidth (via reducing the payload) + * is not necessary and does not work, because + * 1) asynchronous traffic will absorb all available bandwidth (less that + * being used for isochronous traffic) + * 2) isochronous arbitration always wins. */ static inline int link_speed_to_max_payload(unsigned speed) { - static const int max_async[] = { 307, 614, 1229, 2458, }; - BUILD_BUG_ON(ARRAY_SIZE(max_async) - 1 != SCODE_800); - speed = clamp(speed, (unsigned) SCODE_100, (unsigned) SCODE_800); - if (limit_bw) - return max_async[speed]; - else - return 1 << (speed + 9); + return 1 << (speed + 9); } #endif /* _FIREWIRE_FWSERIAL_H */