aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/pl2303.c
diff options
context:
space:
mode:
authorFrank Schaefer <schaefer.frank@gmx.net>2009-08-18 14:31:11 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-23 09:46:36 -0400
commit6dd81b45fd7628f3eb308f387aee696366718f25 (patch)
treee9473229dd5af7fc40b167f04c346c8171366118 /drivers/usb/serial/pl2303.c
parent25b8286805e856c8c7fda127018e31032c918015 (diff)
USB-serial: pl2303: add space/mark parity
The device supports it, so why not use it ? Works fine ! Signed-off-by: Frank Schaefer <schaefer.frank@gmx.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/pl2303.c')
-rw-r--r--drivers/usb/serial/pl2303.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 82055b07e02c..6ed33c7e53e2 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -636,11 +636,21 @@ static void pl2303_set_termios(struct tty_struct *tty,
636 /* For reference buf[5]=3 is mark parity */ 636 /* For reference buf[5]=3 is mark parity */
637 /* For reference buf[5]=4 is space parity */ 637 /* For reference buf[5]=4 is space parity */
638 if (cflag & PARODD) { 638 if (cflag & PARODD) {
639 buf[5] = 1; 639 if (cflag & CMSPAR) {
640 dbg("%s - parity = odd", __func__); 640 buf[5] = 3;
641 dbg("%s - parity = mark", __func__);
642 } else {
643 buf[5] = 1;
644 dbg("%s - parity = odd", __func__);
645 }
641 } else { 646 } else {
642 buf[5] = 2; 647 if (cflag & CMSPAR) {
643 dbg("%s - parity = even", __func__); 648 buf[5] = 4;
649 dbg("%s - parity = space", __func__);
650 } else {
651 buf[5] = 2;
652 dbg("%s - parity = even", __func__);
653 }
644 } 654 }
645 } else { 655 } else {
646 buf[5] = 0; 656 buf[5] = 0;