usb: serial: csvt: Fix control signal definitions
The carrier detect and ring indicator control signals are defined
incorrectly. Fix it. The USB CDC specification did not define
CTS signal. Assume CTS is always high.
CRs-Fixed: 458326
Change-Id: Ie005261fe89f32fcdb145dd09dcc4bbfb4ce3fc1
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
diff --git a/drivers/usb/serial/csvt.c b/drivers/usb/serial/csvt.c
index 75fe9b8..2219eab 100644
--- a/drivers/usb/serial/csvt.c
+++ b/drivers/usb/serial/csvt.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -28,10 +28,14 @@
#define CSVT_CTRL_RTS 0x02
/* input control lines*/
-#define CSVT_CTRL_CTS 0x01
+#define CSVT_CTRL_CD 0x01
#define CSVT_CTRL_DSR 0x02
-#define CSVT_CTRL_RI 0x04
-#define CSVT_CTRL_CD 0x08
+#define CSVT_CTRL_BRK 0x04
+#define CSVT_CTRL_RI 0x08
+
+#define CSVT_CTRL_FRAMING 0x10
+#define CSVT_CTRL_PARITY 0x20
+#define CSVT_CTRL_OVERRUN 0x40
static int debug;
module_param(debug, int, S_IRUGO | S_IWUSR);
@@ -225,7 +229,7 @@
(dev->cbits_tolocal & CSVT_CTRL_DSR ? TIOCM_DSR : 0) |
(dev->cbits_tolocal & CSVT_CTRL_RI ? TIOCM_RI : 0) |
(dev->cbits_tolocal & CSVT_CTRL_CD ? TIOCM_CD : 0) |
- (dev->cbits_tolocal & CSVT_CTRL_CTS ? TIOCM_CTS : 0);
+ TIOCM_CTS; /* USB CDC spec did not define CTS control signal */
mutex_unlock(&dev->dev_lock);
dev_dbg(&port->dev, "%s -- %x", __func__, control_state);