diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/pl2303.c | 18 |
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; |