mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Jason Wessel <jason.wessel@windriver.com>,
	USB list <linux-usb@vger.kernel.org>,
	Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: How to handle console devices
Date: Tue, 29 Sep 2009 23:47:33 +0100	[thread overview]
Message-ID: <20090929234733.5b9fbc67@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0909291310200.18601-100000@netrider.rowland.org>

> 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?

What I long term envisioned was that 

- Every tty (or at least every interesting tty) would have a tty_port
  object for the hardware  [done now for all consoles but vt]
- Every tty port object would have an "output" method
- The tty->termios would move to the tty_port
- The tty receive buffers would move to the tty_port (only needed for a
  console that supports input)

At that point
- The tty lock/refcount isn't needed all the time for the receive data
  paths which speeds it up a fair bit
- A console can be implemented without a tty_struct anywhere in sight
- Flow control and speed setting can be done on hardware generically on
  resume paths

That fixes the lifetime and magic object invention issues that plague the
current console.

I still think that is the right way to fix it.

Alan

  reply	other threads:[~2009-09-29 22:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-17  3:08 [PATCH 0/3] usb console: 2.6.32 regression fixes Jason Wessel
2009-09-17  3:08 ` [PATCH 1/3] usb console: fix mutex lock regression Jason Wessel
2009-09-17  3:08   ` [PATCH 2/3] usb console,usb-serial: fix regression use of serial->console Jason Wessel
2009-09-17  3:08     ` [PATCH 3/3] usb console,usb-serial: pass initial console baud on to first tty open Jason Wessel
2009-09-17  3:32       ` Alan Stern
2009-09-17  3:40         ` Jason Wessel
2009-09-17  3:46           ` Alan Stern
2009-09-17  4:17             ` Jason Wessel
2009-09-17  9:14               ` Alan Cox
2009-09-17 12:16                 ` Jason Wessel
2009-09-17 13:08                   ` Alan Cox
2009-09-17 13:19                     ` Alan Cox
2009-09-17 14:17                       ` Jason Wessel
2009-09-17 16:02                         ` Alan Cox
2009-09-22 20:54                           ` Jason Wessel
2009-09-29 17:24                             ` How to handle console devices Alan Stern
2009-09-29 22:47                               ` Alan Cox [this message]
2009-09-17  3:30     ` [PATCH 2/3] usb console,usb-serial: fix regression use of serial->console Alan Stern
2009-09-17  3:32       ` Jason Wessel
2009-09-17  3:25   ` [PATCH 1/3] usb console: fix mutex lock regression Alan Stern
2009-09-17  3:32     ` Jason Wessel
2009-09-18 17:16     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090929234733.5b9fbc67@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=jason.wessel@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®