synclink_gt.c (515be7baeddb04d786e3a7f4072791087c25bb04) | synclink_gt.c (9b5aa54986fc85f5e10045348a8a45894aeb18db) |
---|---|
1// SPDX-License-Identifier: GPL-1.0+ 2/* 3 * Device driver for Microgate SyncLink GT serial adapters. 4 * 5 * written by Paul Fulghum for Microgate Corporation 6 * paulkf@microgate.com 7 * 8 * Microgate and SyncLink are trademarks of Microgate Corporation --- 680 unchanged lines hidden (view full) --- 689 690 mutex_lock(&info->port.mutex); 691 shutdown(info); 692 693 spin_lock_irqsave(&info->port.lock, flags); 694 info->port.count = 0; 695 info->port.tty = NULL; 696 spin_unlock_irqrestore(&info->port.lock, flags); | 1// SPDX-License-Identifier: GPL-1.0+ 2/* 3 * Device driver for Microgate SyncLink GT serial adapters. 4 * 5 * written by Paul Fulghum for Microgate Corporation 6 * paulkf@microgate.com 7 * 8 * Microgate and SyncLink are trademarks of Microgate Corporation --- 680 unchanged lines hidden (view full) --- 689 690 mutex_lock(&info->port.mutex); 691 shutdown(info); 692 693 spin_lock_irqsave(&info->port.lock, flags); 694 info->port.count = 0; 695 info->port.tty = NULL; 696 spin_unlock_irqrestore(&info->port.lock, flags); |
697 tty_port_set_active(&info->port, 0); | 697 tty_port_set_active(&info->port, false); |
698 mutex_unlock(&info->port.mutex); 699 700 wake_up_interruptible(&info->port.open_wait); 701} 702 703static void set_termios(struct tty_struct *tty, 704 const struct ktermios *old_termios) 705{ --- 2458 unchanged lines hidden (view full) --- 3164 unsigned long flags; 3165 int cd; 3166 struct tty_port *port = &info->port; 3167 3168 DBGINFO(("%s block_til_ready\n", tty->driver->name)); 3169 3170 if (filp->f_flags & O_NONBLOCK || tty_io_error(tty)) { 3171 /* nonblock mode is set or port is not enabled */ | 698 mutex_unlock(&info->port.mutex); 699 700 wake_up_interruptible(&info->port.open_wait); 701} 702 703static void set_termios(struct tty_struct *tty, 704 const struct ktermios *old_termios) 705{ --- 2458 unchanged lines hidden (view full) --- 3164 unsigned long flags; 3165 int cd; 3166 struct tty_port *port = &info->port; 3167 3168 DBGINFO(("%s block_til_ready\n", tty->driver->name)); 3169 3170 if (filp->f_flags & O_NONBLOCK || tty_io_error(tty)) { 3171 /* nonblock mode is set or port is not enabled */ |
3172 tty_port_set_active(port, 1); | 3172 tty_port_set_active(port, true); |
3173 return 0; 3174 } 3175 3176 if (C_CLOCAL(tty)) 3177 do_clocal = true; 3178 3179 /* Wait for carrier detect and the line to become 3180 * free (i.e., not in use by the callout). While we are in --- 40 unchanged lines hidden (view full) --- 3221 set_current_state(TASK_RUNNING); 3222 remove_wait_queue(&port->open_wait, &wait); 3223 3224 if (!tty_hung_up_p(filp)) 3225 port->count++; 3226 port->blocked_open--; 3227 3228 if (!retval) | 3173 return 0; 3174 } 3175 3176 if (C_CLOCAL(tty)) 3177 do_clocal = true; 3178 3179 /* Wait for carrier detect and the line to become 3180 * free (i.e., not in use by the callout). While we are in --- 40 unchanged lines hidden (view full) --- 3221 set_current_state(TASK_RUNNING); 3222 remove_wait_queue(&port->open_wait, &wait); 3223 3224 if (!tty_hung_up_p(filp)) 3225 port->count++; 3226 port->blocked_open--; 3227 3228 if (!retval) |
3229 tty_port_set_active(port, 1); | 3229 tty_port_set_active(port, true); |
3230 3231 DBGINFO(("%s block_til_ready ready, rc=%d\n", tty->driver->name, retval)); 3232 return retval; 3233} 3234 3235/* 3236 * allocate buffers used for calling line discipline receive_buf 3237 * directly in synchronous mode --- 1818 unchanged lines hidden --- | 3230 3231 DBGINFO(("%s block_til_ready ready, rc=%d\n", tty->driver->name, retval)); 3232 return retval; 3233} 3234 3235/* 3236 * allocate buffers used for calling line discipline receive_buf 3237 * directly in synchronous mode --- 1818 unchanged lines hidden --- |