devfs
[Top] [All Lists]

Re: ttyS1, S2, etc...

To: Richard Gooch <rgooch@xxxxxxxxxxxxx>
Subject: Re: ttyS1, S2, etc...
From: Jurgen Botz <jurgen@xxxxxxxx>
Date: Thu, 16 Mar 2000 09:51:18 -0800
Cc: devfs@xxxxxxxxxxx, tytso@xxxxxxx
In-reply-to: Message from Richard Gooch <rgooch@xxxxxxxxxxxxx> of "Thu, 16 Mar 2000 11:30:42 +1100." <200003160030.LAA21959@xxxxxxxxxxxxxxxxxxxxx>
Sender: owner-devfs@xxxxxxxxxxx
Richard Gooch wrote:
> In drivers/char/serial.c:register_serial() there are calls which
> create devfs entries. So the low-level serial driver should call
> register_serial() and everything should be fine. It certainly works
> for PCMCIA serial cards. Insert the card and the devfs entry magically
> appears.

The problem is that ISA multiport serial cards don't appear to be
detected by the kernel at all and register_serial never gets called.
To use the ports you set the IO base and IRQ with setserial which
sets them in the driver with ioctls on the device.  This bypasses
register_serial in the driver, too, so even if I create /dev/ttyS2
and then do the setserial thing, /dev/tts/2 still doesn't appear
(but /dev/ttyS2 then works fine).  Not that that would make a
difference for devfs, of course.

Looking through serial.c I see that PCI and ISAPNP cards probably
don't have this problem since the driver detects them and 
presumably calls register_serial for their ports.

There is probably no way around this chick-and-egg problem without
providing some alternate run-time or init-time configuration 
mechanism for the serial driver (i.e. module/kernel flags maybe).
That may not be worth the trouble to provide automatic devfs 
support for the diminishing number of non-PNP ISA multiport
boards out there.  Since I currently have to run an rc script
to configure the ports anyway, I might as well create the device
files there with mknod.

I'm copying tytso in case in case he has any thoughts on this...

- Jürgen




<Prev in Thread] Current Thread [Next in Thread>