All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about Hot device Identity
@ 2003-06-23  3:04 Guo, Min
  2003-06-23  3:22 ` Greg KH
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Guo, Min @ 2003-06-23  3:04 UTC (permalink / raw)
  To: linux-hotplug

Hi, Greg

	After read your udev code, I know that there are three components would be done
in the udev project 

1) udev - dynamic replacement for /dev
2) namedev - device naming
3) libsysfs - a standard library for accessing device information on thesystem.

So, is there any progress on the namedev and libsysfs? I found your udev is based on the 
sysfs file system, but if sysfs can not be accepted by linux kernel, how will udev going?

Is the udev project  still as a part of linux hotplug when it is released?
 
I think there are some tasks are waiting to do, so could you please tell the detailed
progress in current udev project? 

Thank you in advance for your kind help.

Thanks
Guo Min 
The content of this email message solely contains my own personal views,
and not those of my employer.



 


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
@ 2003-06-23  3:22 ` Greg KH
  2003-06-24  7:01 ` Guo, Min
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2003-06-23  3:22 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Jun 23, 2003 at 11:04:12AM +0800, Guo, Min wrote:
> Hi, Greg
> 
> 	After read your udev code, I know that there are three components would be done
> in the udev project 
> 
> 1) udev - dynamic replacement for /dev
> 2) namedev - device naming
> 3) libsysfs - a standard library for accessing device information on thesystem.
> 
> So, is there any progress on the namedev and libsysfs? I found your
> udev is based on the sysfs file system, but if sysfs can not be
> accepted by linux kernel, how will udev going?

Um, sysfs _is_ in the kernel already.

As for the progress of libsysfs, yes, there are some people working on
it.  Hopefully they will release something publicly soon (hint, hint,
hint...)

> Is the udev project  still as a part of linux hotplug when it is released?

It will use the /sbin/hotplug hook that the current linux-hotplug
release uses.  Does that explain what you are asking?

And there is already a version of udev "released" it's on the kernel.org
site if you want to play with it.

> I think there are some tasks are waiting to do, so could you please
> tell the detailed progress in current udev project? 

Most of the work has been on the OLS presentation lately, but after OLS
a lot more time will be available to work on it.

If there's any part of udev that you want to help out on right now, feel
free to let me know.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
  2003-06-23  3:22 ` Greg KH
@ 2003-06-24  7:01 ` Guo, Min
  2003-06-24 16:20 ` Greg KH
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Guo, Min @ 2003-06-24  7:01 UTC (permalink / raw)
  To: linux-hotplug

Thanks a lot!
I am now playing with your udev:-), and I encounter some problems.

	I use a usb mouse as a PnP devices, after I mount sysfs, I can not 
	find any devices in /sysfs/devices/pci0/00:0f.2 as  DEVPATH=/devices/pci0/00:09.0/usb1/1-1/1-1.1/ttyUSB7 in the test file udev supplied.

	00:0f.2 is my USB controller,

	ls /sysfs/devices/pci0/00:0f.2 
	
		class   irq   power     subsystem_device  vendor
		device  name  resource  subsystem_vendor

	So I think the configuration files you given out is for usb hub,is that right? For the common USB mouse,
	can I only configure DEVPATH=/sysfs/devices/pci0/00:0f.2? I tried this,but no results. Could you please
	tell me what cause this problem?

Thanks
Guo Min

-----Original Message-----
From: Greg KH [mailto:greg@kroah.com]
Sent: Monday, June 23, 2003 11:23 AM
To: Guo, Min
Cc: linux-hotplug-devel@lists.sourceforge.net
Subject: Re: Question about Hot device Identity


On Mon, Jun 23, 2003 at 11:04:12AM +0800, Guo, Min wrote:
> Hi, Greg
> 
> 	After read your udev code, I know that there are three components would be done
> in the udev project 
> 
> 1) udev - dynamic replacement for /dev
> 2) namedev - device naming
> 3) libsysfs - a standard library for accessing device information on thesystem.
> 
> So, is there any progress on the namedev and libsysfs? I found your
> udev is based on the sysfs file system, but if sysfs can not be
> accepted by linux kernel, how will udev going?

Um, sysfs _is_ in the kernel already.

As for the progress of libsysfs, yes, there are some people working on
it.  Hopefully they will release something publicly soon (hint, hint,
hint...)

> Is the udev project  still as a part of linux hotplug when it is released?

It will use the /sbin/hotplug hook that the current linux-hotplug
release uses.  Does that explain what you are asking?

And there is already a version of udev "released" it's on the kernel.org
site if you want to play with it.

> I think there are some tasks are waiting to do, so could you please
> tell the detailed progress in current udev project? 

Most of the work has been on the OLS presentation lately, but after OLS
a lot more time will be available to work on it.

If there's any part of udev that you want to help out on right now, feel
free to let me know.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
  2003-06-23  3:22 ` Greg KH
  2003-06-24  7:01 ` Guo, Min
@ 2003-06-24 16:20 ` Greg KH
  2003-06-25  2:24 ` Guo, Min
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2003-06-24 16:20 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Jun 24, 2003 at 03:01:21PM +0800, Guo, Min wrote:
> Thanks a lot!
> I am now playing with your udev:-), and I encounter some problems.
> 
> I use a usb mouse as a PnP devices, after I mount sysfs, I can not
> find any devices in /sysfs/devices/pci0/00:0f.2 as
> DEVPATH=/devices/pci0/00:09.0/usb1/1-1/1-1.1/ttyUSB7 in the test file
> udev supplied.
> 
> 	00:0f.2 is my USB controller,
> 
> 	ls /sysfs/devices/pci0/00:0f.2 
> 	
> 		class   irq   power     subsystem_device  vendor
> 		device  name  resource  subsystem_vendor
> 
> So I think the configuration files you given out is for usb hub,is
> that right? For the common USB mouse, can I only configure
> DEVPATH=/sysfs/devices/pci0/00:0f.2? I tried this,but no results.
> Could you please tell me what cause this problem?

What problem?  udev only creates dev entries for things that show up in
/sys/class/* that have a file called "dev" in them.  Right now, there is
no kernel support for mice under /sys/class/ (but there was a patch
proposed for this posted to linux-kernel by Hanna Linder a few weeks
ago.)

Because of this, udev will not work for your mouse right now, sorry.

So right now my main focus has been providing support in the kernel for
/sys/class for all types of devices, as that is what udev needs.  Help
with this effort is greatly appreciated.

thanks,

gre k-h


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
                   ` (2 preceding siblings ...)
  2003-06-24 16:20 ` Greg KH
@ 2003-06-25  2:24 ` Guo, Min
  2003-06-25  2:33 ` Greg KH
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Guo, Min @ 2003-06-25  2:24 UTC (permalink / raw)
  To: linux-hotplug

Oh, could you please give me an example USB device that udev supported now?

I tried another USB cdrom, I found there are no dev  file in /sysfs/class directory.

Whether I need patch kernel.org/pub/linux/kernel/people/gregkh/misc/kobject-hotplug-?-2.5.67.patch
for USB cdrom?   

I would like to develop the test suite for Udev firstly, thank you for your kind help.

Thanks
Guo Min



-----Original Message-----
From: Greg KH [mailto:greg@kroah.com]
Sent: Wednesday, June 25, 2003 12:21 AM
To: Guo, Min
Cc: linux-hotplug-devel@lists.sourceforge.net
Subject: Re: Question about Hot device Identity


On Tue, Jun 24, 2003 at 03:01:21PM +0800, Guo, Min wrote:
> Thanks a lot!
> I am now playing with your udev:-), and I encounter some problems.
> 
> I use a usb mouse as a PnP devices, after I mount sysfs, I can not
> find any devices in /sysfs/devices/pci0/00:0f.2 as
> DEVPATH=/devices/pci0/00:09.0/usb1/1-1/1-1.1/ttyUSB7 in the test file
> udev supplied.
> 
> 	00:0f.2 is my USB controller,
> 
> 	ls /sysfs/devices/pci0/00:0f.2 
> 	
> 		class   irq   power     subsystem_device  vendor
> 		device  name  resource  subsystem_vendor
> 
> So I think the configuration files you given out is for usb hub,is
> that right? For the common USB mouse, can I only configure
> DEVPATH=/sysfs/devices/pci0/00:0f.2? I tried this,but no results.
> Could you please tell me what cause this problem?

What problem?  udev only creates dev entries for things that show up in
/sys/class/* that have a file called "dev" in them.  Right now, there is
no kernel support for mice under /sys/class/ (but there was a patch
proposed for this posted to linux-kernel by Hanna Linder a few weeks
ago.)

Because of this, udev will not work for your mouse right now, sorry.

So right now my main focus has been providing support in the kernel for
/sys/class for all types of devices, as that is what udev needs.  Help
with this effort is greatly appreciated.

thanks,

gre k-h


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
                   ` (3 preceding siblings ...)
  2003-06-25  2:24 ` Guo, Min
@ 2003-06-25  2:33 ` Greg KH
  2003-06-25  9:05 ` Guo, Min
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2003-06-25  2:33 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Jun 25, 2003 at 10:24:43AM +0800, Guo, Min wrote:
> Oh, could you please give me an example USB device that udev supported
> now?

Any usb device that uses the usb major number.  This includes usb
printers, scanners, and a bunch of other assorted devices.

> I tried another USB cdrom, I found there are no dev  file in
> /sysfs/class directory.

Block devices also work just fine.  So this should work as long as you
have something created in sys/block for your cdrom drive.

> Whether I need patch
> kernel.org/pub/linux/kernel/people/gregkh/misc/kobject-hotplug-?-2.5.67.patch
> for USB cdrom?   

If you are using the 2.5.67 kernel, yes.  I'd recommend 2.5.73, and you
will not need it.

> I would like to develop the test suite for Udev firstly, thank you for
> your kind help.

Great, that would be greatly appreciated.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
                   ` (4 preceding siblings ...)
  2003-06-25  2:33 ` Greg KH
@ 2003-06-25  9:05 ` Guo, Min
  2003-06-25 14:45 ` Kevin P. Fleming
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Guo, Min @ 2003-06-25  9:05 UTC (permalink / raw)
  To: linux-hotplug

 I download the linux2.5.73 and use USB CDROM to do the testing.
ls /sysfs
> block  bus  cdev  class  devices  firmware
ls /sysfs/class
>firmware  input  net  pcmcia_socket  scsi_device  scsi_host  tty  usb
ls /sysfs/block
> fd0  hda  initrd  sda
ls /sysfs/devices/pci0
>0000:00:00.0  0000:00:02.0  0000:00:0f.0  0000:00:0f.2  power
0000:00:00.1  0000:00:03.0  0000:00:0f.1  name
ls /sysfs/devices/pci0/0000\:00\:0f.2/
>class   irq   power     subsystem_device  vendor
device  name  resource  subsystem_vendor


0000:00:0f.2 is my USB controller.
So ,in such environment, how to configure DEVPATH in test file?
I write it as DEVPATH=/devices/pci0/00:0f.0/, but I don't think it is right, because there are no 
usb device in the directory, if so, does it means Udev does not support the USB cdrom?
If not, could you please tell me how to configure the USB BLOCK device's DEVPATH in test file?

Another question is whether 2.5.73 supports USB mice?

Sorry to ask you so many questions, because I can not run the Udev correctly till now,
thank you very much!

Thanks
Guo Min

-----Original Message-----
From: Greg KH [mailto:greg@kroah.com]
Sent: Wednesday, June 25, 2003 10:34 AM
To: Guo, Min
Cc: linux-hotplug-devel@lists.sourceforge.net
Subject: Re: Question about Hot device Identity


On Wed, Jun 25, 2003 at 10:24:43AM +0800, Guo, Min wrote:
> Oh, could you please give me an example USB device that udev supported
> now?

Any usb device that uses the usb major number.  This includes usb
printers, scanners, and a bunch of other assorted devices.

> I tried another USB cdrom, I found there are no dev  file in
> /sysfs/class directory.

Block devices also work just fine.  So this should work as long as you
have something created in sys/block for your cdrom drive.

> Whether I need patch
> kernel.org/pub/linux/kernel/people/gregkh/misc/kobject-hotplug-?-2.5.67.patch
> for USB cdrom?   

If you are using the 2.5.67 kernel, yes.  I'd recommend 2.5.73, and you
will not need it.

> I would like to develop the test suite for Udev firstly, thank you for
> your kind help.

Great, that would be greatly appreciated.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
                   ` (5 preceding siblings ...)
  2003-06-25  9:05 ` Guo, Min
@ 2003-06-25 14:45 ` Kevin P. Fleming
  2003-06-25 17:00 ` Greg KH
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Kevin P. Fleming @ 2003-06-25 14:45 UTC (permalink / raw)
  To: linux-hotplug

Guo, Min wrote:

> So ,in such environment, how to configure DEVPATH in test file?
> I write it as DEVPATH=/devices/pci0/00:0f.0/, but I don't think it is right, because there are no 
> usb device in the directory, if so, does it means Udev does not support the USB cdrom?
> If not, could you please tell me how to configure the USB BLOCK device's DEVPATH in test file?

For a block device, there is no need to know whether it is a USB 
device or any other type of device. The bus type, connection method, 
etc. are immaterial. It is a block device, shows up in /sys/block, and 
a block-device node can be produced in /dev for it.

Is there some particular reason you think that it is important to 
handle it as a "USB block" device instead of just a generic block device?



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
                   ` (6 preceding siblings ...)
  2003-06-25 14:45 ` Kevin P. Fleming
@ 2003-06-25 17:00 ` Greg KH
  2003-06-26  2:24 ` Guo, Min
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2003-06-25 17:00 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Jun 25, 2003 at 05:05:22PM +0800, Guo, Min wrote:
>  I download the linux2.5.73 and use USB CDROM to do the testing.
> ls /sysfs

Why /sysfs?  Why not /sys like everyone is standardizing on?

> > block  bus  cdev  class  devices  firmware
> ls /sysfs/class
> >firmware  input  net  pcmcia_socket  scsi_device  scsi_host  tty  usb
> ls /sysfs/block
> > fd0  hda  initrd  sda
> ls /sysfs/devices/pci0
> >0000:00:00.0  0000:00:02.0  0000:00:0f.0  0000:00:0f.2  power
> 0000:00:00.1  0000:00:03.0  0000:00:0f.1  name
> ls /sysfs/devices/pci0/0000\:00\:0f.2/
> >class   irq   power     subsystem_device  vendor
> device  name  resource  subsystem_vendor
> 
> 
> 0000:00:0f.2 is my USB controller.
> So ,in such environment, how to configure DEVPATH in test file?

udev only cares about DEVPATH values for class devices.  It ignores
DEVPATH values for other kinds of devices.  So set it to your block
device and you should be fine.

> Another question is whether 2.5.73 supports USB mice?

Yes, the kernel does.  Even 2.2 does :)

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
                   ` (7 preceding siblings ...)
  2003-06-25 17:00 ` Greg KH
@ 2003-06-26  2:24 ` Guo, Min
  2003-06-26  4:10 ` Kevin P. Fleming
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Guo, Min @ 2003-06-26  2:24 UTC (permalink / raw)
  To: linux-hotplug

I can not find the file dev in the /sys/class/usb, does it means that 
Udev does not support my USB CDROM? If not, which file is behalf of 
my USB CDROM device?

you said that udev only creates dev entries for things that show up in
/sys/class/* that have a file called "dev" in them, in my machine,

# ls /sys/
block  bus  cdev  class  devices  firmware
#ls /sys/class/usb/
#ls /sys/bus/usb/devices/
Both the outputs are null, I think the system has not recognized the USB devices, is that right?

Oh, the second question is whether the patch for Udev to support USB mice 
has been applied to kernel 2.5.73?

Thank you very much!

Thanks
Guo Min


-----Original Message-----
From: Greg KH [mailto:greg@kroah.com]
Sent: Thursday, June 26, 2003 1:01 AM
To: Guo, Min
Cc: linux-hotplug-devel@lists.sourceforge.net
Subject: Re: Question about Hot device Identity


On Wed, Jun 25, 2003 at 05:05:22PM +0800, Guo, Min wrote:
>  I download the linux2.5.73 and use USB CDROM to do the testing.
> ls /sysfs

Why /sysfs?  Why not /sys like everyone is standardizing on?

> > block  bus  cdev  class  devices  firmware
> ls /sysfs/class
> >firmware  input  net  pcmcia_socket  scsi_device  scsi_host  tty  usb
> ls /sysfs/block
> > fd0  hda  initrd  sda
> ls /sysfs/devices/pci0
> >0000:00:00.0  0000:00:02.0  0000:00:0f.0  0000:00:0f.2  power
> 0000:00:00.1  0000:00:03.0  0000:00:0f.1  name
> ls /sysfs/devices/pci0/0000\:00\:0f.2/
> >class   irq   power     subsystem_device  vendor
> device  name  resource  subsystem_vendor
> 
> 
> 0000:00:0f.2 is my USB controller.
> So ,in such environment, how to configure DEVPATH in test file?

udev only cares about DEVPATH values for class devices.  It ignores
DEVPATH values for other kinds of devices.  So set it to your block
device and you should be fine.

> Another question is whether 2.5.73 supports USB mice?

Yes, the kernel does.  Even 2.2 does :)

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
                   ` (8 preceding siblings ...)
  2003-06-26  2:24 ` Guo, Min
@ 2003-06-26  4:10 ` Kevin P. Fleming
  2003-06-26  7:42 ` Guo, Min
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Kevin P. Fleming @ 2003-06-26  4:10 UTC (permalink / raw)
  To: linux-hotplug

Guo, Min wrote:

> I can not find the file dev in the /sys/class/usb, does it means that 
> Udev does not support my USB CDROM? If not, which file is behalf of 
> my USB CDROM device?
> 

I think you've missed the point here. There is no such thing as a 
"generic" USB device that could have a dev file for it in 
/sys/class/usb. For a device to have a dev file, it must have some 
sort of device-specific driver talking to it. If that driver exists 
and is loaded, it will (or should) have a class of its own under 
/sys/class, and the dev file will be there.

In the case of a USB CD-ROM, that is handled by the usb-storage 
driver, but that driver _still_ does not create a dev file, because it 
does not directly expose itself to userspace (there is no way to talk 
to the usb-storage driver itself). usb-storage connects the device the 
  SCSI midlayer, which then attaches the sd (SCSI disk) driver to the 
device. _That_ driver is actually a real device that the user can 
interact with, so it creates a dev file in the appropriate place, 
namely /sys/block. You can think of /sys/block as a special-case 
class, and consider it equivalent to /sys/class/block (although it's 
more than that).

The only devices that will ever have "dev" files in /sys for them are 
those that can actually can communicated with from userspace. There is 
no need for userspace to treat your USB CD-ROM as a USB CD-ROM, 
instead it just considers it to be a generic disk (block) device that 
holds read-only media. I don't see any reason this device will ever 
generate any directories under /sys/class/... with dev files in them, 
they're not necessary.

But, this has nothing to do with whether udev can support your device 
or not and create a node in /dev for it. udev should be able to do 
exactly that, but I don't know whether it currently looks only at 
/sys/class (which I think is the case) or whether it also looks at 
/sys/block.



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
                   ` (9 preceding siblings ...)
  2003-06-26  4:10 ` Kevin P. Fleming
@ 2003-06-26  7:42 ` Guo, Min
  2003-06-26 17:13 ` Greg KH
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Guo, Min @ 2003-06-26  7:42 UTC (permalink / raw)
  To: linux-hotplug

Sorry, I make a mistake, I has UHCI built-in but OHCI not,
but my USB controller is OHCI type, so I can not find 
my cdrom in /sys/block.

Here I run the Udev as following procedure.

1. mount -t sysfs sysfs /sys

2. Edit the udev.h file and replace the following variables with values
  that make sense for your system:
        #define SYSFS_ROOT      "/sys"
        #define UDEV_ROOT       "/root/udev/"
        #define DEV_FILE        "/dev"
        #define MKNOD           "/bin/mknod"

3 . Run make to build the project 

4. Point /proc/sys/kernel/hotplug at the location of the udev binary that
  is created. so I change /proc/sys/kernel/hotplug 's content to  /root/udev/udev.is this right?

5. Set DEVPATH to /sys/devices/pci0/0000:00:0f.2/usb1/1-1/1-1:0/host2/2:0:0:0/scd0

	I don't know whether scd0  is right, because there are no scd0 in the path /sys/devices/pci0/0000:00:0f.2/usb1/1-1/1-1:0/host2/2:0:0:0,but I can mount 
	the USB CDROM with /dev/scd0,there is a dev file  in my /sys/block/sr0 directory.

	here is the detailed outputs of usb1.
	#ls /sys/devices/pci0/0000:00:0f.2/usb1/1-1/1-1:0/host2/2:0:0:0
	access_count  block  device_blocked  model  name  online  power  queue_depth  rescan  rev  scsi_level  type  vendor

6. run . ./test to see the result.

	But what things should happen here? in my machine, there are no outputs, I think dbg information should be outputed at least.

Thanks
Guo Min 
The content of this email message solely contains my own personal views,
and not those of my employer.

	
	

-----Original Message-----
From: Kevin P. Fleming [mailto:kpfleming@cox.net]
Sent: Thursday, June 26, 2003 12:10 PM
To: linux-hotplug-devel@lists.sourceforge.net
Subject: Re: Question about Hot device Identity


Guo, Min wrote:

> I can not find the file dev in the /sys/class/usb, does it means that 
> Udev does not support my USB CDROM? If not, which file is behalf of 
> my USB CDROM device?
> 

I think you've missed the point here. There is no such thing as a 
"generic" USB device that could have a dev file for it in 
/sys/class/usb. For a device to have a dev file, it must have some 
sort of device-specific driver talking to it. If that driver exists 
and is loaded, it will (or should) have a class of its own under 
/sys/class, and the dev file will be there.

In the case of a USB CD-ROM, that is handled by the usb-storage 
driver, but that driver _still_ does not create a dev file, because it 
does not directly expose itself to userspace (there is no way to talk 
to the usb-storage driver itself). usb-storage connects the device the 
  SCSI midlayer, which then attaches the sd (SCSI disk) driver to the 
device. _That_ driver is actually a real device that the user can 
interact with, so it creates a dev file in the appropriate place, 
namely /sys/block. You can think of /sys/block as a special-case 
class, and consider it equivalent to /sys/class/block (although it's 
more than that).

The only devices that will ever have "dev" files in /sys for them are 
those that can actually can communicated with from userspace. There is 
no need for userspace to treat your USB CD-ROM as a USB CD-ROM, 
instead it just considers it to be a generic disk (block) device that 
holds read-only media. I don't see any reason this device will ever 
generate any directories under /sys/class/... with dev files in them, 
they're not necessary.

But, this has nothing to do with whether udev can support your device 
or not and create a node in /dev for it. udev should be able to do 
exactly that, but I don't know whether it currently looks only at 
/sys/class (which I think is the case) or whether it also looks at 
/sys/block.



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
                   ` (10 preceding siblings ...)
  2003-06-26  7:42 ` Guo, Min
@ 2003-06-26 17:13 ` Greg KH
  2003-06-26 19:05 ` Greg KH
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2003-06-26 17:13 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Jun 25, 2003 at 09:10:29PM -0700, Kevin P. Fleming wrote:
> 
> But, this has nothing to do with whether udev can support your device 
> or not and create a node in /dev for it. udev should be able to do 
> exactly that, but I don't know whether it currently looks only at 
> /sys/class (which I think is the case) or whether it also looks at 
> /sys/block.

Yes, udev can handle things in /sys/block.

Actually it doesn't care where things are located in sysfs, it only
looks to see if there is a file called "dev" in the directory passed to
it in DEVPATH.  If there is, it will then act apon that device.

Hope this helps in clearing up things.

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
                   ` (11 preceding siblings ...)
  2003-06-26 17:13 ` Greg KH
@ 2003-06-26 19:05 ` Greg KH
  2003-06-26 19:08 ` Greg KH
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2003-06-26 19:05 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Jun 26, 2003 at 10:24:33AM +0800, Guo, Min wrote:
> I can not find the file dev in the /sys/class/usb, does it means that 
> Udev does not support my USB CDROM? If not, which file is behalf of 
> my USB CDROM device?

/sys/block/<something>

> Oh, the second question is whether the patch for Udev to support USB mice 
> has been applied to kernel 2.5.73?

No, input devices currently do not export class information yet.  A
patch was posted to lkml, but it is currently being reworked.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
                   ` (12 preceding siblings ...)
  2003-06-26 19:05 ` Greg KH
@ 2003-06-26 19:08 ` Greg KH
  2003-06-27  2:00 ` Guo, Min
  2003-06-27  3:18 ` Greg KH
  15 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2003-06-26 19:08 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Jun 26, 2003 at 03:42:36PM +0800, Guo, Min wrote:
> 
> 4. Point /proc/sys/kernel/hotplug at the location of the udev binary that
>   is created. so I change /proc/sys/kernel/hotplug 's content to
>   /root/udev/udev.is this right?

Yes, this is one way to do it.
Another way is to just put udev at /etc/hotplug.d/default/ calling it
udev.hotplug

This requires the latest version of the hotplug package to do so.

> 5. Set DEVPATH to /sys/devices/pci0/0000:00:0f.2/usb1/1-1/1-1:0/host2/2:0:0:0/scd0

No, set DEVPATH to something that has a "dev" file in it, which is not
this.

> 	But what things should happen here? in my machine, there are no
> 	outputs, I think dbg information should be outputed at least.

What debug info?  :)

Did you build udev with debugging enabled?  If so, look in the debug log
on the box.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
                   ` (13 preceding siblings ...)
  2003-06-26 19:08 ` Greg KH
@ 2003-06-27  2:00 ` Guo, Min
  2003-06-27  3:18 ` Greg KH
  15 siblings, 0 replies; 17+ messages in thread
From: Guo, Min @ 2003-06-27  2:00 UTC (permalink / raw)
  To: linux-hotplug

So do you mean that I can set my DEVPATH to  /sys/block/sr0/?
because there is a dev file in the directory. But I wonder why
the there are no dev file in directory /sys/devices/pci0/0000:00:0f.2/usb1/1-1/1-1:0/host2/2:0:0:0/,
Accoring to Flemming's comments,the sysfs will not create a dev file for USB CDROM,
is that right?

I did set the DEBUG = true, but nothing is outputed.

Thanks
Guo Min

-----Original Message-----
From: Greg KH [mailto:greg@kroah.com]
Sent: Friday, June 27, 2003 1:14 AM
To: linux-hotplug-devel@lists.sourceforge.net
Subject: Re: Question about Hot device Identity


On Wed, Jun 25, 2003 at 09:10:29PM -0700, Kevin P. Fleming wrote:
> 
> But, this has nothing to do with whether udev can support your device 
> or not and create a node in /dev for it. udev should be able to do 
> exactly that, but I don't know whether it currently looks only at 
> /sys/class (which I think is the case) or whether it also looks at 
> /sys/block.

Yes, udev can handle things in /sys/block.

Actually it doesn't care where things are located in sysfs, it only
looks to see if there is a file called "dev" in the directory passed to
it in DEVPATH.  If there is, it will then act apon that device.

Hope this helps in clearing up things.

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Question about Hot device Identity
  2003-06-23  3:04 Question about Hot device Identity Guo, Min
                   ` (14 preceding siblings ...)
  2003-06-27  2:00 ` Guo, Min
@ 2003-06-27  3:18 ` Greg KH
  15 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2003-06-27  3:18 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Jun 27, 2003 at 10:00:55AM +0800, Guo, Min wrote:
> So do you mean that I can set my DEVPATH to  /sys/block/sr0/?
> because there is a dev file in the directory.

Yes.

> But I wonder why the there are no dev file in directory
> /sys/devices/pci0/0000:00:0f.2/usb1/1-1/1-1:0/host2/2:0:0:0/, Accoring
> to Flemming's comments,the sysfs will not create a dev file for USB
> CDROM, is that right?

Correct, there is no dev file in that directory, as the device interacts
with the user through the block layer, which is in /sys/block.

udev only cares about classes, not devices.

> I did set the DEBUG = true, but nothing is outputed.

Sorry, don't know, it works for me :)

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2003-06-27  3:18 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-23  3:04 Question about Hot device Identity Guo, Min
2003-06-23  3:22 ` Greg KH
2003-06-24  7:01 ` Guo, Min
2003-06-24 16:20 ` Greg KH
2003-06-25  2:24 ` Guo, Min
2003-06-25  2:33 ` Greg KH
2003-06-25  9:05 ` Guo, Min
2003-06-25 14:45 ` Kevin P. Fleming
2003-06-25 17:00 ` Greg KH
2003-06-26  2:24 ` Guo, Min
2003-06-26  4:10 ` Kevin P. Fleming
2003-06-26  7:42 ` Guo, Min
2003-06-26 17:13 ` Greg KH
2003-06-26 19:05 ` Greg KH
2003-06-26 19:08 ` Greg KH
2003-06-27  2:00 ` Guo, Min
2003-06-27  3:18 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.