aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/keyspan.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-04-08 12:16:06 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:55 -0400
commita5b6f60c5a30c494017c7a2d11c4067f90d3d0df (patch)
tree2f80d1a6c2655c5c12f40cafbc47516284934d42 /drivers/usb/serial/keyspan.c
parent441b62c1edb986827154768d89bbac0ba779984f (diff)
usb serial: more fixes and groundwork for tty changes
- If a termios change fails due to lack of memory we should copy the old settings back over as the device has not changed - Note various locking problems - kl5kusb105 had various remaining tty flag handling problems - Make safe_serial use tty_insert_flip_string not open coded loops - set termios speed properly in usb_serial Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/keyspan.c')
-rw-r--r--drivers/usb/serial/keyspan.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index 857c5312555a..0d122feb2b22 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -1187,6 +1187,7 @@ static int keyspan_write_room (struct usb_serial_port *port)
1187 p_priv = usb_get_serial_port_data(port); 1187 p_priv = usb_get_serial_port_data(port);
1188 d_details = p_priv->device_details; 1188 d_details = p_priv->device_details;
1189 1189
1190 /* FIXME: locking */
1190 if (d_details->msg_format == msg_usa90) 1191 if (d_details->msg_format == msg_usa90)
1191 data_len = 64; 1192 data_len = 64;
1192 else 1193 else
@@ -1203,13 +1204,13 @@ static int keyspan_write_room (struct usb_serial_port *port)
1203 if (this_urb->status != -EINPROGRESS) 1204 if (this_urb->status != -EINPROGRESS)
1204 return (data_len); 1205 return (data_len);
1205 } 1206 }
1206 return (0); 1207 return 0;
1207} 1208}
1208 1209
1209 1210
1210static int keyspan_chars_in_buffer (struct usb_serial_port *port) 1211static int keyspan_chars_in_buffer (struct usb_serial_port *port)
1211{ 1212{
1212 return (0); 1213 return 0;
1213} 1214}
1214 1215
1215 1216
@@ -1289,7 +1290,7 @@ static int keyspan_open (struct usb_serial_port *port, struct file *filp)
1289 //mdelay(100); 1290 //mdelay(100);
1290 //keyspan_set_termios(port, NULL); 1291 //keyspan_set_termios(port, NULL);
1291 1292
1292 return (0); 1293 return 0;
1293} 1294}
1294 1295
1295static inline void stop_urb(struct urb *urb) 1296static inline void stop_urb(struct urb *urb)
@@ -2006,7 +2007,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
2006 } 2007 }
2007#endif 2008#endif
2008 2009
2009 return (0); 2010 return 0;
2010} 2011}
2011 2012
2012static int keyspan_usa28_send_setup(struct usb_serial *serial, 2013static int keyspan_usa28_send_setup(struct usb_serial *serial,
@@ -2131,7 +2132,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
2131 } 2132 }
2132#endif 2133#endif
2133 2134
2134 return (0); 2135 return 0;
2135} 2136}
2136 2137
2137static int keyspan_usa49_send_setup(struct usb_serial *serial, 2138static int keyspan_usa49_send_setup(struct usb_serial *serial,
@@ -2317,7 +2318,7 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
2317 } 2318 }
2318#endif 2319#endif
2319 2320
2320 return (0); 2321 return 0;
2321} 2322}
2322 2323
2323static int keyspan_usa90_send_setup(struct usb_serial *serial, 2324static int keyspan_usa90_send_setup(struct usb_serial *serial,
@@ -2455,7 +2456,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
2455 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) { 2456 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
2456 dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err); 2457 dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
2457 } 2458 }
2458 return (0); 2459 return 0;
2459} 2460}
2460 2461
2461static int keyspan_usa67_send_setup(struct usb_serial *serial, 2462static int keyspan_usa67_send_setup(struct usb_serial *serial,
@@ -2603,7 +2604,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
2603 if (err != 0) 2604 if (err != 0)
2604 dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, 2605 dbg("%s - usb_submit_urb(setup) failed (%d)", __func__,
2605 err); 2606 err);
2606 return (0); 2607 return 0;
2607} 2608}
2608 2609
2609static void keyspan_send_setup(struct usb_serial_port *port, int reset_port) 2610static void keyspan_send_setup(struct usb_serial_port *port, int reset_port)
@@ -2696,7 +2697,7 @@ static int keyspan_startup (struct usb_serial *serial)
2696 err); 2697 err);
2697 } 2698 }
2698 2699
2699 return (0); 2700 return 0;
2700} 2701}
2701 2702
2702static void keyspan_shutdown (struct usb_serial *serial) 2703static void keyspan_shutdown (struct usb_serial *serial)