Re: [PATCH] Stop pmac_zilog from abusing 8250's device numbers.

From: H. Peter Anvin
Date: Wed Apr 04 2007 - 12:17:42 EST


Theodore Tso wrote:

The other thing I would probably do if I were to do it all over again
is allow serial devices to be named independent of /dev/ttySx
interface, these days probably using /sysfs, so that you could easily
query to figure out what serial controllers/cards were on the system,
and assign specific controllers/ports to specific /dev/ttySx devices.
We could also provide a registration system to allow on-line
configuration of non-probeable serial cards attached to primitive
buses that don't alllow probing, such as the ISA bus, although perhaps
that's much less important in this day and age.


One option would be to move the 8250-based serial ports, to, say, /dev/ttyN* (for National Semiconductors -- the best I could come up with) and redefine /dev/ttyS* as a serial port multiplexer which maps in all the types, for the ones that really want dynamic mapping.

Then the ones who want static mapping can still have them. This would presumably work with early remapping in open(), similar to the way ptmx is done.

Of course, now you have the potential of aliasing, again, which tends to cause all kinds of headaches w.r.t. locking. From that perspective, it would be better if udev made symlinks, and we made the kernel use some sort of discovery syntax for console= (say, "console=serial0" to hunt down the "first" serial port for some definition thereof.)

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/