cp210x.c (9034389cd81681b4f0123173eb836624199209c7) | cp210x.c (ab5701ada2473b111c24ca7f4360b0cdb5badb60) |
---|---|
1/* 2 * Silicon Laboratories CP210x USB to RS232 serial adaptor driver 3 * 4 * Copyright (C) 2005 Craig Shelley (craig@microtron.org.uk) 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License version 8 * 2 as published by the Free Software Foundation. --- 981 unchanged lines hidden (view full) --- 990 991 cp210x_read_reg_block(port, CP210X_GET_FLOW, &flow_ctl, 992 sizeof(flow_ctl)); 993 ctl_hs = le32_to_cpu(flow_ctl.ulControlHandshake); 994 flow_repl = le32_to_cpu(flow_ctl.ulFlowReplace); 995 dev_dbg(dev, "%s - read ulControlHandshake=0x%08x, ulFlowReplace=0x%08x\n", 996 __func__, ctl_hs, flow_repl); 997 | 1/* 2 * Silicon Laboratories CP210x USB to RS232 serial adaptor driver 3 * 4 * Copyright (C) 2005 Craig Shelley (craig@microtron.org.uk) 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License version 8 * 2 as published by the Free Software Foundation. --- 981 unchanged lines hidden (view full) --- 990 991 cp210x_read_reg_block(port, CP210X_GET_FLOW, &flow_ctl, 992 sizeof(flow_ctl)); 993 ctl_hs = le32_to_cpu(flow_ctl.ulControlHandshake); 994 flow_repl = le32_to_cpu(flow_ctl.ulFlowReplace); 995 dev_dbg(dev, "%s - read ulControlHandshake=0x%08x, ulFlowReplace=0x%08x\n", 996 __func__, ctl_hs, flow_repl); 997 |
998 ctl_hs &= ~CP210X_SERIAL_DSR_HANDSHAKE; 999 ctl_hs &= ~CP210X_SERIAL_DCD_HANDSHAKE; 1000 ctl_hs &= ~CP210X_SERIAL_DSR_SENSITIVITY; 1001 ctl_hs &= ~CP210X_SERIAL_DTR_MASK; 1002 ctl_hs |= CP210X_SERIAL_DTR_SHIFT(CP210X_SERIAL_DTR_ACTIVE); |
|
998 if (cflag & CRTSCTS) { | 1003 if (cflag & CRTSCTS) { |
999 ctl_hs &= ~(CP210X_SERIAL_DTR_MASK | 1000 CP210X_SERIAL_CTS_HANDSHAKE | 1001 CP210X_SERIAL_DSR_HANDSHAKE | 1002 CP210X_SERIAL_DCD_HANDSHAKE | 1003 CP210X_SERIAL_DSR_SENSITIVITY); 1004 ctl_hs |= CP210X_SERIAL_DTR_SHIFT( 1005 CP210X_SERIAL_DTR_ACTIVE); | |
1006 ctl_hs |= CP210X_SERIAL_CTS_HANDSHAKE; | 1004 ctl_hs |= CP210X_SERIAL_CTS_HANDSHAKE; |
1007 /* 1008 * FIXME: Why clear bits unrelated to flow control. 1009 * Why clear CP210X_SERIAL_XOFF_CONTINUE which is 1010 * never set 1011 */ 1012 flow_repl = 0; | 1005 1006 flow_repl &= ~CP210X_SERIAL_RTS_MASK; |
1013 flow_repl |= CP210X_SERIAL_RTS_SHIFT( 1014 CP210X_SERIAL_RTS_FLOW_CTL); 1015 dev_dbg(dev, "%s - flow control = CRTSCTS\n", __func__); 1016 } else { | 1007 flow_repl |= CP210X_SERIAL_RTS_SHIFT( 1008 CP210X_SERIAL_RTS_FLOW_CTL); 1009 dev_dbg(dev, "%s - flow control = CRTSCTS\n", __func__); 1010 } else { |
1017 ctl_hs &= ~(CP210X_SERIAL_DTR_MASK | 1018 CP210X_SERIAL_CTS_HANDSHAKE | 1019 CP210X_SERIAL_DSR_HANDSHAKE | 1020 CP210X_SERIAL_DCD_HANDSHAKE | 1021 CP210X_SERIAL_DSR_SENSITIVITY); 1022 ctl_hs |= CP210X_SERIAL_DTR_SHIFT( 1023 CP210X_SERIAL_DTR_ACTIVE); 1024 /* FIXME: Why clear bits unrelated to flow control */ 1025 flow_repl &= 0xffffff00; | 1011 ctl_hs &= ~CP210X_SERIAL_CTS_HANDSHAKE; 1012 1013 flow_repl &= ~CP210X_SERIAL_RTS_MASK; |
1026 flow_repl |= CP210X_SERIAL_RTS_SHIFT( 1027 CP210X_SERIAL_RTS_ACTIVE); 1028 dev_dbg(dev, "%s - flow control = NONE\n", __func__); 1029 } 1030 1031 dev_dbg(dev, "%s - write ulControlHandshake=0x%08x, ulFlowReplace=0x%08x\n", 1032 __func__, ctl_hs, flow_repl); 1033 flow_ctl.ulControlHandshake = cpu_to_le32(ctl_hs); --- 122 unchanged lines hidden --- | 1014 flow_repl |= CP210X_SERIAL_RTS_SHIFT( 1015 CP210X_SERIAL_RTS_ACTIVE); 1016 dev_dbg(dev, "%s - flow control = NONE\n", __func__); 1017 } 1018 1019 dev_dbg(dev, "%s - write ulControlHandshake=0x%08x, ulFlowReplace=0x%08x\n", 1020 __func__, ctl_hs, flow_repl); 1021 flow_ctl.ulControlHandshake = cpu_to_le32(ctl_hs); --- 122 unchanged lines hidden --- |