[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0909291310200.18601-100000@netrider.rowland.org>
Date: Tue, 29 Sep 2009 13:24:26 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
cc: Jason Wessel <jason.wessel@...driver.com>,
USB list <linux-usb@...r.kernel.org>,
Kernel development list <linux-kernel@...r.kernel.org>
Subject: How to handle console devices
Alan:
Jason and I discussed how console devices (both USB-serial and others)
should be handled. My feeling is that these devices should persist
throughout the entire life of the kernel, not disappearing until the
system goes down. So for example, if ttyUSB0 were to be a console and
the user were to unplug the corresponding USB serial device, ttyUSB0
would remain in existence -- unusable but still there -- and any new
USB serial devices would show up as ttyUSB1 or higher.
In addition, console output shouldn't be sent through these devices
before the driver has properly initialized the hardware. And once
initialized, the hardware should never be shut down.
In the end, this amounts to making the kernel open each console device
when it is registered as a console. The open call would create a tty
and termios to go with the device. The open "file" reference would
never be closed, preventing the tty and termios from being released and
preventing the hardware from being shut down.
I don't know what the best way is to accomplish this. Create dummy
inode and file structs and pass them to the usual tty_open() routine?
(But then what about hangup event handling?) What do you think?
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists