From d6fa0057ed35c24198d0e621997ad09bd883db79 Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Mon, 28 Jan 2013 20:57:48 -0500 Subject: [PATCH] --- yaml --- r: 354279 b: refs/heads/master c: 9883a7396b9cc36e27185f2da9f81f23f2ab67ae h: refs/heads/master i: 354277: 92edeebcbdb4da0d63f984dd3e13ac1be4a2ddae 354275: 80c2891ad954dbf47618c6f777c6aecbf6085638 354271: e52b6ecd44e9ff4d15de28ddbc7c604b1ff78be0 v: v3 --- [refs] | 2 +- trunk/drivers/staging/fwserial/fwserial.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index bee38b40e7a4..65e86b2e31fa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3b1f315415d3e9b2648bec82c0c1cd9eff2d8743 +refs/heads/master: 9883a7396b9cc36e27185f2da9f81f23f2ab67ae diff --git a/trunk/drivers/staging/fwserial/fwserial.c b/trunk/drivers/staging/fwserial/fwserial.c index 815c01119583..59e90e666d7b 100644 --- a/trunk/drivers/staging/fwserial/fwserial.c +++ b/trunk/drivers/staging/fwserial/fwserial.c @@ -174,10 +174,15 @@ static void dump_profile(struct seq_file *m, struct stats *stats) #define dump_profile(m, stats) #endif -/* Returns the max receive packet size for the given node */ +/* + * Returns the max receive packet size for the given node + * Devices which are OHCI v1.0/ v1.1/ v1.2-draft or RFC 2734 compliant + * are required by specification to support max_rec of 8 (512 bytes) or more. + */ static inline int device_max_receive(struct fw_device *fw_device) { - return 1 << (clamp_t(int, fw_device->max_rec, 8U, 11U) + 1); + /* see IEEE 1394-2008 table 8-8 */ + return min(2 << fw_device->max_rec, 4096); } static void fwtty_log_tx_error(struct fwtty_port *port, int rcode)