lkml.org 
[lkml]   [2008]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/7] kgdboc, tty: use tty open to start low level drivers
On Tue, 21 Oct 2008 14:14:51 -0500
Jason Wessel <jason.wessel@windriver.com> wrote:

> This patch adds two new hooks to the tty layer in tty_io.c to allow

Gak

> A few minor changes were needed in tty_io.c to deal with the fact that
> the inode and fpath.dentry were NULL with the generic flip structure.

Gak and more gak

> + tty = tty_driver_lookup_tty(driver, NULL, tty_line);
> + if (!tty) {
> + tty = tty_init_dev(driver, tty_line, 0);
> + inc_tty = 0;
> + }
> + (*filp)->private_data = tty;
> + ret = tty->ops->open(tty, *filp);

Digging deep into tty innards (some of which btw are going to change)

> + unlock_kernel();
> + } else {
> + tty = tty_driver_lookup_tty(driver, NULL, tty_line);
> + if (!tty) {
> + tty = tty_init_dev(driver, tty_line, 0);
> + inc_tty = 0;
> + }
> + (*filp)->private_data = tty;
> + ret = tty->ops->open(tty, *filp);

and with the error paths wrong


This is to put it bluntly just horrible.

Really kgdb, console and other boot processes need an abstraction for tty
device ports at the device (not ldisc) level and until that work is done
there is no acceptable way to sort this out. Merging gunk like this will
simply make the existing mess worse and provide more crap that will make
it harder to fix properly.

All this stuff needs revisiting when every tty device side object in the
kernel contains a struct tty_port, until then it's a nasty (perhaps
neccessary for the moment) hack that belongs out of tree.

Alan


\
 
 \ /
  Last update: 2008-10-22 00:49    [W:0.110 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site