linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux1394-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org,
	Peter Hurley <peter@hurleysoftware.com>
Subject: [PATCH v2 5/6] staging/fwserial: Assume firmware is OHCI-complaint
Date: Sat, 15 Dec 2012 01:03:19 -0500	[thread overview]
Message-ID: <1355551400-8204-6-git-send-email-peter@hurleysoftware.com> (raw)
In-Reply-To: <1355551400-8204-1-git-send-email-peter@hurleysoftware.com>

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>
---
 drivers/staging/fwserial/fwserial.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
index db1378d..59e90e6 100644
--- a/drivers/staging/fwserial/fwserial.c
+++ b/drivers/staging/fwserial/fwserial.c
@@ -174,11 +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)
 {
 	/* see IEEE 1394-2008 table 8-8 */
-	return 1 <<  (clamp_t(int, fw_device->max_rec, 8U, 11U) + 1);
+	return min(2 << fw_device->max_rec, 4096);
 }
 
 static void fwtty_log_tx_error(struct fwtty_port *port, int rcode)
-- 
1.8.0.1


  parent reply	other threads:[~2012-12-15  6:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-15  6:03 [PATCH v2 0/5] staging/fwserial: Address reviewer comments Peter Hurley
2012-12-15  6:03 ` [PATCH v2 1/6] staging/fwserial: Refine Kconfig help text Peter Hurley
2012-12-15  6:03 ` [PATCH v2 2/6] staging/fwserial: Remove bandwidth limit logic Peter Hurley
2012-12-15  6:03 ` [PATCH v2 3/6] staging/fwserial: Limit tx/rx to 1394-2008 spec maximum Peter Hurley
2012-12-15  6:03 ` [PATCH v2 4/6] staging/fwserial: Update TODO file per reviewer comments Peter Hurley
2012-12-15  6:03 ` Peter Hurley [this message]
2012-12-15  6:03 ` [PATCH v2 6/6] staging/fwserial: Drop suggestion for helper fn integration Peter Hurley
2012-12-15 12:34   ` Stefan Richter
2012-12-15 16:09     ` Stefan Richter
2013-01-07 23:22 ` [PATCH v2 0/5] staging/fwserial: Address reviewer comments Greg Kroah-Hartman
2013-01-08 14:59   ` Peter Hurley
2013-01-29  1:57   ` [PATCH v3 0/6] " Peter Hurley
2013-01-29  1:57     ` [PATCH v3 1/6] staging/fwserial: Remove bandwidth limit logic Peter Hurley
2013-01-29  1:57     ` [PATCH v3 2/6] staging/fwserial: Refer to fw_device as "node" Peter Hurley
2013-01-29  1:57     ` [PATCH v3 3/6] staging/fwserial: Simplify max payload calculation Peter Hurley
2013-01-29  1:57     ` [PATCH v3 4/6] staging/fwserial: Fold constant MAX_ASYNC_PAYLOAD Peter Hurley
2013-01-29  1:57     ` [PATCH v3 5/6] staging/fwserial: Assume firmware is OHCI-complaint Peter Hurley
2013-01-29  1:57     ` [PATCH v3 6/6] staging/fwserial: Drop suggestion for helper fn integration Peter Hurley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1355551400-8204-6-git-send-email-peter@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=stefanr@s5r6.in-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).