linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udevtest conflicts with reality
@ 2006-04-18 22:32 Brent Casavant
  2006-04-19  3:00 ` Andrey Borzenkov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Brent Casavant @ 2006-04-18 22:32 UTC (permalink / raw)
  To: linux-hotplug

Hello,

I'm attempting to get the /dev/extint0 device, corresponding to SGI's
external interrupt driver to be created.  (FWIW: This driver was
open-sourced, and submitted to lkml, but never accepted.  SGI just
ships it and its source as part of its system software).  This is
with a 2.6.16 kernel, and udev-085.

When using the default rules, udevtest indicates things "should work",
as follows:

--- cut here ---
# udevtest /class/extint/extint0
main: looking at device '/class/extint/extint0' from subsystem 'extint'
udev_rules_get_name: no node name set, will use kernel name 'extint0'
create_node: creating device node '/dev/extint0', major = '253', minor = '0', mode = '0660', uid = '0', gid = '0'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: 'socket:/org/kernel/udev/monitor'
--- cut here ---

However the /dev/extint0 node is not created when the module is loaded.

I've tried my own rules files and such, which seem to kick in as expected,
but still no nodes are created.  Using a RUN="/bin/mknod /dev/foo c %M %m"
worked in that it ran, however the major and minor number came out as zeroes.

udevmonitor --env yielded the following:

--- cut here ---
# udevmonitor --env
udevmonitor prints the received event from the kernel [UEVENT]
and the event which udev sends out after rule processing [UDEV]

UEVENT[1145397289.780113] add@/module/extint
ACTION­d
DEVPATH=/module/extint
SUBSYSTEM=module
SEQNUM\x1424

UDEV  [1145397289.783113] add@/module/extint
UDEV_LOG=7
ACTION­d
DEVPATH=/module/extint
SUBSYSTEM=module
SEQNUM\x1424
UDEVD_EVENT=1

UEVENT[1145397289.785569] add@/module/ioc4_extint
ACTION­d
DEVPATH=/module/ioc4_extint
SUBSYSTEM=module
SEQNUM\x1425

UEVENT[1145397289.786194] add@/class/ioc4_intout/intout0
ACTION­d
DEVPATH=/class/ioc4_intout/intout0
SUBSYSTEM=ioc4_intout
SEQNUM\x1426

UEVENT[1145397289.786662] add@/class/extint/extint0
ACTION­d
DEVPATH=/class/extint/extint0
SUBSYSTEM=extint
SEQNUM\x1427

UDEV  [1145397289.788932] add@/module/ioc4_extint
UDEV_LOG=7
ACTION­d
DEVPATH=/module/ioc4_extint
SUBSYSTEM=module
SEQNUM\x1425
UDEVD_EVENT=1

UDEV  [1145397289.790675] add@/class/ioc4_intout/intout0
UDEV_LOG=7
ACTION­d
DEVPATH=/class/ioc4_intout/intout0
SUBSYSTEM=ioc4_intout
SEQNUM\x1426
UDEVD_EVENT=1

UDEV  [1145397289.791917] add@/class/extint/extint0
UDEV_LOG=7
ACTION­d
DEVPATH=/class/extint/extint0
SUBSYSTEM=extint
SEQNUM\x1427
UDEVD_EVENT=1
--- cut here ---

ioc4_extint is suffering the same problem, and it should be noted that
the load of ioc4_extint triggers the creation of the extint device
(i.e. extint provides an abstracted interface to the lower-level
ioc4_extint device).

Any hints on where to go from here?

Brent

-- 
Brent Casavant                          All music is folk music.  I ain't
bcasavan@sgi.com                        never heard a horse sing a song.
Silicon Graphics, Inc.                    -- Louis Armstrong


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
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] 5+ messages in thread

* Re: udevtest conflicts with reality
  2006-04-18 22:32 udevtest conflicts with reality Brent Casavant
@ 2006-04-19  3:00 ` Andrey Borzenkov
  2006-04-19 11:57 ` Kay Sievers
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Andrey Borzenkov @ 2006-04-19  3:00 UTC (permalink / raw)
  To: linux-hotplug

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 19 April 2006 02:32, Brent Casavant wrote:
> Hello,
>
> I'm attempting to get the /dev/extint0 device, corresponding to SGI's
> external interrupt driver to be created.  (FWIW: This driver was
> open-sourced, and submitted to lkml, but never accepted.  SGI just
> ships it and its source as part of its system software).  This is
> with a 2.6.16 kernel, and udev-085.
>
> When using the default rules, udevtest indicates things "should work",
> as follows:
>
> --- cut here ---
> # udevtest /class/extint/extint0
> main: looking at device '/class/extint/extint0' from subsystem 'extint'
> udev_rules_get_name: no node name set, will use kernel name 'extint0'
> create_node: creating device node '/dev/extint0', major = '253', minor > '0', mode = '0660', uid = '0', gid = '0' main: run:
> 'socket:/org/freedesktop/hal/udev_event'
> main: run: 'socket:/org/kernel/udev/monitor'
> --- cut here ---
>
> However the /dev/extint0 node is not created when the module is loaded.
>
> I've tried my own rules files and such, which seem to kick in as expected,
> but still no nodes are created.  Using a RUN="/bin/mknod /dev/foo c %M %m"
> worked in that it ran, however the major and minor number came out as
> zeroes.
>

which means device number is not defined.

> udevmonitor --env yielded the following:
[...]
>
> UEVENT[1145397289.786662] add@/class/extint/extint0
> ACTION­d
> DEVPATH=/class/extint/extint0
> SUBSYSTEM=extint
> SEQNUM\x1427
>

No device here either

[...]
>
> ioc4_extint is suffering the same problem, and it should be noted that
> the load of ioc4_extint triggers the creation of the extint device
> (i.e. extint provides an abstracted interface to the lower-level
> ioc4_extint device).
>
> Any hints on where to go from here?
>

Does /sys/class/extint/extint0/dev exists and what does it contain?

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFERafzR6LMutpd94wRAohLAJ9BpIJTiurTXaJK+r3iqalZ91csSgCfWLs+
eeudx0RK8sbR2zXAqn0/mQ8=Yb9V
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
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] 5+ messages in thread

* Re: udevtest conflicts with reality
  2006-04-18 22:32 udevtest conflicts with reality Brent Casavant
  2006-04-19  3:00 ` Andrey Borzenkov
@ 2006-04-19 11:57 ` Kay Sievers
  2006-04-19 15:36 ` Brent Casavant
  2006-04-19 21:04 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2006-04-19 11:57 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Apr 18, 2006 at 05:32:14PM -0500, Brent Casavant wrote:
> I'm attempting to get the /dev/extint0 device, corresponding to SGI's
> external interrupt driver to be created.  (FWIW: This driver was
> open-sourced, and submitted to lkml, but never accepted.  SGI just
> ships it and its source as part of its system software).  This is
> with a 2.6.16 kernel, and udev-085.


> UDEV  [1145397289.791917] add@/class/extint/extint0
> UDEV_LOG=7
> ACTION­d
> DEVPATH=/class/extint/extint0
> SUBSYSTEM=extint
> SEQNUM\x1427
> UDEVD_EVENT=1

Looks like the driver is not using the driver core properly and you
don't pass the dev_t to the class function, which will automatically
create the "dev" file in sysfs and add MAJOR=, MINOR= to the event
environment. Recent udev versions depend on the variable in the
environment and don't open the "dev" file like udevtest is doing it.

Kay


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
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] 5+ messages in thread

* Re: udevtest conflicts with reality
  2006-04-18 22:32 udevtest conflicts with reality Brent Casavant
  2006-04-19  3:00 ` Andrey Borzenkov
  2006-04-19 11:57 ` Kay Sievers
@ 2006-04-19 15:36 ` Brent Casavant
  2006-04-19 21:04 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Brent Casavant @ 2006-04-19 15:36 UTC (permalink / raw)
  To: linux-hotplug

On Wed, 19 Apr 2006, Kay Sievers wrote:

> Looks like the driver is not using the driver core properly and you
> don't pass the dev_t to the class function, which will automatically
> create the "dev" file in sysfs and add MAJOR=, MINOR= to the event
> environment. Recent udev versions depend on the variable in the
> environment and don't open the "dev" file like udevtest is doing it.

OK, I suppose that makes sense.  The code currently calls
class_device_register() before calling cdev_add().  I imagine
swapping the order of those operations will fix the problem.

Does that sound about right?

Brent

-- 
Brent Casavant                          All music is folk music.  I ain't
bcasavan@sgi.com                        never heard a horse sing a song.
Silicon Graphics, Inc.                    -- Louis Armstrong


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
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] 5+ messages in thread

* Re: udevtest conflicts with reality
  2006-04-18 22:32 udevtest conflicts with reality Brent Casavant
                   ` (2 preceding siblings ...)
  2006-04-19 15:36 ` Brent Casavant
@ 2006-04-19 21:04 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2006-04-19 21:04 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Apr 19, 2006 at 10:36:12AM -0500, Brent Casavant wrote:
> On Wed, 19 Apr 2006, Kay Sievers wrote:
> 
> > Looks like the driver is not using the driver core properly and you
> > don't pass the dev_t to the class function, which will automatically
> > create the "dev" file in sysfs and add MAJOR=, MINOR= to the event
> > environment. Recent udev versions depend on the variable in the
> > environment and don't open the "dev" file like udevtest is doing it.
> 
> OK, I suppose that makes sense.  The code currently calls
> class_device_register() before calling cdev_add().  I imagine
> swapping the order of those operations will fix the problem.
> 
> Does that sound about right?

Yes, that should do it.

thanks,

greg k-h


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2006-04-19 21:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-18 22:32 udevtest conflicts with reality Brent Casavant
2006-04-19  3:00 ` Andrey Borzenkov
2006-04-19 11:57 ` Kay Sievers
2006-04-19 15:36 ` Brent Casavant
2006-04-19 21:04 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).