From 0555cb987ae76b53dc19e33c308e747b43622741 Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Wed, 28 Nov 2012 14:51:23 -0500 Subject: staging/fwserial: Limit tx/rx to 1394-2008 spec maximum Per this conversation https://lkml.org/lkml/2012/11/27/587 limit the maximum transmission to the IEEE 1394-2008 specification maximum size of 4096 bytes for asynchronous packets. Signed-off-by: Peter Hurley Acked-by: Stefan Richter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/fwserial/fwserial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/fwserial/fwserial.c') diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c index 61ee29083b26..d03a7f57e8d4 100644 --- a/drivers/staging/fwserial/fwserial.c +++ b/drivers/staging/fwserial/fwserial.c @@ -179,7 +179,7 @@ static void dump_profile(struct seq_file *m, struct stats *stats) /* Returns the max receive packet size for the given card */ static inline int device_max_receive(struct fw_device *fw_device) { - return 1 << (clamp_t(int, fw_device->max_rec, 8U, 13U) + 1); + return 1 << (clamp_t(int, fw_device->max_rec, 8U, 11U) + 1); } static void fwtty_log_tx_error(struct fwtty_port *port, int rcode) -- cgit v1.2.3