Merge to Fedora kernel-2.6.18-1.2239_FC5 patched with stable patch-2.6.18.2-vs2.0...
[linux-2.6.git] / Documentation / tty.txt
index a496056..dab5660 100644 (file)
@@ -22,7 +22,7 @@ copy of the structure. You must not re-register over the top of the line
 discipline even with the same data or your computer again will be eaten by
 demons.
 
-In order to remove a line discipline call tty_register_ldisc passing NULL.
+In order to remove a line discipline call tty_unregister_ldisc().
 In ancient times this always worked. In modern times the function will
 return -EBUSY if the ldisc is currently in use. Since the ldisc referencing
 code manages the module counts this should not usually be a concern.
@@ -49,10 +49,9 @@ open()               -       Called when the line discipline is attached to
                        discipline for this tty will occur until it
                        completes successfully. Can sleep.
 
-write()                -       A process is writing data from user space
-                       through the line discipline. Multiple write calls
-                       are serialized by the tty layer for the ldisc. May
-                       sleep.
+write()                -       A process is writing data through the line
+                       discipline.  Multiple write calls are serialized
+                       by the tty layer for the ldisc.  May sleep. 
 
 flush_buffer() -       May be called at any point between open and close.
 
@@ -81,19 +80,17 @@ receive_buf()       -       Hand buffers of bytes from the driver to the ldisc
                        for processing. Semantics currently rather
                        mysterious 8(
 
-receive_room() -       Can be called by the driver layer at any time when
-                       the ldisc is opened. The ldisc must be able to
-                       handle the reported amount of data at that instant.
-                       Synchronization between active receive_buf and
-                       receive_room calls is down to the driver not the
-                       ldisc. Must not sleep.
-
 write_wakeup() -       May be called at any point between open and close.
                        The TTY_DO_WRITE_WAKEUP flag indicates if a call
                        is needed but always races versus calls. Thus the
                        ldisc must be careful about setting order and to
                        handle unexpected calls. Must not sleep.
 
+                       The driver is forbidden from calling this directly
+                       from the ->write call from the ldisc as the ldisc
+                       is permitted to call the driver write method from
+                       this function. In such a situation defer it.
+
 
 Locking