Portability cleanup as required by Linus.
[linux-2.6/linux-mips.git] / drivers / char / ChangeLog
blob7e055801344c3839b451831824c5c9cbbac8aead
1 1998-08-26  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3         * serial.c (rs_open): Correctly decrement the module in-use count
4                 on errors.
6 Thu Feb 19 14:24:08 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
8         * tty_io.c (tty_name): Remove the non-reentrant (and non-SMP safe)
9                 version of tty_name, and rename the reentrant _tty_name
10                 function to be tty_name.
11                 (tty_open): Add a warning message stating callout devices
12                 are deprecated.
14 Mon Dec  1 08:24:15 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
16         * tty_io.c (tty_get_baud_rate): Print a warning syslog if the
17                 tty->alt_speed kludge is used; this means the system is
18                 using the deprecated SPD_HI ioctls.
20 Mon Nov 24 10:37:49 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
22         * serial.c, esp.c, rocket.c: Change drivers to take advantage of
23                 tty_get_baud_rate().
24         
25         * tty_io.c (tty_get_baud_rate): New function which computes the
26                 correct baud rate for the tty.  More factoring out of
27                 common code out of the serial driver to the high-level tty
28                 functions....
30 Sat Nov 22 07:53:36 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
32         * serial.c, esp.c, rocket.c: Add tty->driver.break() routine, and
33                 allow high-level tty code to handle the break and soft
34                 carrier ioctls.
35         
36         * tty_ioctl.c (n_tty_ioctl): Support TIOCGSOFTCAR and
37                 TIOCSSOFTCAR, so that device drivers don't have to support
38                 it.
40         * serial.c (autoconfig): Change 16750 test to hopefully eliminate
41                 false results by people with strange 16550As being
42                 detected as 16750s.  Hopefully 16750s will still be
43                 detected as 16750, and other weird UARTs won't get poorly
44                 autodetected.  If this doesn't work, I'll have to disable
45                 the auto identification for the 16750.
47         * tty_io.c (tty_hangup): Now actually do the tty hangup
48                 processing during the timer processing, and disable
49                 interrupts while doing the hangup processing.  This avoids
50                 several nasty race conditions which happened when the
51                 hangup processing was done asynchronously.
52                 (tty_ioctl): Do break handling in the tty driver if
53                 driver's break function is supported.  
54                 (tty_flip_buffer_push): New exported function which should
55                 be used by drivers to push characters in the flip buffer
56                 to the tty handler.  This may either be done using a task
57                 queue function for better CPU efficiency, or directly for
58                 low latency operation.
60         * serial.c (rs_set_termios): Fix bug rs_set_termios when
61                 transitioning away from B0, submitted by Stanislav
62                 Voronyi. 
64 Thu Jun 19 20:05:58 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
66         * serial.c (begin_break, end_break, rs_ioctl): Applied patch
67                 to support BSD ioctls to set and clear the break
68                 condition explicitly.
70         * console.c (scrup, scrdown, insert_line, delete_line): Applied
71                 fix suggested by Aaron Tiensivu to speed up block scrolls
72                 up and down.
74         * n_tty.c (opost_block, write_chan): Added a modified "fast
75                 console" patch which processes a block of text via
76                 "cooking" efficiently.
78 Wed Jun 18 15:25:50 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
80         * tty_io.c (init_dev, release_dev): Applied fix suggested by Bill
81                 Hawes to prevent race conditions in the tty code.
83         * n_tty.c (n_tty_chars_in_buffer): Applied fix suggested by Bill
84                 Hawes so that n_tty_chars_in_buffer returns the correct
85                 value in the case when the tty is in cannonical mode.  (To
86                 avoid a pty deadlock with telnetd.)
88 Thu Feb 27 01:53:08 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
90         * serial.c (change_speed): Add support for the termios flag
91                 CMSPAR, which allows the user to select stick parity.
92                 (i.e, if PARODD is set, the parity bit is always 1; if
93                 PARRODD is not set, then the parity bit is always 0).
95 Wed Feb 26 19:03:10 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
97         * serial.c (cleanup_module): Fix memory leak when using the serial
98                 driver as a module; make sure tmp_buf gets freed!
100 Tue Feb 25 11:01:59 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
102         * serial.c (set_modem_info): Add support for setting and clearing
103                 the OUT1 and OUT2 bits.  (For special case UART's, usually
104                 for half-duplex.)
105                 (autoconfig, change_speed): Fix TI 16750 support.
107 Sun Feb 16 00:14:43 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
109         * tty_io.c (release_dev): Add sanity check to make sure there are
110                 no waiters on tty->read_wait or tty->write_wait.
112         * serial.c (rs_init): Don't autoconfig a device if the I/O region
113                 is already reserved.
115         * serial.c (serial_proc_info): Add support for /proc/serial.
117 Thu Feb 13 00:49:10 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
119         * serial.c (receive_chars): When the UART repotrs an overrun
120                 condition, it does so with a valid character.  Changed to
121                 not throw away the valid character, but instead report the
122                 overrun after the valid character.
124         * serial.c: Added new #ifdef's for some of the advanced serial
125                 driver features.  A minimal driver that only supports COM
126                 1/2/3/4 without sharing serial interrupts only takes 17k;
127                 the full driver takes 32k.
128                 
129 Wed Feb 12 14:50:44 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
131         * vt.c:
132         * pty.c: 
133         * tty_ioctl.c: 
134         * serial.c: Update routines to use the new 2.1 memory access
135                 routines.
137 Wed Dec  4 07:51:52 1996  Theodore Ts'o  <tytso@localhost.mit.edu>
139         * serial.c (change_speed): Use save_flags(); cli() and
140                 restore_flags() in order to ensure we don't accidentally
141                 turn on interrupts when starting up the port.
142                 (startup): Move the insertion of serial structure into the
143                 IRQ chain earlier into the startup processing.  Interrupts
144                 should be off this whole time, but we eventually will want
145                 to reduce this window.
147 Thu Nov 21 10:05:22 1996  Theodore Ts'o  <tytso@localhost.mit.edu>
149         * tty_ioctl.c (tty_wait_until_sent): Always check the driver
150                 wait_until_ready routine, even if there are no characters
151                 in the xmit buffer.  (There may be charactes in the device
152                 FIFO.)
153                 (n_tty_ioctl): Add new flag tty->flow_stopped which
154                 indicates whether the tty is stopped due to a request by
155                 the TCXONC ioctl (used by tcflow).  If so, don't let an
156                 incoming XOFF character restart the tty.  The tty can only
157                 be restarted by another TCXONC request.
159         * tty_io.c (start_tty): Don't allow the tty to be restarted if
160                 tty->flow_stopped is true.
162         * n_tty.c (n_tty_receive_char): If tty->flow_stopped is true, and
163                 IXANY is set, don't eat a character trying to restart the
164                 tty.
166         * serial.c (startup): Remove need for MCR_noint from the
167                 async_struct structure.  Only turn on DTR and RTS if the
168                 baud rate is not zero.
169                 (change_speed): More accurately calculate the timeout
170                 value based on the word size.  Move responsibility of
171                 hangup when speed becomes B0 to rs_set_termios()
172                 (set_serial_info): When changing the UART type set the
173                 current xmit_fifo_size as well as the permanent
174                 xmit_fifo_size.
175                 (rs_ioctl): Fix TCSBRK (used by tcdrain) and TCSBRKP
176                 ioctls to return EINTR if interrupted by a signal.
177                 (rs_set_termios): If the baud rate changes to or from B0,
178                 this function is now responsible for setting or clearing
179                 DTR and RTS.  DTR and RTS are only be changed on the
180                 transition to or from the B0 state.
181                 (rs_close): Wait for the characters to drain based on
182                 info->timeout.  At low baud rates (50 bps), it may take a
183                 long time for the FIFO to completely drain out!
184                 (rs_wait_until_sent): Fixed timeout handling.  Now
185                 releases control to the scheduler, but checks frequently
186                 enough so that the function is sensitive enough to pass
187                 the timing requirements of the NIST-PCTS.
188                 (block_til_ready): When opening the device, don't turn on
189                 DTR and RTS if the baud rate is B0.
191 Thu Nov 14 00:06:09 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
193         * serial.c (autoconfig): Fix autoconfiguration problems;
194                 info->flags wasn't getting initialized from the state
195                 structure.  Put in more paranoid test for the 16750.
197 Fri Nov  8 20:19:50 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
199         * n_tty.c (n_tty_flush_buffer): Only call driver->unthrottle() if
200                 the tty was previous throttled.
201                 (n_tty_set_termios, write_chan): Add changes suggested by
202                         Simon P. Allen to allow hardware cooking.
204         * tty_ioctl.c (set_termios): If we get a signal while waiting for
205                 the tty to drain, return -EINTR.
206         
207         * serial.c (change_speed): Add support for CREAD, as required by
208                 POSIX.
210 Sat Nov  2 20:43:10 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
212         * serial.c: Wholesale changes.  Added support for the Startech
213                 16650 and 16650V2 chips.  (WARNING: the new startech
214                 16650A may or may not work!)  Added support for the
215                 TI16750 (not yet tested).  Split async_struct into a
216                 transient part (async_struct) and a permanent part
217                 (serial_state) which contains the configuration
218                 information for the ports.  Added new driver routines
219                 wait_until_sent() and send_xchar() to help with POSIX
220                 compliance.  Added support for radio clocks which waggle
221                 the carrier detect line (CONFIG_HARD_PPS).
222         
223         * tty_ioctl.c (tty_wait_until_sent): Added call to new driver
224                 function tty->driver.wait_until_sent(), which returns when
225                 the tty's device xmit buffers are drained.  Needed for
226                 full POSIX compliance.
228                 (send_prio_char): New function, called by the ioctl's
229                 TCIOFF and TCION; uses the new driver call send_xchar(),
230                 which will send the XON or XOFF character at high priority
231                 (and even if tty output is stopped).
233 Wed Jun  5 18:52:04 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
235         * pty.c (pty_close): When closing a pty, make sure packet mode is
236                 cleared.
238 Sun May 26 09:33:52 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
240         * vesa_blank.c (set_vesa_blanking): Add missing verify_area() call.
242         * selection.c (set_selection): Add missing verify_area() call.
244         * tty_io.c (tty_ioctl): Add missing verify_area() calls.
246         * serial.c (rs_ioctl): Add missing verify_area() calls.
247                 (rs_init): Allow initialization of serial driver
248                 configuration from a module.
250         * random.c (extract_entropy): Add missing verify_area call.
251                 Don't limit number of characters returned to
252                 32,768. Extract entropy is now no longer a inlined
253                 function.
255                 (random_read): Check return value in case extract_entropy
256                 returns an error.
258                 (secure_tcp_sequence_number): New function which returns a
259                 secure TCP sequence number.  This is needed to prevent some
260                 nasty TCP hijacking attacks.
261         
262                 (init_std_data): Initialize using gettimeofday() instead of
263                 struct timeval xtime.
265                 (fast_add_entropy_word, add_entropy_word): Rename the
266                 inline function add_entropy_word() to
267                 fast_add_entropy_word().  Make add_entropy_word() be the
268                 non-inlined function which is used in non-timing critical
269                 places, in order to save space.
271                 (initialize_benchmark, begin_benchmark, end_benchmark): New
272                 functions defined when RANDOM_BENCHMARK is defined.  They
273                 allow us to benchmark the speed of the
274                 add_timer_randomness() call.
276                 (int_ln, rotate_left): Add two new inline functions with
277                 i386 optimized asm instructions.  This speeds up the
278                 critical add_entropy_word() and add_timer_randomness()
279                 functions, which are called from interrupt handlers.
281 Tue May  7 22:51:11 1996    <tytso@rsts-11.mit.edu>
283         * random.c (add_timer_randomness): Limit the amount randomness
284                 that we estimate to 12 bits.  (An arbitrary amount).
286                 (extract_entropy): To make it harder to analyze the hash
287                 function, fold the hash function in half using XOR, and
288                 use the folded result as the value to emit to the user.
289                 Also, add timer randomness each pass through the
290                 exact_entropy call, to increase the amount of unknown
291                 values during the extraction process.
293                 (random_ioctl): Use IOR/IOW definitions to define the
294                 ioctl values used by the /dev/random driver.  Allow the
295                 old ioctl values to be used for backwards compatibility
296                 (for a limited amount of time).
298 Wed Apr 24 14:02:04 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
300         * random.c (add_timer_randomness): Use 2nd derivative as well to
301                 better estimate entropy.
303                 (rand_initialize): Explicitly initialize all the pointers
304                 to NULL.  (Clearing pointers using memset isn't portable.)
305                 Initialize the random pool with OS-dependent data.
307                 (random_write): Add sanity checking to the arguments to
308                 random_write(), so that bad arguments won't cause a kernel
309                 SEGV. 
311                 (random_read): Update the access time of the device inode
312                 when you return data to the user.
314                 (random_ioctl): Wake up the random_wait channel when there
315                 are only WAIT_INPUT_BITS available.  Add more paranoia
316                 checks to make sure entropy_count doesn't go beyond the
317                 bounds of (0, POOLSIZE).  Add a few missing verify_area
318                 checks.  Add support for the RNDCLEARPOOL ioctl, which
319                 zaps the random pool.
321                 (add_timer_randomness): Wake up the random_wait
322                 channel only when there are WAIT_INPUT_BITS available.
324                 (random_select): Allow a random refresh daemon process to
325                 select on /dev/random for writing; wake up the daemon when
326                 there are less than WAIT_OUTPUT_BITS bits of randomness
327                 available.
329 Tue Apr 23 22:56:07 1996    <tytso@rsts-11.mit.edu>
331         * tty_io.c (init_dev): Change return code when user attempts to
332                 open master pty which is already open from EAGAIN to EIO,
333                 to match with BSD expectations.  EIO is more correct
334                 anyway, since EAGAIN implies that retrying will be
335                 successful --- which it might be.... Eventually!!
337         * pty.c (pty_open, pty_close): Fix wait loop so that we don't
338                 busy loop while waiting for the master side to open.
339                 Fix tty opening/closing logic.  TTY_SLAVE_CLOSED was
340                 renamed to TTY_OTHER_CLOSED, so that the name is more
341                 descriptive.  Also fixed code so that the tty flag
342                 actually works correctly now....
344 Mon Apr  1 10:22:01 1996    <tytso@rsts-11.mit.edu>
346         * serial.c (rs_close): Cleaned up modularization changes.
347                 Remove code which forced line discipline back to N_TTY
348                 this is done in the tty upper layers, and there's no
349                 reason to do it here.  (Making this change also
350                 removed the requirement that the serial module access
351                 the internal kernel symbol "ldiscs".)
353         * tty_io.c (tty_init): Formally register a tty_driver entry for
354                 /dev/tty (device 4, 0) and /dev/console (device 5, 0).
355                 This guarantees that major device numbers 4 and 5 will be
356                 reserved for the tty subsystem (as they have to be because
357                 of /dev/tty and /dev/console).  Removed tty_regdev, as
358                 this interface is no longer necessary.
360 Sun Mar 17 20:42:47 GMT 1996 <ah@doc.ic.ac.uk>
362         * serial.c : modularisation (changes in linux/fs/device.c allow
363                 kerneld to automatically load the serial module).
365         * Makefile, Config.in : serial modularisation adds.
367         * tty_io.c : tty_init_ctty used by to register "cua" driver just
368                 for the /dev/tty device (5,0).  Added tty_regdev.
369         
370         * serial.c (shutdown, rs_ioctl) : when port shuts down wakeup processes
371           waiting on delta_msr_wait. The TIOCMIWAIT ioctl returns EIO
372           if no change was done since the time of call.
374 Sat Mar 16 14:33:13 1996 <aeb@cwi.nl>
376         * tty_io.c (disassociate_ctty): If disassociate_ctty is called by
377                 exit, do not perform an implicit vhangup on a pty.
379 Fri Feb  9 14:15:47 1996    <tytso@rsts-11.mit.edu>
381         * serial.c (block_til_ready): Fixed another race condition which
382                 happens if a hangup happens during the open.
384 Wed Jan 10 10:08:00 1996    <tytso@rsts-11.mit.edu>
386         * serial.c (block_til_ready): Remove race condition which happened
387                 if a hangup condition happened during the setup of the
388                 UART, before rs_open() called block_til_ready().  This
389                 caused the info->count counter to be erroneously
390                 decremented.
392         * serial.c (startup, rs_open): Remove race condition that could
393                 cause a memory leak of one page.  (Fortunately, both race
394                 conditions were relatively rare in practice.)
396 Tue Dec  5 13:21:27 1995    <tytso@rsts-11.mit.edu>
398         * serial.c (check_modem_status, rs_ioctl): Support the new
399                 ioctl()'s TIOCGICOUNT, TIOCMIWAIT.  These allow an
400                 application program to wait on a modem serial register
401                 status bit change, and to find out how many changes have
402                 taken place for the MSR bits.
404                 (rs_write): Eliminate a race condition which is introduced
405                 if it is necessary to wait for the semaphore.
407 Sat Nov  4 17:14:45 1995    <tytso@rsts-11.mit.edu>
409         * tty_io.c (tty_init): Move registration of TTY_MAJOR and
410                 TTY_AUX_MAJOR to the end, so that /proc/devices looks
411                 prettier. 
413         * pty.c (pty_init): Use new major numbers for PTY master and slave
414                 devices.  This allow us to have more than 64 pty's.  We
415                 register the old pty devices for backwards compatibility.
416                 Note that a system should either be using the old pty
417                 devices or the new pty devices --- in general, it should
418                 try to use both, since they map into the same pty table.
419                 The old pty devices are strictly for backwards compatibility.
421 Wed Oct 11 12:45:24 1995    <tytso@rsts-11.mit.edu>
423         * tty_io.c (disassociate_ctty): If disassociate_ctty is called by
424                 exit, perform an implicit vhangup on the tty.
426         * pty.c (pty_close): When the master pty is closed, send a hangup
427                 to the slave pty.
428                 (pty_open): Use the flag TTY_SLAVE_CLOSED to test to see
429                 if there are any open slave ptys, instead of using
430                 tty->link->count.  The old method got confused if there
431                 were processes that had hung-up file descriptors on the
432                 slave tty.
434 Tue May  2 00:53:25 1995    <tytso@rsx-11.mit.edu>
436         * tty_io.c (tty_set_ldisc): Wait until the output buffer is
437                 drained before closing the old line discipline --- needed
438                 in only one case: XON/XOFF processing.
440         * n_tty.c (n_tty_close): Don't bother waiting until the output
441                 driver is closed; in general, the line discipline
442                 shouldn't care if the hardware is finished
443                 transmitting before the line discipline terminates.
445         * tty_io.c (release_dev): Shutdown the line discipline after
446                 decrementing the tty count variable; but set the
447                 TTY_CLOSING flag so that we know that this tty structure
448                 isn't long for this world.
450         * tty_io.c (init_dev): Add sanity code to check to see if
451                 TTY_CLOSING is set on a tty structure; if so, something
452                 bad has happened (probably a line discipline close blocked
453                 when it shouldn't have; so do a kernel printk and then
454                 return an error).
456 Wed Apr 26 10:23:44 1995  Theodore Y. Ts'o  <tytso@localhost>
458         * tty_io.c (release_dev): Try to shutdown the line discipline
459                 *before* decrementing the tty count variable; this removes
460                 a potential race condition which occurs when the line
461                 discipline close blocks, and another process then tries
462                 open the same serial port.
464         * serial.c (rs_hangup): When hanging up, flush the output buffer
465                 before shutting down the UART.  Otherwise the line
466                 discipline close blocks waiting for the characters to get
467                 flushed, which never happens until the serial port gets reused.
469 Wed Apr 12 08:06:16 1995  Theodore Y. Ts'o  <tytso@localhost>
471         * serial.c (do_serial_hangup, do_softint, check_modem_status,
472                 rs_init):  Hangups are now scheduled via a separate tqueue
473                 structure in the async_struct structure, tqueue_hangup.
474                 This task is pushed on to the tq_schedule queue, so that
475                 it is processed synchronously by the scheduler.
477 Sat Feb 18 12:13:51 1995  Theodore Y. Ts'o  (tytso@rt-11)
479         * tty_io.c (disassociate_ctty, tty_open, tty_ioctl): Clear
480                 current->tty_old_pgrp field when a session leader
481                 acquires a controlling tty, and after a session leader
482                 has disassociated from a controlling tty.
484 Fri Feb 17 09:34:09 1995  Theodore Y. Ts'o  (tytso@rt-11)
486         * serial.c (rs_interrupt_single, rs_interrupt, rs_interrupt_multi): 
487                 Change the number of passes made from 64 to be 256,
488                 configurable with the #define RS_ISR_PASS_LIMIT.
490         * serial.c (rs_init, set_serial_info, get_serial_info, rs_close):
491                 Remove support for closing_wait2.  Instead, set
492                 tty->closing and rely on the line discipline to prevent
493                 echo wars.
495         * n_tty.c (n_tty_receive_char):  IEXTEN does not need to be
496                 enabled in order for IXANY to be active.
498                 If tty->closing is set, then only process XON and XOFF
499                 characters.
501 Sun Feb 12 23:57:48 1995  Theodore Y. Ts'o  (tytso@rt-11)
503         * serial.c (rs_timer): Change the interrupt poll time from 60
504                 seconds to 10 seconds, configurable with the #define
505                 RS_STROBE_TIME.
507         * serial.c (rs_interrupt_multi, startup, shutdown, rs_ioctl,
508                 set_multiport_struct, get_multiport_struct): Add
509                 provisions for a new type of interrupt service routine,
510                 which better supports multiple serial ports on a single
511                 IRQ.  
513 Sun Feb  5 19:35:11 1995  Theodore Y. Ts'o  (tytso@rt-11)
515         * tty_ioctl.c (n_tty_ioctl, set_termios, tty_wait_until_sent): 
516         * serial.c (rs_ioctl, rs_close): 
517         * cyclades.c (cy_ioctl, cy_close): 
518         * n_tty.c (n_tty_close):  Rename wait_until_sent to
519                 tty_wait_until_sent, so that it's a better name to export
520                 in ksyms.c.
522 Sat Feb  4 23:36:20 1995  Theodore Y. Ts'o  (tytso@rt-11)
524         * serial.c (rs_close): Added missing check for closing_wait2 being
525                 ASYNC_CLOSING_WAIT_NONE.
527 Thu Jan 26 09:02:49 1995  Theodore Y. Ts'o  (tytso@rt-11)
529         * serial.c (rs_init, set_serial_info, get_serial_info,
530                 rs_close): Support close_wait in the serial driver.
531                 This is helpful for slow devices (like serial
532                 plotters) so that their outputs don't get flushed upon
533                 device close.  This has to be configurable because
534                 normally we don't want ports to be hung up for long
535                 periods of time during a close when they are not
536                 connected to a device, or the device is powered off.
538                 The default is to wait 30 seconds; in the case of a
539                 very slow device, the close_wait timeout should be
540                 lengthened.  If it is set to 0, the kernel will wait
541                 forever for all of the data to be transmitted.
543 Thu Jan 17 01:17:20 1995  Theodore Y. Ts'o  (tytso@rt-11)
545         * serial.c (startup, change_speed, rs_init): Add support to detect
546                 the StarTech 16650 chip.  Treat it as a 16450 for now,
547                 because of its FIFO bugs.
549 Thu Jan  5 21:21:57 1995  <dhinds@allegro.stanford.edu>
551         * serial.c: (receive_char): Added counter to prevent infinite loop
552                 when a PCMCIA serial device is ejected.
554 Thu Dec 29 17:53:48 1994    <tytso@rsx-11.mit.edu>
556         * tty_io.c (check_tty_count): New procedure which checks
557                 tty->count to make sure that it matches with the number of
558                 open file descriptors which point at the structure.  If
559                 the number doesn't match, it prints a warning message.
561 Wed Dec 28 15:41:51 1994    <tytso@rsx-11.mit.edu>
563         * tty_io.c (do_tty_hangup, disassociate_ctty): At hangup time,
564                 save the tty's current foreground process group in the
565                 session leader's task structure.  When the session leader
566                 terminates, send a SIGHUP, SIGCONT to that process group.
567                 This is not required by POSIX, but it's not prohibited
568                 either, and it appears to be the least intrusive way
569                 to fix a problem that dialup servers have with
570                 orphaned process groups caused by modem hangups.
572 Thu Dec  8 14:52:11 1994    <tytso@rsx-11.mit.edu>
574         * serial.c (rs_ioctl): Don't allow most ioctl's if the serial port
575                 isn't initialized.
577         * serial.c (rs_close): Don't clear the IER if the serial port
578                 isn't initialized. 
580         * serial.c (block_til_ready): Don't try to block on the dialin
581                 port if the serial port isn't initialized.
583 Wed Dec  7 10:48:30 1994  Si Park (si@wimpol.demon.co.uk)
584         * tty_io.c (tty_register_driver): Fix bug when linking onto
585                 the tty_drivers list. We now test that there are elements
586                 already on the list before setting the back link from the
587                 first element to the new driver.
589         * tty_io.c (tty_unregister_driver): Fix bug in unlinking the
590                 specified driver from the tty_drivers list. We were not
591                 setting the back link correctly. This used to result in
592                 a dangling back link pointer and cause panics on the next
593                 call to get_tty_driver().
595 Tue Nov 29 10:21:09 1994  Theodore Y. Ts'o  (tytso@rt-11)
597         * tty_io.c (tty_unregister_driver): Fix bug in
598                 tty_unregister_driver where the pointer to the refcount is
599                 tested, instead of the refcount itself.  This caused
600                 tty_unregister_driver to always return EBUSY.
602 Sat Nov 26 11:59:24 1994  Theodore Y. Ts'o  (tytso@rt-11)
604         * tty_io.c (tty_ioctl): Add support for the new ioctl
605                 TIOCTTYGSTRUCT, which allow a kernel debugging program
606                 direct read access to the tty and tty_driver structures.
608 Fri Nov 25 17:26:22 1994  Theodore Y. Ts'o  (tytso@rt-11)
610         * serial.c (rs_set_termios): Don't wake up processes blocked in
611                 open when the CLOCAL flag changes, since a blocking
612                 open only samples the CLOCAL flag once when it blocks,
613                 and doesn't check it again.  (n.b.  FreeBSD has a
614                 different behavior for blocking opens; it's not clear
615                 whether Linux or FreeBSD's interpretation is correct.
616                 POSIX doesn't give clear guidance on this issue, so
617                 this may change in the future....)
619         * serial.c (block_til_ready): Use the correct termios structure to
620                 check the CLOCAL flag.  If the cuaXX device is active,
621                 then check the saved termios for the ttySXX device.
622                 Otherwise, use the currently active termios structure.
624 Sun Nov  6 21:05:44 1994  Theodore Y. Ts'o  (tytso@rt-11)
626         * serial.c (change_speed): Add support for direct access of
627                 57,600 and 115,200 bps.
629 Wed Nov  2 10:32:36 1994  Theodore Y. Ts'o  (tytso@rt-11)
631         * n_tty.c (n_tty_receive_room): Only allow excess characters
632                 through if we are in ICANON mode *and* there are other no
633                 pending lines in the buffer.  Otherwise cut and paste over
634                 4k breaks.
636 Sat Oct 29 18:17:34 1994  Theodore Y. Ts'o  (tytso@rt-11)
638         * serial.c (rs_ioctl, get_lsr_info): Added patch suggested by Arne
639                 Riiber so that user mode programs can tell when the
640                 transmitter shift register is empty.
642 Thu Oct 27 23:14:29 1994  Theodore Y. Ts'o  (tytso@rt-11)
644         * tty_ioctl.c (wait_until_sent): Added debugging printk statements
645                 (under the #ifdef TTY_DEBUG_WAIT_UNTIL_SENT)  
647         * serial.c (rs_interrupt, rs_interrupt_single, receive_chars,
648                 change_speed, rs_close): rs_close now disables receiver
649                 interrupts when closing the serial port.  This allows the
650                 serial port to close quickly when Linux and a modem (or a
651                 mouse) are engaged in an echo war; when closing the serial
652                 port, we now first stop listening to incoming characters,
653                 and *then* wait for the transmit buffer to drain.  
655                 In order to make this change, the info->read_status_mask
656                 is now used to control what bits of the line status
657                 register are looked at in the interrupt routine in all
658                 cases; previously it was only used in receive_chars to
659                 select a few of the status bits.
661 Mon Oct 24 23:36:21 1994  Theodore Y. Ts'o  (tytso@rt-11)
663         * serial.c (rs_close): Add a timeout to the transmitter flush
664                 loop; this is just a sanity check in case we have flaky
665                 (or non-existent-but-configured-by-the-user) hardware.
667 Fri Oct 21 09:37:23 1994  Theodore Y. Ts'o  (tytso@rt-11)
669         * tty_io.c (tty_fasync): When asynchronous I/O is enabled, if the
670                 process or process group has not be specified yet, set it
671                 to be the tty's process group, or if that is not yet set,
672                 to the current process's pid.
674 Thu Oct 20 23:17:28 1994  Theodore Y. Ts'o  (tytso@rt-11)
676         * n_tty.c (n_tty_receive_room): If we are doing input
677                 canonicalization, let as many characters through as
678                 possible, so that the excess characters can be "beeped".
680 Tue Oct 18 10:02:43 1994  Theodore Y. Ts'o  (tytso@rt-11)
682         * serial.c (rs_start): Removed an incorrect '!' that was
683                 preventing transmit interrupts from being re-enabled in
684                 rs_start().  Fortunately in most cases it would be
685                 re-enabled elsewhere, but this still should be fixed
686                 correctly.
688 Sun Oct  9 23:46:03 1994  Theodore Y. Ts'o  (tytso@rt-11)
690         * tty_io.c (do_tty_hangup): If the tty driver flags
691                 TTY_DRIVER_RESET_TERMIOS is set, then reset the termios
692                 settings back to the driver's initial configuration.  This
693                 allows the termios settings to be reset even if a process
694                 has hung up file descriptors keeping a pty's termios from
695                 being freed and reset.
697         * tty_io.c (release_dev): Fix memory leak.  The pty's other
698                 termios structure should also be freed.
700         * serial.c (rs_close, shutdown): Change how we wait for the
701                 transmitter to completely drain before shutting down the
702                 serial port.  We now do it by scheduling in another
703                 process instead of busy looping with the interrupts turned
704                 on.  This may eliminate some race condition problems that
705                 some people seem to be reporting.
707 Sun Sep 25 14:18:14 1994  Theodore Y. Ts'o  (tytso@rt-11)
709         * tty_io.c (release_dev): When freeing a tty make sure that both
710                 the tty and the o_tty (if present) aren't a process's
711                 controlling tty.  (Previously, we only checked the tty.)
713         * serial.c (change_speed): Only enable the Modem Status
714                 Interrupt for a port if CLOCAL is not set or CRTSCTS
715                 is set.  If we're not checking the carrier detect and
716                 CTS line, there's no point in enabling the modem
717                 status interrupt.  This will save spurious interrupts
718                 from slowing down systems who have terminals that
719                 don't support either line.  (Of course, if you want
720                 only one of CD and CTS support, you will need a
721                 properly wired serial cable.)
723 Thu Sep 22 08:32:48 1994  Theodore Y. Ts'o  (tytso@rt-11)
725         * tty_io.c (do_SAK): Return if tty is null.
727         * tty_io.c (_tty_name): Return "NULL tty" if the passed in tty is
728                 NULL.
730 Sat Sep 17 13:19:25 1994  Theodore Y. Ts'o  (tytso@rt-11)
732         * tty_ioctl.c (n_tty_ioctl): Fix TIOCGLCKTRMIOS and
733                 TIOCSLCKTRMIOS, which were totally broken.  Remove
734                 extra indirection from argument; it should be a struct
735                 termios *, not a struct termios **.
736                 &real_tty->termios_locked should have been
737                 real_tty->termios_locked.  This caused us to be
738                 reading and writing the termios_locked structure to
739                 random places in kernel memory.  
741         * tty_io.c (release_dev): Oops!  Forgot to delete a critical kfree
742                 of the locked_termios.  This leaves the locked_termios
743                 structure pointed at a freed object.  
745 Fri Sep 16 08:13:25 1994  Theodore Y. Ts'o  (tytso@rt-11)
747         * tty_io.c (tty_open): Don't check for an exclusive open until
748                 after the device specific open routine has been called.
749                 Otherwise, the serial device ref counting will be screwed
750                 up.
752         * serial.c (rs_open, block_til_ready): Don't set termios structure
753                 until after block_til_ready has returned successfully.
754                 Modify block_til_ready to check the normal_termios
755                 structure directly, so it doesn't rely on termios being
756                 set before it's called.
758 Thu Sep 15 23:34:01 1994  Theodore Y. Ts'o  (tytso@rt-11)
760         * serial.c (rs_close): Turn off interrupts during rs_close() to
761                 prevent a race condition with the hangup code (which
762                 runs during a software interrupt).
764         * tty_io.c (release_dev): Don't free the locked_termios structure;
765                 its state must be retained across device opens.
768         * tty_io.c (tty_unregister_driver): Added function to unregister a
769                 tty driver.  (For loadable device drivers.)