Re: UIO device name

From: Ben Nizette
Date: Thu Sep 25 2008 - 06:58:59 EST



On Thu, 2008-09-25 at 12:05 +0200, Joakim Tjernlund wrote:
> On Thu, 2008-09-25 at 08:57 +1000, Ben Nizette wrote:
> >
> > My software just walks /sys/class/uio/uioX/name, finds the one which
> > matches then opens the corresponding device. No scripts needed, no
> > in-kernel hackery or policy making, just the interface used as the maker
> > intended. What's your problem with this approach?
>
> My problem is this, uio is a generic container for any user space device
> and by itself it doesn't mean much. You put some protocol driver on top
> of uio, such as uio_smx, to make it mean something.
>
> Comparing uio with hdX is wrong as hdX means something, it is a block
> device for a disk.
> A better comparison would be if all kernel devices were named kio%d and
> you had to scan /sys to find the name hdX.

UIO drivers certainly aren't first class citizens like kernel mode
drivers. They just aren't.

>
> Look at the spi subsystem, the protocol drivers name them self.

UIO is an interface type, not a bus type. UIO isn't a subsystem as
such, it's a user interface. If the interface is consistent (even if
the backing device is different) I don't see the problem with consistent
naming.

Anyway, I don't really see the point arguing here - the interface is
what it is, it does everything it needs to to allow you to identify the
device nodes. The kernel boys have spent a lot of effort over time
letting userspace identify and name device nodes and I don't really see
the difference here :-)

--Ben.


--
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/