aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/synclinkmp.c
diff options
context:
space:
mode:
authorPaul Fulghum <paulkf@microgate.com>2005-09-09 16:02:14 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:57:34 -0400
commit7f3edb94564d319cd58cc11c2c986b7ec25643d8 (patch)
tree1ef438c316129461192c44abc9618bb631a56f04 /drivers/char/synclinkmp.c
parent7c1fff58cfaaf1c4b6a31a569e18cb7d2d8db0a6 (diff)
[PATCH] synclinkmp.c: fix double mapping of signals
Serial signals were incorrectly mapped twice to events. Signed-off-by: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/synclinkmp.c')
-rw-r--r--drivers/char/synclinkmp.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
index 8982eafd0fb7..1bde04d66cde 100644
--- a/drivers/char/synclinkmp.c
+++ b/drivers/char/synclinkmp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * $Id: synclinkmp.c,v 4.34 2005/03/04 15:07:10 paulkf Exp $ 2 * $Id: synclinkmp.c,v 4.38 2005/07/15 13:29:44 paulkf Exp $
3 * 3 *
4 * Device driver for Microgate SyncLink Multiport 4 * Device driver for Microgate SyncLink Multiport
5 * high speed multiprotocol serial adapter. 5 * high speed multiprotocol serial adapter.
@@ -486,7 +486,7 @@ module_param_array(maxframe, int, NULL, 0);
486module_param_array(dosyncppp, int, NULL, 0); 486module_param_array(dosyncppp, int, NULL, 0);
487 487
488static char *driver_name = "SyncLink MultiPort driver"; 488static char *driver_name = "SyncLink MultiPort driver";
489static char *driver_version = "$Revision: 4.34 $"; 489static char *driver_version = "$Revision: 4.38 $";
490 490
491static int synclinkmp_init_one(struct pci_dev *dev,const struct pci_device_id *ent); 491static int synclinkmp_init_one(struct pci_dev *dev,const struct pci_device_id *ent);
492static void synclinkmp_remove_one(struct pci_dev *dev); 492static void synclinkmp_remove_one(struct pci_dev *dev);
@@ -555,7 +555,6 @@ static int set_txidle(SLMP_INFO *info, int idle_mode);
555static int tx_enable(SLMP_INFO *info, int enable); 555static int tx_enable(SLMP_INFO *info, int enable);
556static int tx_abort(SLMP_INFO *info); 556static int tx_abort(SLMP_INFO *info);
557static int rx_enable(SLMP_INFO *info, int enable); 557static int rx_enable(SLMP_INFO *info, int enable);
558static int map_status(int signals);
559static int modem_input_wait(SLMP_INFO *info,int arg); 558static int modem_input_wait(SLMP_INFO *info,int arg);
560static int wait_mgsl_event(SLMP_INFO *info, int __user *mask_ptr); 559static int wait_mgsl_event(SLMP_INFO *info, int __user *mask_ptr);
561static int tiocmget(struct tty_struct *tty, struct file *file); 560static int tiocmget(struct tty_struct *tty, struct file *file);
@@ -3108,16 +3107,6 @@ static int rx_enable(SLMP_INFO * info, int enable)
3108 return 0; 3107 return 0;
3109} 3108}
3110 3109
3111static int map_status(int signals)
3112{
3113 /* Map status bits to API event bits */
3114
3115 return ((signals & SerialSignal_DSR) ? MgslEvent_DsrActive : MgslEvent_DsrInactive) +
3116 ((signals & SerialSignal_CTS) ? MgslEvent_CtsActive : MgslEvent_CtsInactive) +
3117 ((signals & SerialSignal_DCD) ? MgslEvent_DcdActive : MgslEvent_DcdInactive) +
3118 ((signals & SerialSignal_RI) ? MgslEvent_RiActive : MgslEvent_RiInactive);
3119}
3120
3121/* wait for specified event to occur 3110/* wait for specified event to occur
3122 */ 3111 */
3123static int wait_mgsl_event(SLMP_INFO * info, int __user *mask_ptr) 3112static int wait_mgsl_event(SLMP_INFO * info, int __user *mask_ptr)
@@ -3144,7 +3133,7 @@ static int wait_mgsl_event(SLMP_INFO * info, int __user *mask_ptr)
3144 3133
3145 /* return immediately if state matches requested events */ 3134 /* return immediately if state matches requested events */
3146 get_signals(info); 3135 get_signals(info);
3147 s = map_status(info->serial_signals); 3136 s = info->serial_signals;
3148 3137
3149 events = mask & 3138 events = mask &
3150 ( ((s & SerialSignal_DSR) ? MgslEvent_DsrActive:MgslEvent_DsrInactive) + 3139 ( ((s & SerialSignal_DSR) ? MgslEvent_DsrActive:MgslEvent_DsrInactive) +