]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/char/generic_serial.c
4 * Copyright (C) 1998/1999 R.E.Wolff@BitWizard.nl
6 * written for the SX serial driver.
7 * Contains the code that should be shared over all the serial drivers.
9 * Credit for the idea to do it this way might go to Alan Cox.
12 * Version 0.1 -- December, 1998. Initial version.
13 * Version 0.2 -- March, 1999. Some more routines. Bugfixes. Etc.
14 * Version 0.5 -- August, 1999. Some more fixes. Reformat for Linus.
16 * BitWizard is actively maintaining this file. We sometimes find
17 * that someone submitted changes to this file. We really appreciate
18 * your help, but please submit changes through us. We're doing our
19 * best to be responsive. -- REW
22 #include <linux/module.h>
23 #include <linux/kernel.h>
24 #include <linux/tty.h>
25 #include <linux/sched.h>
26 #include <linux/serial.h>
28 #include <linux/generic_serial.h>
29 #include <linux/interrupt.h>
30 #include <linux/tty_flip.h>
31 #include <linux/delay.h>
32 #include <asm/uaccess.h>
39 #define gs_dprintk(f, str...) if (gs_debug & f) printk (str)
41 #define gs_dprintk(f, str...) /* nothing */
44 #define func_enter() gs_dprintk (GS_DEBUG_FLOW, "gs: enter %s\n", __func__)
45 #define func_exit() gs_dprintk (GS_DEBUG_FLOW, "gs: exit %s\n", __func__)
47 #define RS_EVENT_WRITE_WAKEUP 1
49 module_param(gs_debug
, int, 0644);
52 int gs_put_char(struct tty_struct
* tty
, unsigned char ch
)
58 port
= tty
->driver_data
;
62 if (! (port
->port
.flags
& ASYNC_INITIALIZED
)) return 0;
64 /* Take a lock on the serial tranmit buffer! */
65 mutex_lock(& port
->port_write_mutex
);
67 if (port
->xmit_cnt
>= SERIAL_XMIT_SIZE
- 1) {
68 /* Sorry, buffer is full, drop character. Update statistics???? -- REW */
69 mutex_unlock(&port
->port_write_mutex
);
73 port
->xmit_buf
[port
->xmit_head
++] = ch
;
74 port
->xmit_head
&= SERIAL_XMIT_SIZE
- 1;
75 port
->xmit_cnt
++; /* Characters in buffer */
77 mutex_unlock(&port
->port_write_mutex
);
84 > Problems to take into account are:
85 > -1- Interrupts that empty part of the buffer.
86 > -2- page faults on the access to userspace.
87 > -3- Other processes that are also trying to do a "write".
90 int gs_write(struct tty_struct
* tty
,
91 const unsigned char *buf
, int count
)
99 port
= tty
->driver_data
;
103 if (! (port
->port
.flags
& ASYNC_INITIALIZED
))
106 /* get exclusive "write" access to this port (problem 3) */
107 /* This is not a spinlock because we can have a disk access (page
108 fault) in copy_from_user */
109 mutex_lock(& port
->port_write_mutex
);
115 /* This is safe because we "OWN" the "head". Noone else can
116 change the "head": we own the port_write_mutex. */
117 /* Don't overrun the end of the buffer */
118 t
= SERIAL_XMIT_SIZE
- port
->xmit_head
;
121 /* This is safe because the xmit_cnt can only decrease. This
122 would increase "t", so we might copy too little chars. */
123 /* Don't copy past the "head" of the buffer */
124 t
= SERIAL_XMIT_SIZE
- 1 - port
->xmit_cnt
;
127 /* Can't copy more? break out! */
130 memcpy (port
->xmit_buf
+ port
->xmit_head
, buf
, c
);
132 port
-> xmit_cnt
+= c
;
133 port
-> xmit_head
= (port
->xmit_head
+ c
) & (SERIAL_XMIT_SIZE
-1);
138 mutex_unlock(& port
->port_write_mutex
);
140 gs_dprintk (GS_DEBUG_WRITE
, "write: interrupts are %s\n",
141 (port
->port
.flags
& GS_TX_INTEN
)?"enabled": "disabled");
143 if (port
->xmit_cnt
&&
146 !(port
->port
.flags
& GS_TX_INTEN
)) {
147 port
->port
.flags
|= GS_TX_INTEN
;
148 port
->rd
->enable_tx_interrupts (port
);
156 int gs_write_room(struct tty_struct
* tty
)
158 struct gs_port
*port
= tty
->driver_data
;
162 ret
= SERIAL_XMIT_SIZE
- port
->xmit_cnt
- 1;
170 int gs_chars_in_buffer(struct tty_struct
*tty
)
172 struct gs_port
*port
= tty
->driver_data
;
176 return port
->xmit_cnt
;
180 static int gs_real_chars_in_buffer(struct tty_struct
*tty
)
182 struct gs_port
*port
;
185 port
= tty
->driver_data
;
187 if (!port
->rd
) return 0;
188 if (!port
->rd
->chars_in_buffer
) return 0;
191 return port
->xmit_cnt
+ port
->rd
->chars_in_buffer (port
);
195 static int gs_wait_tx_flushed (void * ptr
, unsigned long timeout
)
197 struct gs_port
*port
= ptr
;
198 unsigned long end_jiffies
;
199 int jiffies_to_transmit
, charsleft
= 0, rv
= 0;
204 gs_dprintk (GS_DEBUG_FLUSH
, "port=%p.\n", port
);
206 gs_dprintk (GS_DEBUG_FLUSH
, "xmit_cnt=%x, xmit_buf=%p, tty=%p.\n",
207 port
->xmit_cnt
, port
->xmit_buf
, port
->port
.tty
);
210 if (!port
|| port
->xmit_cnt
< 0 || !port
->xmit_buf
) {
211 gs_dprintk (GS_DEBUG_FLUSH
, "ERROR: !port, !port->xmit_buf or prot->xmit_cnt < 0.\n");
213 return -EINVAL
; /* This is an error which we don't know how to handle. */
216 rcib
= gs_real_chars_in_buffer(port
->port
.tty
);
219 gs_dprintk (GS_DEBUG_FLUSH
, "nothing to wait for.\n");
223 /* stop trying: now + twice the time it would normally take + seconds */
224 if (timeout
== 0) timeout
= MAX_SCHEDULE_TIMEOUT
;
225 end_jiffies
= jiffies
;
226 if (timeout
!= MAX_SCHEDULE_TIMEOUT
)
227 end_jiffies
+= port
->baud
?(2 * rcib
* 10 * HZ
/ port
->baud
):0;
228 end_jiffies
+= timeout
;
230 gs_dprintk (GS_DEBUG_FLUSH
, "now=%lx, end=%lx (%ld).\n",
231 jiffies
, end_jiffies
, end_jiffies
-jiffies
);
233 /* the expression is actually jiffies < end_jiffies, but that won't
234 work around the wraparound. Tricky eh? */
235 while ((charsleft
= gs_real_chars_in_buffer (port
->port
.tty
)) &&
236 time_after (end_jiffies
, jiffies
)) {
238 chars * (bits/char) * (jiffies /sec) / (bits/sec) = jiffies!
241 charsleft
+= 16; /* Allow 16 chars more to be transmitted ... */
242 jiffies_to_transmit
= port
->baud
?(1 + charsleft
* 10 * HZ
/ port
->baud
):0;
243 /* ^^^ Round up.... */
244 if (jiffies_to_transmit
<= 0) jiffies_to_transmit
= 1;
246 gs_dprintk (GS_DEBUG_FLUSH
, "Expect to finish in %d jiffies "
247 "(%d chars).\n", jiffies_to_transmit
, charsleft
);
249 msleep_interruptible(jiffies_to_msecs(jiffies_to_transmit
));
250 if (signal_pending (current
)) {
251 gs_dprintk (GS_DEBUG_FLUSH
, "Signal pending. Bombing out: ");
257 gs_dprintk (GS_DEBUG_FLUSH
, "charsleft = %d.\n", charsleft
);
258 set_current_state (TASK_RUNNING
);
266 void gs_flush_buffer(struct tty_struct
*tty
)
268 struct gs_port
*port
;
273 port
= tty
->driver_data
;
277 /* XXX Would the write semaphore do? */
278 spin_lock_irqsave (&port
->driver_lock
, flags
);
279 port
->xmit_cnt
= port
->xmit_head
= port
->xmit_tail
= 0;
280 spin_unlock_irqrestore (&port
->driver_lock
, flags
);
287 void gs_flush_chars(struct tty_struct
* tty
)
289 struct gs_port
*port
;
293 port
= tty
->driver_data
;
297 if (port
->xmit_cnt
<= 0 || tty
->stopped
|| tty
->hw_stopped
||
303 /* Beats me -- REW */
304 port
->port
.flags
|= GS_TX_INTEN
;
305 port
->rd
->enable_tx_interrupts (port
);
310 void gs_stop(struct tty_struct
* tty
)
312 struct gs_port
*port
;
316 port
= tty
->driver_data
;
320 if (port
->xmit_cnt
&&
322 (port
->port
.flags
& GS_TX_INTEN
) ) {
323 port
->port
.flags
&= ~GS_TX_INTEN
;
324 port
->rd
->disable_tx_interrupts (port
);
330 void gs_start(struct tty_struct
* tty
)
332 struct gs_port
*port
;
334 port
= tty
->driver_data
;
338 if (port
->xmit_cnt
&&
340 !(port
->port
.flags
& GS_TX_INTEN
) ) {
341 port
->port
.flags
|= GS_TX_INTEN
;
342 port
->rd
->enable_tx_interrupts (port
);
348 static void gs_shutdown_port (struct gs_port
*port
)
356 if (!(port
->port
.flags
& ASYNC_INITIALIZED
))
359 spin_lock_irqsave(&port
->driver_lock
, flags
);
361 if (port
->xmit_buf
) {
362 free_page((unsigned long) port
->xmit_buf
);
363 port
->xmit_buf
= NULL
;
367 set_bit(TTY_IO_ERROR
, &port
->port
.tty
->flags
);
369 port
->rd
->shutdown_port (port
);
371 port
->port
.flags
&= ~ASYNC_INITIALIZED
;
372 spin_unlock_irqrestore(&port
->driver_lock
, flags
);
378 void gs_hangup(struct tty_struct
*tty
)
380 struct gs_port
*port
;
385 port
= tty
->driver_data
;
386 tty
= port
->port
.tty
;
390 gs_shutdown_port (port
);
391 spin_lock_irqsave(&port
->port
.lock
, flags
);
392 port
->port
.flags
&= ~(ASYNC_NORMAL_ACTIVE
|GS_ACTIVE
);
393 port
->port
.tty
= NULL
;
394 port
->port
.count
= 0;
395 spin_unlock_irqrestore(&port
->port
.lock
, flags
);
397 wake_up_interruptible(&port
->port
.open_wait
);
402 int gs_block_til_ready(void *port_
, struct file
* filp
)
404 struct gs_port
*gp
= port_
;
405 struct tty_port
*port
= &gp
->port
;
406 DECLARE_WAITQUEUE(wait
, current
);
410 struct tty_struct
*tty
;
419 gs_dprintk (GS_DEBUG_BTR
, "Entering gs_block_till_ready.\n");
421 * If the device is in the middle of being closed, then block
422 * until it's done, and then try again.
424 if (tty_hung_up_p(filp
) || port
->flags
& ASYNC_CLOSING
) {
425 interruptible_sleep_on(&port
->close_wait
);
426 if (port
->flags
& ASYNC_HUP_NOTIFY
)
432 gs_dprintk (GS_DEBUG_BTR
, "after hung up\n");
435 * If non-blocking mode is set, or the port is not enabled,
436 * then make the check up front and then exit.
438 if ((filp
->f_flags
& O_NONBLOCK
) ||
439 (tty
->flags
& (1 << TTY_IO_ERROR
))) {
440 port
->flags
|= ASYNC_NORMAL_ACTIVE
;
444 gs_dprintk (GS_DEBUG_BTR
, "after nonblock\n");
450 * Block waiting for the carrier detect and the line to become
451 * free (i.e., not in use by the callout). While we are in
452 * this loop, port->count is dropped by one, so that
453 * rs_close() knows when to free things. We restore it upon
454 * exit, either normal or abnormal.
458 add_wait_queue(&port
->open_wait
, &wait
);
460 gs_dprintk (GS_DEBUG_BTR
, "after add waitq.\n");
461 spin_lock_irqsave(&port
->lock
, flags
);
462 if (!tty_hung_up_p(filp
)) {
465 port
->blocked_open
++;
466 spin_unlock_irqrestore(&port
->lock
, flags
);
468 CD
= tty_port_carrier_raised(port
);
469 gs_dprintk (GS_DEBUG_BTR
, "CD is now %d.\n", CD
);
470 set_current_state (TASK_INTERRUPTIBLE
);
471 if (tty_hung_up_p(filp
) ||
472 !(port
->flags
& ASYNC_INITIALIZED
)) {
473 if (port
->flags
& ASYNC_HUP_NOTIFY
)
476 retval
= -ERESTARTSYS
;
479 if (!(port
->flags
& ASYNC_CLOSING
) &&
482 gs_dprintk (GS_DEBUG_BTR
, "signal_pending is now: %d (%lx)\n",
483 (int)signal_pending (current
), *(long*)(¤t
->blocked
));
484 if (signal_pending(current
)) {
485 retval
= -ERESTARTSYS
;
490 gs_dprintk (GS_DEBUG_BTR
, "Got out of the loop. (%d)\n",
492 set_current_state (TASK_RUNNING
);
493 remove_wait_queue(&port
->open_wait
, &wait
);
495 spin_lock_irqsave(&port
->lock
, flags
);
496 if (!tty_hung_up_p(filp
)) {
499 port
->blocked_open
--;
501 port
->flags
|= ASYNC_NORMAL_ACTIVE
;
502 spin_unlock_irqrestore(&port
->lock
, flags
);
508 void gs_close(struct tty_struct
* tty
, struct file
* filp
)
511 struct gs_port
*port
;
515 port
= tty
->driver_data
;
519 if (!port
->port
.tty
) {
520 /* This seems to happen when this is called from vhangup. */
521 gs_dprintk (GS_DEBUG_CLOSE
, "gs: Odd: port->port.tty is NULL\n");
522 port
->port
.tty
= tty
;
525 spin_lock_irqsave(&port
->port
.lock
, flags
);
527 if (tty_hung_up_p(filp
)) {
528 spin_unlock_irqrestore(&port
->port
.lock
, flags
);
529 if (port
->rd
->hungup
)
530 port
->rd
->hungup (port
);
535 if ((tty
->count
== 1) && (port
->port
.count
!= 1)) {
536 printk(KERN_ERR
"gs: gs_close port %p: bad port count;"
537 " tty->count is 1, port count is %d\n", port
, port
->port
.count
);
538 port
->port
.count
= 1;
540 if (--port
->port
.count
< 0) {
541 printk(KERN_ERR
"gs: gs_close port %p: bad port count: %d\n", port
, port
->port
.count
);
542 port
->port
.count
= 0;
545 if (port
->port
.count
) {
546 gs_dprintk(GS_DEBUG_CLOSE
, "gs_close port %p: count: %d\n", port
, port
->port
.count
);
547 spin_unlock_irqrestore(&port
->port
.lock
, flags
);
551 port
->port
.flags
|= ASYNC_CLOSING
;
554 * Now we wait for the transmit buffer to clear; and we notify
555 * the line discipline to only process XON/XOFF characters.
558 /* if (port->closing_wait != ASYNC_CLOSING_WAIT_NONE)
559 tty_wait_until_sent(tty, port->closing_wait); */
562 * At this point we stop accepting input. To do this, we
563 * disable the receive line status interrupts, and tell the
564 * interrupt driver to stop checking the data ready bit in the
565 * line status register.
568 spin_lock_irqsave(&port
->driver_lock
, flags
);
569 port
->rd
->disable_rx_interrupts (port
);
570 spin_unlock_irqrestore(&port
->driver_lock
, flags
);
571 spin_unlock_irqrestore(&port
->port
.lock
, flags
);
573 /* close has no way of returning "EINTR", so discard return value */
574 if (port
->closing_wait
!= ASYNC_CLOSING_WAIT_NONE
)
575 gs_wait_tx_flushed (port
, port
->closing_wait
);
577 port
->port
.flags
&= ~GS_ACTIVE
;
579 gs_flush_buffer(tty
);
581 tty_ldisc_flush(tty
);
584 spin_lock_irqsave(&port
->driver_lock
, flags
);
586 port
->rd
->close (port
);
587 port
->rd
->shutdown_port (port
);
588 spin_unlock_irqrestore(&port
->driver_lock
, flags
);
590 spin_lock_irqsave(&port
->port
.lock
, flags
);
591 port
->port
.tty
= NULL
;
593 if (port
->port
.blocked_open
) {
594 if (port
->close_delay
) {
595 spin_unlock_irqrestore(&port
->port
.lock
, flags
);
596 msleep_interruptible(jiffies_to_msecs(port
->close_delay
));
597 spin_lock_irqsave(&port
->port
.lock
, flags
);
599 wake_up_interruptible(&port
->port
.open_wait
);
601 port
->port
.flags
&= ~(ASYNC_NORMAL_ACTIVE
|ASYNC_CLOSING
| ASYNC_INITIALIZED
);
602 spin_unlock_irqrestore(&port
->port
.lock
, flags
);
603 wake_up_interruptible(&port
->port
.close_wait
);
609 void gs_set_termios (struct tty_struct
* tty
,
610 struct ktermios
* old_termios
)
612 struct gs_port
*port
;
613 int baudrate
, tmp
, rv
;
614 struct ktermios
*tiosp
;
618 port
= tty
->driver_data
;
621 if (!port
->port
.tty
) {
622 /* This seems to happen when this is called after gs_close. */
623 gs_dprintk (GS_DEBUG_TERMIOS
, "gs: Odd: port->port.tty is NULL\n");
624 port
->port
.tty
= tty
;
628 tiosp
= tty
->termios
;
630 if (gs_debug
& GS_DEBUG_TERMIOS
) {
631 gs_dprintk (GS_DEBUG_TERMIOS
, "termios structure (%p):\n", tiosp
);
634 if(old_termios
&& (gs_debug
& GS_DEBUG_TERMIOS
)) {
635 if(tiosp
->c_iflag
!= old_termios
->c_iflag
) printk("c_iflag changed\n");
636 if(tiosp
->c_oflag
!= old_termios
->c_oflag
) printk("c_oflag changed\n");
637 if(tiosp
->c_cflag
!= old_termios
->c_cflag
) printk("c_cflag changed\n");
638 if(tiosp
->c_lflag
!= old_termios
->c_lflag
) printk("c_lflag changed\n");
639 if(tiosp
->c_line
!= old_termios
->c_line
) printk("c_line changed\n");
640 if(!memcmp(tiosp
->c_cc
, old_termios
->c_cc
, NCC
)) printk("c_cc changed\n");
643 baudrate
= tty_get_baud_rate(tty
);
645 if ((tiosp
->c_cflag
& CBAUD
) == B38400
) {
646 if ( (port
->port
.flags
& ASYNC_SPD_MASK
) == ASYNC_SPD_HI
)
648 else if ((port
->port
.flags
& ASYNC_SPD_MASK
) == ASYNC_SPD_VHI
)
650 else if ((port
->port
.flags
& ASYNC_SPD_MASK
) == ASYNC_SPD_SHI
)
652 else if ((port
->port
.flags
& ASYNC_SPD_MASK
) == ASYNC_SPD_WARP
)
654 else if ((port
->port
.flags
& ASYNC_SPD_MASK
) == ASYNC_SPD_CUST
)
655 baudrate
= (port
->baud_base
/ port
->custom_divisor
);
658 /* I recommend using THIS instead of the mess in termios (and
659 duplicating the above code). Next we should create a clean
660 interface towards this variable. If your card supports arbitrary
661 baud rates, (e.g. CD1400 or 16550 based cards) then everything
662 will be very easy..... */
663 port
->baud
= baudrate
;
665 /* Two timer ticks seems enough to wakeup something like SLIP driver */
666 /* Baudrate/10 is cps. Divide by HZ to get chars per tick. */
667 tmp
= (baudrate
/ 10 / HZ
) * 2;
669 if (tmp
< 0) tmp
= 0;
670 if (tmp
>= SERIAL_XMIT_SIZE
) tmp
= SERIAL_XMIT_SIZE
-1;
672 port
->wakeup_chars
= tmp
;
674 /* We should really wait for the characters to be all sent before
675 changing the settings. -- CAL */
676 rv
= gs_wait_tx_flushed (port
, MAX_SCHEDULE_TIMEOUT
);
677 if (rv
< 0) return /* rv */;
679 rv
= port
->rd
->set_real_termios(port
);
680 if (rv
< 0) return /* rv */;
683 (old_termios
->c_cflag
& CRTSCTS
)) &&
684 !( tiosp
->c_cflag
& CRTSCTS
)) {
689 #ifdef tytso_patch_94Nov25_1726
690 /* This "makes sense", Why is it commented out? */
692 if (!(old_termios
->c_cflag
& CLOCAL
) &&
693 (tty
->termios
->c_cflag
& CLOCAL
))
694 wake_up_interruptible(&port
->gs
.open_wait
);
703 /* Must be called with interrupts enabled */
704 int gs_init_port(struct gs_port
*port
)
710 if (port
->port
.flags
& ASYNC_INITIALIZED
) {
714 if (!port
->xmit_buf
) {
715 /* We may sleep in get_zeroed_page() */
718 tmp
= get_zeroed_page(GFP_KERNEL
);
719 spin_lock_irqsave (&port
->driver_lock
, flags
);
723 port
->xmit_buf
= (unsigned char *) tmp
;
724 spin_unlock_irqrestore(&port
->driver_lock
, flags
);
725 if (!port
->xmit_buf
) {
731 spin_lock_irqsave (&port
->driver_lock
, flags
);
733 clear_bit(TTY_IO_ERROR
, &port
->port
.tty
->flags
);
734 mutex_init(&port
->port_write_mutex
);
735 port
->xmit_cnt
= port
->xmit_head
= port
->xmit_tail
= 0;
736 spin_unlock_irqrestore(&port
->driver_lock
, flags
);
737 gs_set_termios(port
->port
.tty
, NULL
);
738 spin_lock_irqsave (&port
->driver_lock
, flags
);
739 port
->port
.flags
|= ASYNC_INITIALIZED
;
740 port
->port
.flags
&= ~GS_TX_INTEN
;
742 spin_unlock_irqrestore(&port
->driver_lock
, flags
);
748 int gs_setserial(struct gs_port
*port
, struct serial_struct __user
*sp
)
750 struct serial_struct sio
;
752 if (copy_from_user(&sio
, sp
, sizeof(struct serial_struct
)))
755 if (!capable(CAP_SYS_ADMIN
)) {
756 if ((sio
.baud_base
!= port
->baud_base
) ||
757 (sio
.close_delay
!= port
->close_delay
) ||
758 ((sio
.flags
& ~ASYNC_USR_MASK
) !=
759 (port
->port
.flags
& ~ASYNC_USR_MASK
)))
763 port
->port
.flags
= (port
->port
.flags
& ~ASYNC_USR_MASK
) |
764 (sio
.flags
& ASYNC_USR_MASK
);
766 port
->baud_base
= sio
.baud_base
;
767 port
->close_delay
= sio
.close_delay
;
768 port
->closing_wait
= sio
.closing_wait
;
769 port
->custom_divisor
= sio
.custom_divisor
;
771 gs_set_termios (port
->port
.tty
, NULL
);
777 /*****************************************************************************/
780 * Generate the serial struct info.
783 int gs_getserial(struct gs_port
*port
, struct serial_struct __user
*sp
)
785 struct serial_struct sio
;
787 memset(&sio
, 0, sizeof(struct serial_struct
));
788 sio
.flags
= port
->port
.flags
;
789 sio
.baud_base
= port
->baud_base
;
790 sio
.close_delay
= port
->close_delay
;
791 sio
.closing_wait
= port
->closing_wait
;
792 sio
.custom_divisor
= port
->custom_divisor
;
795 /* If you want you can override these. */
796 sio
.type
= PORT_UNKNOWN
;
797 sio
.xmit_fifo_size
= -1;
802 if (port
->rd
->getserial
)
803 port
->rd
->getserial (port
, &sio
);
805 if (copy_to_user(sp
, &sio
, sizeof(struct serial_struct
)))
812 void gs_got_break(struct gs_port
*port
)
816 tty_insert_flip_char(port
->port
.tty
, 0, TTY_BREAK
);
817 tty_schedule_flip(port
->port
.tty
);
818 if (port
->port
.flags
& ASYNC_SAK
) {
819 do_SAK (port
->port
.tty
);
826 EXPORT_SYMBOL(gs_put_char
);
827 EXPORT_SYMBOL(gs_write
);
828 EXPORT_SYMBOL(gs_write_room
);
829 EXPORT_SYMBOL(gs_chars_in_buffer
);
830 EXPORT_SYMBOL(gs_flush_buffer
);
831 EXPORT_SYMBOL(gs_flush_chars
);
832 EXPORT_SYMBOL(gs_stop
);
833 EXPORT_SYMBOL(gs_start
);
834 EXPORT_SYMBOL(gs_hangup
);
835 EXPORT_SYMBOL(gs_block_til_ready
);
836 EXPORT_SYMBOL(gs_close
);
837 EXPORT_SYMBOL(gs_set_termios
);
838 EXPORT_SYMBOL(gs_init_port
);
839 EXPORT_SYMBOL(gs_setserial
);
840 EXPORT_SYMBOL(gs_getserial
);
841 EXPORT_SYMBOL(gs_got_break
);
843 MODULE_LICENSE("GPL");