Subject: Port independent cdevsw[]
To: None <>
From: Lennart Augustsson <>
List: tech-kern
Date: 10/15/2000 18:03:33
I know this has been discussed before, but I'd like to bring it up again.

Why do we have a cdevsw[] and bdevsw[] for each port?  Purely historical
reasons I'd say.  It's a real nuisance.  Whenever you add a MI device
driver you have to change far to many places.  You need to update the
conf.c file for all ports that can have the device, and then the MAKEDEV
for the corresponding ports.  This is annoying and error prone.

I suggest that we switch over to having a mostly port independent [bc]devsw
tables.  There is still a need to have port specific drivers so I suggest the
following design:

    Set aside a part of the major device numbers for port specific driver,
    say 0-255.  The table for this will be port specific.
    The rest of the major numbers are port independent and stored in a
    central table.

This design would allow us to slowly move over to MI drivers since the
old tables will still work.  To keep backwards compatibility we can
just keep duplicate entries in the port specific tables and the new one.


(I might be persuaded to do the changes if we decide to change.)


        -- Lennart