lkml.org 
[lkml]   [2004]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6] Altix serial driver
On Mon, Jun 28, 2004 at 03:20:00PM -0700, Andrew Morton wrote:
> Pat Gefre <pfg@sgi.com> wrote:
> >
> > On Mon, 28 Jun 2004, Andrew Morton wrote:
> >
> > + Pat Gefre <pfg@sgi.com> wrote:
> > + >
> > + > We think we should stick with the major/minor set we have proposed. We
> > + > don't like hacking the 8250 code, dynamic allocation doesn't work (once
> > + > that works we will update our driver to use it), registering for our
> > + > own major/minor may not work (if we DO get one we will update the
> > + > driver to reflect it) but in the meantime we need to get something in
> > + > the community that works.
> > +
> > + "we don't like" isn't a very strong argument ;)
> > +
> > + It does sound to me like some work is needed in the generic serial layer to
> > + teach it to get its sticky paws off the ttyS0 major/minor if there is no
> > + corresponding hardware. AFAICT nobody has scoped out exactly what has to
> > + be done for a clean solution there - it may not be very complex. So could
> > + we please explore that a little further?
> > +
> > + If that proves to be impractical for some reason then I'd be inclined to
> > + allocate a new misc minor, stick it in devices.txt and be done with it.
> >
> > I'm not sure I understand what you mean by this. Use a different major
> > (one that is likely to not be used by anyone else on our system) and a
> > minor that no one is assigned ?
> >
>
> Or use dynamic allocation. I'm trying to understand why early-boot code
> needs to know the major/minor when it will be accessing the driver via
> /dev/console anyway.

It's all a mess of struct console, struct tty_driver, registration
thereof, and device indexes.

To summarise, to open a tty device, even /dev/console, we need to find
a struct tty_driver and a tty device index, which we get from the
struct console. The /dev/console aliases on to the real tty device
on the device driver. tty_driver structures are registered with the
tty layer, and claim some char device space, whether or not there's
hardware behind them.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.367 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site