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