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