aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/fwserial/fwserial.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/fwserial/fwserial.h b/drivers/staging/fwserial/fwserial.h
index e157318cb7da..953ece69c10d 100644
--- a/drivers/staging/fwserial/fwserial.h
+++ b/drivers/staging/fwserial/fwserial.h
@@ -377,8 +377,8 @@ static inline void fwtty_bind_console(struct fwtty_port *port,
377 */ 377 */
378static inline int link_speed_to_max_payload(unsigned speed) 378static inline int link_speed_to_max_payload(unsigned speed)
379{ 379{
380 speed = clamp(speed, (unsigned) SCODE_100, (unsigned) SCODE_800); 380 /* Max async payload is 4096 - see IEEE 1394-2008 tables 6-4, 16-18 */
381 return 1 << (speed + 9); 381 return min(512 << speed, 4096);
382} 382}
383 383
384#endif /* _FIREWIRE_FWSERIAL_H */ 384#endif /* _FIREWIRE_FWSERIAL_H */