diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2013-01-29 01:57:44 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-30 04:26:16 (GMT) |
commit | 06b8f14dc2649ee12ff5194fc562d74353c8b4ba (patch) | |
tree | 3cf439b0e81b9ca00c58f30bcd5934760068a6d3 /drivers/staging/fwserial/fwserial.h | |
parent | b360cb9726ce04480840e279150a907c21837334 (diff) | |
download | linux-06b8f14dc2649ee12ff5194fc562d74353c8b4ba.tar.xz |
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.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/staging/fwserial/fwserial.h b/drivers/staging/fwserial/fwserial.h index caa1c1e..e157318 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 */ |