Skip to content

Commit

Permalink
staging/fwserial: Assume firmware is OHCI-complaint
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Hurley authored and Greg Kroah-Hartman committed Jan 30, 2013
1 parent 3b1f315 commit 9883a73
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/staging/fwserial/fwserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9883a73

Please sign in to comment.