diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2013-01-28 20:57:48 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-29 23:26:16 -0500 |
commit | 9883a7396b9cc36e27185f2da9f81f23f2ab67ae (patch) | |
tree | 880888715046dd0d5ccc39e8a937e3d17e090862 | |
parent | 3b1f315415d3e9b2648bec82c0c1cd9eff2d8743 (diff) |
staging/fwserial: Assume firmware is OHCI-complaint
Devices which are OHCI v1.0/ v1.1/ v1.2-draft compliant or
RFC 2734 compliant are required by specification to support
max_rec of 8 (512 bytes) or more. Accept reported value.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/fwserial/fwserial.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c index 815c01119583..59e90e666d7b 100644 --- a/drivers/staging/fwserial/fwserial.c +++ b/drivers/staging/fwserial/fwserial.c | |||
@@ -174,10 +174,15 @@ static void dump_profile(struct seq_file *m, struct stats *stats) | |||
174 | #define dump_profile(m, stats) | 174 | #define dump_profile(m, stats) |
175 | #endif | 175 | #endif |
176 | 176 | ||
177 | /* Returns the max receive packet size for the given node */ | 177 | /* |
178 | * Returns the max receive packet size for the given node | ||
179 | * Devices which are OHCI v1.0/ v1.1/ v1.2-draft or RFC 2734 compliant | ||
180 | * are required by specification to support max_rec of 8 (512 bytes) or more. | ||
181 | */ | ||
178 | static inline int device_max_receive(struct fw_device *fw_device) | 182 | static inline int device_max_receive(struct fw_device *fw_device) |
179 | { | 183 | { |
180 | return 1 << (clamp_t(int, fw_device->max_rec, 8U, 11U) + 1); | 184 | /* see IEEE 1394-2008 table 8-8 */ |
185 | return min(2 << fw_device->max_rec, 4096); | ||
181 | } | 186 | } |
182 | 187 | ||
183 | static void fwtty_log_tx_error(struct fwtty_port *port, int rcode) | 188 | static void fwtty_log_tx_error(struct fwtty_port *port, int rcode) |