summaryrefslogtreecommitdiffstats
path: root/drivers/staging/fwserial/fwserial.h
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-01-28 20:57:44 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-29 23:26:16 -0500
commit06b8f14dc2649ee12ff5194fc562d74353c8b4ba (patch)
tree3cf439b0e81b9ca00c58f30bcd5934760068a6d3 /drivers/staging/fwserial/fwserial.h
parentb360cb9726ce04480840e279150a907c21837334 (diff)
downloadlinux-06b8f14dc2649ee12ff5194fc562d74353c8b4ba.tar.bz2
staging/fwserial: Remove bandwidth limit logic
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. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fwserial/fwserial.h')
-rw-r--r--drivers/staging/fwserial/fwserial.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/staging/fwserial/fwserial.h b/drivers/staging/fwserial/fwserial.h
index caa1c1ea82d5..e157318cb7da 100644
--- a/drivers/staging/fwserial/fwserial.h
+++ b/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 */