[HEADSUP] Breaking all the tty drivers one by one...

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Fri, 01 Oct 2004 09:29:05 +0200
I am going to commit the meaty part of the tty driver cleanup up
starting this weekend and I'll probably do about one or two drivers
per day for the next couple of weeks.

The total patch is close to 10000 lines and it removes around 3300
lines of duplicated code in the tty drivers.

Architectural "before" picture:

                                 
                         filesystem code
                                |
                                v
                              DEVFS
                                |
                                v
                      cdevsw device interface
                                |
                                v
                 /     code to make device
A single tty    |     look and act like a
driver. We have |      a tty to the system
20-30 drivers   |               |
in total.       |               v
                 \    tty hardware handling
                                 

Architectural "after" picture:
                                 
                                 
                         filesystem code
                                |
                                v
                              DEVFS
                                |
                                v
                      cdevsw device interface
                                |
                                v
Now only one     /     code to make device
copy of this    |      look and act like a
code.            \     a tty to the system
                                |
                                v
                       tty driver interface
                                |
                                v
20-30 of these   <    tty hardware handling


In addition to the much saner code structure after this, it also
makes our ttys look a lot more like each other.  Today there is a
lot of annoying small differences between the different drivers.
Some have this feature, some havn't.  Making all the drivers use
the same upper level code makes them behave like a coherent class
of drivers (subject of course to hardware limitations).  In particular
the naming will be made systematic (see earlier email on this
subject).
                                 
The problem is that I can't test more than a few of the tty drivers
for lack of hardware so I will undoubtedly break some drivers along
the way.  I have tried to contact all the authors/maintainers/stuckees
as best I could, and the majority of them have been very understanding
and answered along the lines of "go ahead, I'll fix it if you break
it".  Much appreciated guys.

If there are any driver maintainers/owners/etc who wants me to
leave their driver alone, now is the time to say so!

Otherwise, keep your eyes open, test any weird serial hardware you
have in your collection, and don't yell too loudly at me too fast,
I'll do my best to fix the mistakes I make along the way.

Poul-Henning

PS: The not quite finished patch can be seen in the perforce branch
"phk_tty".

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk_at_FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
Received on Fri Oct 01 2004 - 05:29:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:15 UTC