aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cypress_m8.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-12-18 16:33:03 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:53:24 -0500
commitc312659c5ff1e54bac2d91e1ce1005d58784a7b5 (patch)
tree4f8bc4dad83ec6473d51f8ea950ce78ac82a22ad /drivers/usb/serial/cypress_m8.c
parent2805eb13c3b5be7bd6ec7380502bc054b570afd5 (diff)
USB: cypress_m8: allow unstable baud rates
I've got a crappy cypress converter here, and while running at higher baud rates craps out on throughput, it works fine with lower ones. While it'd be nice to simply use a lower baud rate, not all devices can be configured this way, and it is possible to (slowly) interact at higher rates by sending a byte at a time. So let people force higher rates when they need it via a module parameter. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/cypress_m8.c')
-rw-r--r--drivers/usb/serial/cypress_m8.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 47a18193abad..60c200230bc8 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -73,6 +73,7 @@
73static int debug; 73static int debug;
74static int stats; 74static int stats;
75static int interval; 75static int interval;
76static int unstable_bauds;
76 77
77/* 78/*
78 * Version Information 79 * Version Information
@@ -291,6 +292,9 @@ static int analyze_baud_rate(struct usb_serial_port *port, speed_t new_rate)
291 struct cypress_private *priv; 292 struct cypress_private *priv;
292 priv = usb_get_serial_port_data(port); 293 priv = usb_get_serial_port_data(port);
293 294
295 if (unstable_bauds)
296 return new_rate;
297
294 /* 298 /*
295 * The general purpose firmware for the Cypress M8 allows for 299 * The general purpose firmware for the Cypress M8 allows for
296 * a maximum speed of 57600bps (I have no idea whether DeLorme 300 * a maximum speed of 57600bps (I have no idea whether DeLorme
@@ -1643,3 +1647,5 @@ module_param(stats, bool, S_IRUGO | S_IWUSR);
1643MODULE_PARM_DESC(stats, "Enable statistics or not"); 1647MODULE_PARM_DESC(stats, "Enable statistics or not");
1644module_param(interval, int, S_IRUGO | S_IWUSR); 1648module_param(interval, int, S_IRUGO | S_IWUSR);
1645MODULE_PARM_DESC(interval, "Overrides interrupt interval"); 1649MODULE_PARM_DESC(interval, "Overrides interrupt interval");
1650module_param(unstable_bauds, bool, S_IRUGO | S_IWUSR);
1651MODULE_PARM_DESC(unstable_bauds, "Allow unstable baud rates");