2002-09-21 02:50:20

by David Brownell

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: 2.5.26 hotplug failure

Greg KH wrote:
> On Fri, Sep 20, 2002 at 01:42:50PM -0700, David Brownell wrote:
>
>>Actually it does more than that ... it tells you what minor numbers
>>are assigned to the drivers _currently loaded_ which means that it's
>>not really useful the instant someone plugs in another device.
>
>
> Wait, I'm confused, which one is "it"? The old /proc/bus/usb/drivers
> file, or the new driverfs stuff?

The old file.


>>You can't use it to allocate numbers or tell what /dev/file/name matches
>>a given device ... so what is its value, other than providing a limited
>>minor number counterpart to /proc/devices? (Which, confusingly, doesn't
>>list devices but major numbers.)
>
>
> I'm working on adding the minor number info to the usb driverfs code
> right now, so that info will be available.

How about a facility to create the character (or block?) special file
node right there in the driverfs directory? Optional of course.

The deal being that we really don't want to care at all about major
or minor numbers. If you only add minor, major remains an issue.
If you add both, then the problem is where to find the darn device
special file. If you add the device (special) file ... then it's easy
for device drivers to migrate! 'devlabel' or somesuch could manage
symlinks to "user friendly names" using class level hotplug events,
and smarter apps would start to scan driverfs directly.

- Dave





2002-09-21 03:26:59

by Greg KH

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: 2.5.26 hotplug failure

On Fri, Sep 20, 2002 at 07:55:22PM -0700, David Brownell wrote:
>
> How about a facility to create the character (or block?) special file
> node right there in the driverfs directory? Optional of course.

No, Linus has stated that this is not ok to do. See the lkml archives
for the whole discussion about this.

thanks,

greg k-h