Re: [TEST/REVIEW/HEADSUP] tty drivers mega-patch

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Wed, 14 Jul 2004 12:04:57 +0200
In message <20040714024623.GB623_at_dhcp50.pn.xcllnt.net>, Marcel Moolenaar writes
:
>On Wed, Jul 14, 2004 at 12:09:47AM +0200, Poul-Henning Kamp wrote:
>> 
>> http://phk.freebsd.dk/patch/tty.patch
>> 
>> This patch removes 2500 lines of copy&paste insanity in tty drivers
>> and generally tries to get things to be less confused & confusing.
>> 
>> I need testers for all the different kinds of serial hardware we support.
>> 
>> Please help test!
>
>boot -s is generally broken. No characters can be typed. This is
>with syscons(4) and uart(4) and probably any other driver. Might
>be related to the lack of NL->CRNL

I have this fixed in a new patch I just uploaded.

marcel: I don't think the kassert in uart which tripped you should
be there any more.  Can you try to remove it and see that nothing
bad happens ?

With respect to the "init"/"lock" devices:

Drivers are not forced to them, they get created if ttymakeslaves()
is called, and the driver is free not to do that.

I added it to uart because I thought it was a sufficiently high-profile
driver that we should have the cua/init/lock ability on it.  (as
opposed to ptys or dcons for instance).  If you don't want it,
I'll remove it again (but read on first).

The traditional naming has been the inserted "i" and "l" which I
agree is arcane.  I'm not against changing it to ".init" and ".lock"
if we can get concensus.

I would prefer to stick to the "tty" and "cua" prefixes however.

The plan is to make them on-demand-devices (clonable) so that they
do not clutter up /dev but appear if you access them.  That would
leave only the ttyu0 and cuau0 devices.

-- 
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 Wed Jul 14 2004 - 08:05:01 UTC

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