Skip to contentSkip to conversation

issues getting I/O device to work with udev....

DISCUSSION [email protected] 5 participants 23 messages Aug 23, 2006 – Aug 31, 2006

lore
Share & tools
lore
#0 lore raw

I'm trying to get an Eagle data acquisition device to work with udev and having problems. Any help greatly appreciated. Please especially notice the udevtest error messages at end of this email.....

in /etc/udev/rules.d :

::::::::::::::
10-edredaq.rules
::::::::::::::
SYSFS{edredaq_nodename}="device*", NAME="edredaq/device%m" ::::::::::::::
z-edredaq.rules
::::::::::::::
SYSFS{edredaq_nodename}="device*", NAME="edredaq/device%m"

I have a Debian Etch (testing) Intel PC with a 2.6.15 kernel built from source. My udev version is 0.093-1.

Here are related dmesg messages....

# dmesg | grep -i edre
edredaq_core: major number = 254
edredaq_core: Registered node 0
# dmesg | grep -i eagle
PCI703 Interface Driver (C) 2004 - 2005 Eagle Technology (v1.0.9)

Here is /sys/class/edredaq/device0 and related udevtest command output:

# ls /sys/class/edredaq/device0
./  ../  dev  device  edredaq_nodename  uevent
# udevtest edredaq/device0
add_to_rules: invalid SYSFS operation
add_to_rules: invalid rule '/etc/udev/rules.d/10-edredaq.rules:1'
add_to_rules: invalid SYSFS operation
add_to_rules: invalid rule '/etc/udev/rules.d/z-edredaq.rules:1'
main: unable to open 'edredaq/device0'

Thanks.

Chris

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 1 line · On Aug 24, [email protected] wrote:

SYSFS{edredaq_nodename}="device*", NAME="edredaq/device%m"

Use something like:

SUBSYSTEM="edredaq", SYSFS{edredaq_nodename}="device*", \
NAME="edredaq/device%m"

If it does not work, use udevinfo -a -p /sys/class/edredaq/device0/ to find the SUBSYSTEM name.

Signature · 12 lines
ciao,
Marco

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#2 lore raw
In reply to [email protected]

Marco

Thanks. I changed 10-edredaq.rules and z-edredaq.rules to both be

SUBSYSTEM="edredaq", SYSFS{edredaq_nodename}="device*", NAME="edredaq/device%m"

Now 'udevtest edredaq/device0' has just this error message left:

main: unable to open 'edredaq/device0'

Here is 'udevinfo -a -p /sys/class/edredaq/device0' output if useful...

cs
==========
udevinfo starts with the device the node belongs to and then walks up the device chain, to print for every device found, all possibly useful attributes in the udev key format.
Only attributes within one device section may be used together in one rule, to match the device for which the node will be created.

looking at device '/class/edredaq/device0':

    KERNEL="device0"
    SUBSYSTEM="edredaq"
    SYSFS{edredaq_nodename}="device0"
    SYSFS{dev}="254:0"

looking at device '/devices/pci0000:00/0000:00:1e.0/0000:02:0c.0':

    ID="0000:02:0c.0"
    BUS="pci"
    DRIVER="pci703drv"
    SYSFS{serial}="1000010398"
    SYSFS{modalias}="pci:v0000EA01d00000052sv00000000sd00000000bcFFsc00i00"
    SYSFS{local_cpus}="1"
    SYSFS{irq}="137"
    SYSFS{class}="0xff0000"
    SYSFS{subsystem_device}="0x0000"
    SYSFS{subsystem_vendor}="0x0000"
    SYSFS{device}="0x0052"
    SYSFS{vendor}="0xea01"

looking at device '/devices/pci0000:00/0000:00:1e.0':

    ID="0000:00:1e.0"
    BUS="pci"
    DRIVER=""
    SYSFS{modalias}="pci:v00008086d0000244Esv00000000sd00000000bc06sc04i00"
    SYSFS{local_cpus}="1"
    SYSFS{irq}="0"
    SYSFS{class}="0x060400"
    SYSFS{subsystem_device}="0x0000"
    SYSFS{subsystem_vendor}="0x0000"
    SYSFS{device}="0x244e"
    SYSFS{vendor}="0x8086"

looking at device '/devices/pci0000:00':

    ID="pci0000:00"
    BUS=""
    DRIVER=""

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to [email protected]
Quoted 7 lines · On Wed, 2006-08-23 at 16:02 -0700, [email protected] wrote:

Marco

Thanks. I changed 10-edredaq.rules and z-edredaq.rules to both be

SUBSYSTEM="edredaq", SYSFS{edredaq_nodename}="device*", NAME="edredaq/device%m"

Now 'udevtest edredaq/device0' has just this error message left:

Udevtest expects the sysfs devpath, not the node name. Try:
udevtest /class/edredaq/device0

Kay

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#4 lore raw
In reply to [email protected]
Quoted 2 lines

Udevtest expects the sysfs devpath, not the node name. Try:
udevtest /class/edredaq/device0

Kay, thanks. that got me more info....

# udevtest /class/edredaq/device0
main: looking at device '/class/edredaq/device0' from subsystem
'edredaq'
udev_rules_get_name: rule applied, 'device0' becomes 'edredaq/device0'
udev_db_get_device: no db file to read
/dev/.udev/db/class@edredaq@device0: No such file or directory
udev_node_add: creating device node '/dev/edredaq/device0', major '254', minor = '0', mode = '0660', uid = '0', gid = '0'
main: run: 'socket:/org/kernel/udev/monitor'

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#5 lore raw
In reply to [email protected]
Quoted 5 lines · On Wed, 2006-08-23 at 16:14 -0700, [email protected] wrote:
Quoted 2 lines

Udevtest expects the sysfs devpath, not the node name. Try:
udevtest /class/edredaq/device0

Kay, thanks. that got me more info....

Quoted 8 lines
# udevtest /class/edredaq/device0
main: looking at device '/class/edredaq/device0' from subsystem
'edredaq'
udev_rules_get_name: rule applied, 'device0' becomes 'edredaq/device0'
udev_db_get_device: no db file to read
/dev/.udev/db/class@edredaq@device0: No such file or directory
udev_node_add: creating device node '/dev/edredaq/device0', major > '254', minor = '0', mode = '0660', uid = '0', gid = '0'
main: run: 'socket:/org/kernel/udev/monitor'

Yeah, looks all fine.

To see how all that works, you may want to have a look at:
udevmonitor
or
udevmonoitor --env
while you load your kernel module.

There you can watch what the kernel sends to udev and what udev is doing with it. You can also see all the devpath's, which are the kernels key to the device, and which udevtest expects to simulate an event run.

Kay

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#6 lore raw
In reply to [email protected]
Quoted 7 lines

Yeah, looks all fine.

To see how all that works, you may want to have a look at:
udevmonitor
or
udevmonoitor --env
while you load your kernel module.

I can't rmmod these drivers to reload them with udevmonitor on...

# rmmod pci703drv
ERROR: Removing 'pci703drv': Device or resource busy
# rmmod edredaqdrv
ERROR: Module edredaqdrv is in use by pci703drv

And they always appear at reboot.

chris

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#7 lore raw
In reply to [email protected]
Quoted 13 lines

-----Original Message-----
From: Kay Sievers [mailto:[email protected]]
Sent: 24 August 2006 01:10 AM
To: [email protected]
Cc: [email protected]; [email protected]; John Thomas; [email protected]; Ray Schumacher
Subject: Re: issues getting I/O device to work with udev....

Quoted 4 lines · On Wed, 2006-08-23 at 16:02 -0700, [email protected] wrote:

Marco

Thanks. I changed 10-edredaq.rules and z-edredaq.rules to both be

Quoted 7 lines
Quoted 1 line

SUBSYSTEM="edredaq", SYSFS{edredaq_nodename}="device*",

NAME="edredaq/device%m"

Quoted 2 lines

Now 'udevtest edredaq/device0' has just this error message left:

Udevtest expects the sysfs devpath, not the node name. Try:
udevtest /class/edredaq/device0

[Jan Zwiegers]
I'm the developer at Eagle who wrote all the Linux DAQ class & device drivers (PCI, PC104 & USB) and also the udev rule. Out API depends on the fact that the device gets created under /dev/edredaq/device0-99. This rules worked just fine on previous systems, but suddenly it started to fail on newer distros. Please have a look at the following. udev seems to work fine, but I think the problem might be with PAM.

udevinfo -a -p /sys/class/edredaq/device0/

...
looking at device '/class/edredaq/device0':

    KERNEL="device0"
    SUBSYSTEM="edredaq"
    SYSFS{edredaq_nodename}="device0"
    SYSFS{dev}="253:0"

...

udevtest /class/edredaq/device0/

main: looking at device '/class/edredaq/device0' from subsystem 'edredaq'
udev_rules_get_name: rule applied, 'device0' becomes 'edredaq/device0'
create_node: creating device node '/dev/edredaq/device0', major = '253', minor = '0', mode = '0666', uid = '0', gid = '0'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/edredaq/device0 '

And also the updated rule z-edredaq.rules as suggested by Marco (many thanks Marco)
SUBSYSTEM="edredaq", SYSFS{edredaq_nodename}="device*", NAME="edredaq/device%m"

Can you guys maybe point me to a solution?

Jan

Quoted 2 lines

Kay

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#8 lore raw
In reply to [email protected]
Quoted 49 lines · Jan Zwiegers
Quoted 13 lines

-----Original Message-----
From: Kay Sievers [mailto:[email protected]]
Sent: 24 August 2006 01:10 AM
To: [email protected]
Cc: [email protected]; [email protected]; John Thomas; [email protected]; Ray Schumacher
Subject: Re: issues getting I/O device to work with udev....

Quoted 4 lines · On Wed, 2006-08-23 at 16:02 -0700, [email protected] wrote:

Marco

Thanks. I changed 10-edredaq.rules and z-edredaq.rules to both be

Quoted 7 lines
Quoted 1 line

SUBSYSTEM="edredaq", SYSFS{edredaq_nodename}="device*",

NAME="edredaq/device%m"

Quoted 2 lines

Now 'udevtest edredaq/device0' has just this error message left:

Udevtest expects the sysfs devpath, not the node name. Try:
udevtest /class/edredaq/device0

[Jan Zwiegers]
I'm the developer at Eagle who wrote all the Linux DAQ class & device drivers (PCI, PC104 & USB) and also the udev rule. Out API depends on the fact that the device gets created under /dev/edredaq/device0-99. This rules worked just fine on previous systems, but suddenly it started to fail on newer distros. Please have a look at the following. udev seems to work fine, but I think the problem might be with PAM.

udevinfo -a -p /sys/class/edredaq/device0/

...
looking at device '/class/edredaq/device0':

    KERNEL="device0"
    SUBSYSTEM="edredaq"
    SYSFS{edredaq_nodename}="device0"
    SYSFS{dev}="253:0"

...

udevtest /class/edredaq/device0/

main: looking at device '/class/edredaq/device0' from subsystem 'edredaq'
udev_rules_get_name: rule applied, 'device0' becomes 'edredaq/device0'
create_node: creating device node '/dev/edredaq/device0', major = '253', minor = '0', mode = '0666', uid = '0', gid = '0'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/edredaq/device0 '

Quoted 6 lines

And also the updated rule z-edredaq.rules as suggested by Marco (many thanks Marco)
SUBSYSTEM="edredaq", SYSFS{edredaq_nodename}="device*", NAME="edredaq/device%m"

Can you guys maybe point me to a solution?

Hmm, what exactly is the problem? What suddenly started to fail?

Can you paste the output of 'udevmonitor' when you load the kernel module? Or the output when connect the USB device, if you only have it built-in.

Kay

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#9 lore raw
In reply to [email protected]
Quoted 65 lines

-----Original Message-----
From: [email protected] [mailto:linux- [email protected]] On Behalf Of Kay Sievers
Sent: 25 August 2006 12:37 PM
To: [email protected]
Cc: 'John Thomas'; [email protected]; 'Ray Schumacher'; [email protected]
Subject: RE: issues getting I/O device to work with udev....

Quoted 5 lines · Jan Zwiegers
Quoted 5 lines

-----Original Message-----
From: Kay Sievers [mailto:[email protected]]
Sent: 24 August 2006 01:10 AM
To: [email protected]
Cc: [email protected]; [email protected]; John

Thomas;

Quoted 11 lines
Quoted 11 lines

[email protected]; Ray Schumacher
Subject: Re: issues getting I/O device to work with udev....

Quoted 5 lines · On Wed, 2006-08-23 at 16:02 -0700, [email protected] wrote:

Marco

Thanks. I changed 10-edredaq.rules and z-edredaq.rules to both be

SUBSYSTEM="edredaq", SYSFS{edredaq_nodename}="device*",

NAME="edredaq/device%m"

Quoted 1 line
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Now 'udevtest edredaq/device0' has just this error message left:

Udevtest expects the sysfs devpath, not the node name. Try:
udevtest /class/edredaq/device0

[Jan Zwiegers]
I'm the developer at Eagle who wrote all the Linux DAQ class & device drivers (PCI, PC104 & USB) and also the udev rule. Out API depends on

the

Quoted 1 line

fact that the device gets created under /dev/edredaq/device0-99. This

rules

Quoted 2 lines

worked just fine on previous systems, but suddenly it started to fail on newer distros. Please have a look at the following. udev seems to work

fine,

Quoted 10 lines

but I think the problem might be with PAM.

udevinfo -a -p /sys/class/edredaq/device0/

...
looking at device '/class/edredaq/device0':

    KERNEL="device0"
    SUBSYSTEM="edredaq"
    SYSFS{edredaq_nodename}="device0"
    SYSFS{dev}="253:0"
Quoted 5 lines

...

udevtest /class/edredaq/device0/

main: looking at device '/class/edredaq/device0' from subsystem

'edredaq'

Quoted 9 lines

udev_rules_get_name: rule applied, 'device0' becomes 'edredaq/device0'
create_node: creating device node '/dev/edredaq/device0', major = '253', minor = '0', mode = '0666', uid = '0', gid = '0'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/edredaq/device0 '

And also the updated rule z-edredaq.rules as suggested by Marco (many

Quoted 8 lines

thanks

Quoted 5 lines

Marco)
SUBSYSTEM="edredaq", SYSFS{edredaq_nodename}="device*", NAME="edredaq/device%m"

Can you guys maybe point me to a solution?

Hmm, what exactly is the problem? What suddenly started to fail?

[Jan Zwiegers]
The node /dev/edredaq/device0 never get created, or it does not show up in the file system (maybe it's permission / security related). Unfortunately I have left work already and cannot do the 'udevmonitor' for you.

Quoted 8 lines

Can you paste the output of 'udevmonitor' when you load the kernel module? Or the output when connect the USB device, if you only have it built-in.

Kay

Quoted 10 lines

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#10 lore raw
In reply to [email protected]
Quoted 64 lines

-----Original Message-----
From: Kay Sievers [mailto:[email protected]]
Sent: 25 August 2006 12:37 PM
To: [email protected]
Cc: [email protected]; 'John Thomas'; linux-hotplug- [email protected]; 'Ray Schumacher'; [email protected]
Subject: RE: issues getting I/O device to work with udev....

Quoted 5 lines · Jan Zwiegers
Quoted 5 lines

-----Original Message-----
From: Kay Sievers [mailto:[email protected]]
Sent: 24 August 2006 01:10 AM
To: [email protected]
Cc: [email protected]; [email protected]; John

Thomas;

Quoted 11 lines
Quoted 11 lines

[email protected]; Ray Schumacher
Subject: Re: issues getting I/O device to work with udev....

Quoted 5 lines · On Wed, 2006-08-23 at 16:02 -0700, [email protected] wrote:

Marco

Thanks. I changed 10-edredaq.rules and z-edredaq.rules to both be

SUBSYSTEM="edredaq", SYSFS{edredaq_nodename}="device*",

NAME="edredaq/device%m"

Quoted 1 line
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Now 'udevtest edredaq/device0' has just this error message left:

Udevtest expects the sysfs devpath, not the node name. Try:
udevtest /class/edredaq/device0

[Jan Zwiegers]
I'm the developer at Eagle who wrote all the Linux DAQ class & device drivers (PCI, PC104 & USB) and also the udev rule. Out API depends on

the

Quoted 1 line

fact that the device gets created under /dev/edredaq/device0-99. This

rules

Quoted 2 lines

worked just fine on previous systems, but suddenly it started to fail on newer distros. Please have a look at the following. udev seems to work

fine,

Quoted 10 lines

but I think the problem might be with PAM.

udevinfo -a -p /sys/class/edredaq/device0/

...
looking at device '/class/edredaq/device0':

    KERNEL="device0"
    SUBSYSTEM="edredaq"
    SYSFS{edredaq_nodename}="device0"
    SYSFS{dev}="253:0"
Quoted 5 lines

...

udevtest /class/edredaq/device0/

main: looking at device '/class/edredaq/device0' from subsystem

'edredaq'

Quoted 9 lines

udev_rules_get_name: rule applied, 'device0' becomes 'edredaq/device0'
create_node: creating device node '/dev/edredaq/device0', major = '253', minor = '0', mode = '0666', uid = '0', gid = '0'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/edredaq/device0 '

And also the updated rule z-edredaq.rules as suggested by Marco (many

Quoted 8 lines

thanks

Quoted 5 lines

Marco)
SUBSYSTEM="edredaq", SYSFS{edredaq_nodename}="device*", NAME="edredaq/device%m"

Can you guys maybe point me to a solution?

Hmm, what exactly is the problem? What suddenly started to fail?

[Jan Zwiegers]
Sorry I forgot to add, this particular device is PCI, but the same happends with my USB & PC104/ISA drivers. All the drivers register with the my DAQ class driver, which intern does the SYSFS & file interface part.

Quoted 6 lines

Can you paste the output of 'udevmonitor' when you load the kernel module? Or the output when connect the USB device, if you only have it built-in.

Kay

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#11 lore raw
In reply to [email protected]
Quoted 7 lines · Jan Zwiegers
Quoted 7 lines
Quoted 1 line

fact that the device gets created under /dev/edredaq/device0-99. This

rules

Quoted 4 lines

worked just fine on previous systems, but suddenly it started to fail on newer distros.

Can you guys maybe point me to a solution?

Quoted 8 lines
Quoted 4 lines

Hmm, what exactly is the problem? What suddenly started to fail? Can you paste the output of 'udevmonitor' when you load the kernel module? Or the output when connect the USB device, if you only have it built-in.

The node /dev/edredaq/device0 never get created, or it does not show up in the file system (maybe it's permission / security related). Unfortunately I have left work already and cannot do the 'udevmonitor' for you.

Oh, that all sounds very much like you don't use the right driver core functions and you create the "dev" file yourself in sysfs. You must use the right functions in the kernel and pass the correct dev_t to the device registration. That will automatically create the "dev" file and add the needed data to the uevent environment, to let udev create the node.

But again, to verify this, we need the output of "udevmonitor --env", while you plug in a device or re-trigger the event by writing "add" to the "uevent" file in the sysfs device directory.

Kay

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#12 lore raw
In reply to [email protected]
Quoted 38 lines

-----Original Message-----
From: [email protected] [mailto:linux- [email protected]] On Behalf Of Kay Sievers
Sent: 25 August 2006 03:00 PM
To: [email protected]
Cc: 'John Thomas'; [email protected]; 'Ray Schumacher'; [email protected]
Subject: RE: issues getting I/O device to work with udev....

Quoted 1 line · Jan Zwiegers
Quoted 1 line
Quoted 1 line

fact that the device gets created under /dev/edredaq/device0-99.

This

Quoted 2 lines
Quoted 2 lines

rules

Quoted 1 line

worked just fine on previous systems, but suddenly it started to

fail on

Quoted 10 lines
Quoted 8 lines
Quoted 3 lines

newer distros.

Can you guys maybe point me to a solution?

Hmm, what exactly is the problem? What suddenly started to fail? Can you paste the output of 'udevmonitor' when you load the kernel module? Or the output when connect the USB device, if you only have it built-in.

The node /dev/edredaq/device0 never get created, or it does not show up

in

Quoted 1 line

the file system (maybe it's permission / security related).

Unfortunately I

Quoted 1 line

have left work already and cannot do the 'udevmonitor' for you.

Oh, that all sounds very much like you don't use the right driver core functions and you create the "dev" file yourself in sysfs. You must use the right functions in the kernel and pass the correct dev_t to the device registration. That will automatically create the "dev" file and add the needed data to the uevent environment, to let udev create the node.

Quoted 3 lines

But again, to verify this, we need the output of "udevmonitor --env", while you plug in a device or re-trigger the event by writing "add" to the "uevent" file in the sysfs device directory.

I just create a simple device class by making use of:

'class_device_register' &
'class_device_createfile'
to create /sys/class/edredaq/device0 &
/sys/class/edredaq/device0/edredaq_nodename

Jan

Quoted 4 lines

Kay

Quoted 10 lines

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#13 lore raw
In reply to [email protected]
Quoted 42 lines · Jan Zwiegers
Quoted 37 lines

-----Original Message-----
From: [email protected] [mailto:linux- [email protected]] On Behalf Of Kay Sievers
Sent: 25 August 2006 03:00 PM
To: [email protected]
Cc: 'John Thomas'; [email protected]; 'Ray Schumacher'; [email protected]
Subject: RE: issues getting I/O device to work with udev....

Quoted 1 line · Jan Zwiegers
Quoted 1 line
Quoted 1 line

fact that the device gets created under /dev/edredaq/device0-99.

This

Quoted 2 lines
Quoted 2 lines

rules

Quoted 1 line

worked just fine on previous systems, but suddenly it started to

fail on

Quoted 10 lines
Quoted 8 lines
Quoted 3 lines

newer distros.

Can you guys maybe point me to a solution?

Hmm, what exactly is the problem? What suddenly started to fail? Can you paste the output of 'udevmonitor' when you load the kernel module? Or the output when connect the USB device, if you only have it built-in.

The node /dev/edredaq/device0 never get created, or it does not show up

in

Quoted 1 line

the file system (maybe it's permission / security related).

Unfortunately I

Quoted 1 line

have left work already and cannot do the 'udevmonitor' for you.

Oh, that all sounds very much like you don't use the right driver core functions and you create the "dev" file yourself in sysfs. You must use the right functions in the kernel and pass the correct dev_t to the device registration. That will automatically create the "dev" file and add the needed data to the uevent environment, to let udev create the node.

Quoted 3 lines

But again, to verify this, we need the output of "udevmonitor --env", while you plug in a device or re-trigger the event by writing "add" to the "uevent" file in the sysfs device directory.

Quoted 6 lines

I just create a simple device class by making use of:

'class_device_register' &
'class_device_createfile'
to create /sys/class/edredaq/device0 &
/sys/class/edredaq/device0/edredaq_nodename

See how class_device_create() works and fills in dev_t, you need to convert to that function or do the same with the dev_t value. You also need to set the 'device' pointer like that function does, to make userspace happy.

Kay

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#14 lore raw
In reply to [email protected]
Quoted 61 lines

-----Original Message-----
From: Kay Sievers [mailto:[email protected]]
Sent: 25 August 2006 04:02 PM
To: [email protected]
Cc: 'John Thomas'; [email protected]; 'Ray Schumacher'; [email protected]
Subject: RE: issues getting I/O device to work with udev....

Quoted 14 lines · Jan Zwiegers
Quoted 14 lines

-----Original Message-----
From: [email protected] [mailto:linux- [email protected]] On Behalf Of Kay Sievers
Sent: 25 August 2006 03:00 PM
To: [email protected]
Cc: 'John Thomas'; [email protected]; 'Ray Schumacher'; [email protected]
Subject: RE: issues getting I/O device to work with udev....

Quoted 1 line · Jan Zwiegers
Quoted 1 line
Quoted 1 line

fact that the device gets created under /dev/edredaq/device0-99.

This

Quoted 2 lines
Quoted 2 lines

rules

Quoted 1 line

worked just fine on previous systems, but suddenly it started to

Quoted 8 lines
Quoted 8 lines

fail on

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

newer distros.

Can you guys maybe point me to a solution?

Hmm, what exactly is the problem? What suddenly started to fail? Can you paste the output of 'udevmonitor' when you load the kernel module? Or the output when connect the USB device, if you only

have it

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

built-in.

The node /dev/edredaq/device0 never get created, or it does not show

up

Quoted 7 lines
Quoted 7 lines

in

Quoted 1 line

the file system (maybe it's permission / security related).

Unfortunately I

Quoted 1 line

have left work already and cannot do the 'udevmonitor' for you.

Oh, that all sounds very much like you don't use the right driver core functions and you create the "dev" file yourself in sysfs. You must

use

Quoted 10 lines
Quoted 8 lines

the right functions in the kernel and pass the correct dev_t to the device registration. That will automatically create the "dev" file and add the needed data to the uevent environment, to let udev create the node.

But again, to verify this, we need the output of "udevmonitor --env", while you plug in a device or re-trigger the event by writing "add" to the "uevent" file in the sysfs device directory.

Quoted 6 lines

I just create a simple device class by making use of:

'class_device_register' &
'class_device_createfile'
to create /sys/class/edredaq/device0 &
/sys/class/edredaq/device0/edredaq_nodename

Quoted 4 lines

See how class_device_create() works and fills in dev_t, you need to convert to that function or do the same with the dev_t value. You also need to set the 'device' pointer like that function does, to make userspace happy.

Kay I think I'm a bit stupid here, but I don' really follow what you mean. Do you say that I need to look at how I implemented the class_device_create_file? Mine seems the same as others. Do you think this is the cause of my problem?

Quoted 2 lines

Kay

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#15 lore raw
In reply to [email protected]
Quoted 66 lines · Jan Zwiegers
Quoted 61 lines

-----Original Message-----
From: Kay Sievers [mailto:[email protected]]
Sent: 25 August 2006 04:02 PM
To: [email protected]
Cc: 'John Thomas'; [email protected]; 'Ray Schumacher'; [email protected]
Subject: RE: issues getting I/O device to work with udev....

Quoted 14 lines · Jan Zwiegers
Quoted 14 lines

-----Original Message-----
From: [email protected] [mailto:linux- [email protected]] On Behalf Of Kay Sievers
Sent: 25 August 2006 03:00 PM
To: [email protected]
Cc: 'John Thomas'; [email protected]; 'Ray Schumacher'; [email protected]
Subject: RE: issues getting I/O device to work with udev....

Quoted 1 line · Jan Zwiegers
Quoted 1 line
Quoted 1 line

fact that the device gets created under /dev/edredaq/device0-99.

This

Quoted 2 lines
Quoted 2 lines

rules

Quoted 1 line

worked just fine on previous systems, but suddenly it started to

Quoted 8 lines
Quoted 8 lines

fail on

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

newer distros.

Can you guys maybe point me to a solution?

Hmm, what exactly is the problem? What suddenly started to fail? Can you paste the output of 'udevmonitor' when you load the kernel module? Or the output when connect the USB device, if you only

have it

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

built-in.

The node /dev/edredaq/device0 never get created, or it does not show

up

Quoted 7 lines
Quoted 7 lines

in

Quoted 1 line

the file system (maybe it's permission / security related).

Unfortunately I

Quoted 1 line

have left work already and cannot do the 'udevmonitor' for you.

Oh, that all sounds very much like you don't use the right driver core functions and you create the "dev" file yourself in sysfs. You must

use

Quoted 10 lines
Quoted 8 lines

the right functions in the kernel and pass the correct dev_t to the device registration. That will automatically create the "dev" file and add the needed data to the uevent environment, to let udev create the node.

But again, to verify this, we need the output of "udevmonitor --env", while you plug in a device or re-trigger the event by writing "add" to the "uevent" file in the sysfs device directory.

Quoted 6 lines

I just create a simple device class by making use of:

'class_device_register' &
'class_device_createfile'
to create /sys/class/edredaq/device0 &
/sys/class/edredaq/device0/edredaq_nodename

Quoted 4 lines

See how class_device_create() works and fills in dev_t, you need to convert to that function or do the same with the dev_t value. You also need to set the 'device' pointer like that function does, to make userspace happy.

Quoted 4 lines

Kay I think I'm a bit stupid here, but I don' really follow what you mean. Do you say that I need to look at how I implemented the class_device_create_file? Mine seems the same as others. Do you think this is the cause of my problem?

Do you have a pointer to your source code so that we can look to see if there is a problem with 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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#16 lore raw
In reply to [email protected]
Quoted 90 lines

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: 26 August 2006 06:48 AM
To: Jan Zwiegers
Cc: 'Kay Sievers'; 'John Thomas'; linux-hotplug- [email protected]; 'Ray Schumacher'; [email protected]
Subject: Re: issues getting I/O device to work with udev....

Quoted 11 lines · Jan Zwiegers
Quoted 11 lines

-----Original Message-----
From: Kay Sievers [mailto:[email protected]]
Sent: 25 August 2006 04:02 PM
To: [email protected]
Cc: 'John Thomas'; [email protected]; 'Ray Schumacher'; [email protected]
Subject: RE: issues getting I/O device to work with udev....

Quoted 2 lines · Jan Zwiegers
Quoted 2 lines

-----Original Message-----
From: [email protected]

[mailto:linux-

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

[email protected]] On Behalf Of Kay

Sievers

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Sent: 25 August 2006 03:00 PM
To: [email protected]
Cc: 'John Thomas'; [email protected]; 'Ray Schumacher'; [email protected]
Subject: RE: issues getting I/O device to work with udev....

Quoted 1 line · Jan Zwiegers
Quoted 1 line
Quoted 1 line

fact that the device gets created under

/dev/edredaq/device0-99.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

This

Quoted 2 lines
Quoted 2 lines

rules

Quoted 1 line

worked just fine on previous systems, but suddenly it

started to

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

fail on

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

newer distros.

Can you guys maybe point me to a solution?

Hmm, what exactly is the problem? What suddenly started to

fail?

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Can you paste the output of 'udevmonitor' when you load the

kernel

Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

module? Or the output when connect the USB device, if you only

have it

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

built-in.

The node /dev/edredaq/device0 never get created, or it does not

show

Quoted 7 lines
Quoted 7 lines

up

Quoted 6 lines
Quoted 6 lines

in

Quoted 1 line

the file system (maybe it's permission / security related).

Unfortunately I

Quoted 1 line

have left work already and cannot do the 'udevmonitor' for you.

Oh, that all sounds very much like you don't use the right driver

core

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

functions and you create the "dev" file yourself in sysfs. You

must

Quoted 2 lines
Quoted 2 lines

use

Quoted 1 line
Quoted 1 line

the right functions in the kernel and pass the correct dev_t to

the

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

device registration. That will automatically create the "dev" file

and

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

add the needed data to the uevent environment, to let udev create

the

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

node.

But again, to verify this, we need the output of "udevmonitor --

env",

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

while you plug in a device or re-trigger the event by writing

"add" to

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 1 line

the "uevent" file in the sysfs device directory.

I just create a simple device class by making use of:

'class_device_register' &
'class_device_createfile'
to create /sys/class/edredaq/device0 &
/sys/class/edredaq/device0/edredaq_nodename

Quoted 6 lines
Quoted 4 lines

See how class_device_create() works and fills in dev_t, you need to convert to that function or do the same with the dev_t value. You also need to set the 'device' pointer like that function does, to make userspace happy.

Kay I think I'm a bit stupid here, but I don' really follow what you

Quoted 8 lines

mean.

Quoted 2 lines

Do you say that I need to look at how I implemented the class_device_create_file? Mine seems the same as others. Do you think

this

Quoted 1 line

is the cause of my problem?

Do you have a pointer to your source code so that we can look to see if there is a problem with it?

Can I email it directly to you Greg? It's about 1MB.

Quoted 4 lines

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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#17 lore raw
In reply to [email protected]
Quoted 5 lines · Jan Zwiegers
Quoted 3 lines

Do you have a pointer to your source code so that we can look to see if there is a problem with it?

Can I email it directly to you Greg? It's about 1MB.

How about a pointer to where everyone can download it on the net? Or is there a license issue that prevents this from being public?

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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#18 lore raw
In reply to [email protected]
Quoted 10 lines

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: 26 August 2006 08:08 PM
To: Jan Zwiegers
Cc: 'Kay Sievers'; 'John Thomas'; linux-hotplug- [email protected]; 'Ray Schumacher'; [email protected]
Subject: Re: issues getting I/O device to work with udev....

Quoted 1 line · Jan Zwiegers
Quoted 1 line
Quoted 9 lines
Quoted 1 line
Quoted 1 line

Do you have a pointer to your source code so that we can look to see

if

Quoted 3 lines
Quoted 1 line

there is a problem with it?

Can I email it directly to you Greg? It's about 1MB.

How about a pointer to where everyone can download it on the net? Or is there a license issue that prevents this from being public?

[Jan Zwiegers]
No license issues at all. It's open source and for everybody to use, copy etc. I got most of it from your skeleton drivers anyhow or digging through other drivers. The current version on the web is different to what I want you to look at. I will update the source tomorrow and send you the link. Many thanks to you and Kay for the help!

Quoted 3 lines

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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#19 lore raw
In reply to [email protected]
Quoted 19 lines · Jan Zwiegers
Quoted 19 lines
Quoted 18 lines
Quoted 10 lines

Oh, that all sounds very much like you don't use the right driver core functions and you create the "dev" file yourself in sysfs. You must use the right functions in the kernel and pass the correct dev_t to the device registration. That will automatically create the "dev" file and add the needed data to the uevent environment, to let udev create the node.

But again, to verify this, we need the output of "udevmonitor --env", while you plug in a device or re-trigger the event by writing "add" to the "uevent" file in the sysfs device directory.

I just create a simple device class by making use of:

'class_device_register' &
'class_device_createfile'
to create /sys/class/edredaq/device0 &
/sys/class/edredaq/device0/edredaq_nodename

Quoted 8 lines
Quoted 4 lines

See how class_device_create() works and fills in dev_t, you need to convert to that function or do the same with the dev_t value. You also need to set the 'device' pointer like that function does, to make userspace happy.

Do you say that I need to look at how I implemented the class_device_create_file? Mine seems the same as others. Do you think this is the cause of my problem?

I'm just guessing, but I expect you create the file with the name "dev" which contains the major/minor number yourself in your driver. If that's the case, you shouldn't do that and just set the dev_t value in the device structure before registering the device, that will instruct the driver core to create that file, along with environment variables needed for udev to create a node.

The best way to do this, would probably be to use the class_device_create() function in /linux/drivers/base/class.c, which expects all the needed values as parameters.

Kay

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#20 lore raw
In reply to [email protected]
Quoted 53 lines

-----Original Message-----
From: [email protected] [mailto:linux- [email protected]] On Behalf Of Kay Sievers
Sent: 27 August 2006 02:18 AM
To: [email protected]
Cc: 'John Thomas'; [email protected]; 'Ray Schumacher'; [email protected]
Subject: RE: issues getting I/O device to work with udev....

Quoted 1 line · Jan Zwiegers
Quoted 1 line
Quoted 1 line
Quoted 1 line

Oh, that all sounds very much like you don't use the right driver

core

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

functions and you create the "dev" file yourself in sysfs. You

must use

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

the right functions in the kernel and pass the correct dev_t to

the

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

device registration. That will automatically create the "dev" file

and

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

add the needed data to the uevent environment, to let udev create

the

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

node.

But again, to verify this, we need the output of "udevmonitor --

env",

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

while you plug in a device or re-trigger the event by writing

"add" to

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 1 line

the "uevent" file in the sysfs device directory.

I just create a simple device class by making use of:

'class_device_register' &
'class_device_createfile'
to create /sys/class/edredaq/device0 &
/sys/class/edredaq/device0/edredaq_nodename

Quoted 7 lines
Quoted 4 lines

See how class_device_create() works and fills in dev_t, you need to convert to that function or do the same with the dev_t value. You also need to set the 'device' pointer like that function does, to make userspace happy.

Do you say that I need to look at how I implemented the class_device_create_file? Mine seems the same as others. Do you think

this

Quoted 1 line

is the cause of my problem?

I'm just guessing, but I expect you create the file with the name "dev" which contains the major/minor number yourself in your driver. If that's the case, you shouldn't do that and just set the dev_t value in the device structure before registering the device, that will instruct the driver core to create that file, along with environment variables needed for udev to create a node.

Quoted 3 lines

The best way to do this, would probably be to use the class_device_create() function in /linux/drivers/base/class.c, which expects all the needed values as parameters.

[Jan Zwiegers]
Hi Kay & Greg

Sorry for taking so long to get back to you.

The source code is downloadable at
http://www.eagle.co.za/download/download/edre_linux_drivers_2_0_8.tar.gz

If you can maybe have a quick look at the class driver. The code is very short, so you should be able to quickly understand what is wrong.

Many thanks
Jan

Quoted 4 lines

Kay

Quoted 10 lines

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#21 lore raw
In reply to [email protected]
Quoted 59 lines · Jan Zwiegers
Quoted 53 lines

-----Original Message-----
From: [email protected] [mailto:linux- [email protected]] On Behalf Of Kay Sievers
Sent: 27 August 2006 02:18 AM
To: [email protected]
Cc: 'John Thomas'; [email protected]; 'Ray Schumacher'; [email protected]
Subject: RE: issues getting I/O device to work with udev....

Quoted 1 line · Jan Zwiegers
Quoted 1 line
Quoted 1 line
Quoted 1 line

Oh, that all sounds very much like you don't use the right driver

core

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

functions and you create the "dev" file yourself in sysfs. You

must use

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

the right functions in the kernel and pass the correct dev_t to

the

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

device registration. That will automatically create the "dev" file

and

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

add the needed data to the uevent environment, to let udev create

the

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

node.

But again, to verify this, we need the output of "udevmonitor --

env",

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

while you plug in a device or re-trigger the event by writing

"add" to

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 1 line

the "uevent" file in the sysfs device directory.

I just create a simple device class by making use of:

'class_device_register' &
'class_device_createfile'
to create /sys/class/edredaq/device0 &
/sys/class/edredaq/device0/edredaq_nodename

Quoted 7 lines
Quoted 4 lines

See how class_device_create() works and fills in dev_t, you need to convert to that function or do the same with the dev_t value. You also need to set the 'device' pointer like that function does, to make userspace happy.

Do you say that I need to look at how I implemented the class_device_create_file? Mine seems the same as others. Do you think

this

Quoted 1 line

is the cause of my problem?

I'm just guessing, but I expect you create the file with the name "dev" which contains the major/minor number yourself in your driver. If that's the case, you shouldn't do that and just set the dev_t value in the device structure before registering the device, that will instruct the driver core to create that file, along with environment variables needed for udev to create a node.

Quoted 3 lines

The best way to do this, would probably be to use the class_device_create() function in /linux/drivers/base/class.c, which expects all the needed values as parameters.

[Jan Zwiegers]
Hi Kay & Greg

Quoted 7 lines

Sorry for taking so long to get back to you.

The source code is downloadable at
http://www.eagle.co.za/download/download/edre_linux_drivers_2_0_8.tar.gz

If you can maybe have a quick look at the class driver. The code is very short, so you should be able to quickly understand what is wrong.

Just like Kay guessed, you are not using the proper function call. Please use the class_device_create() call instead of rolling your own. That will fix your problem.

And why aren't these drivers in the main kernel tree? That would make this a whole lot easier, and save you a lot of time on maintenance.

As it is, I get a whole lot of warnings and errors when trying to build this code against the latest kernel version :(

If you want, I can help you out in getting this into the kernel tree. Overall the code looks pretty sane, only a few small cleanups would be needed (becides the warning fixes...)

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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#22 lore raw
In reply to [email protected]
Quoted 86 lines

-----Original Message-----
From: [email protected] [mailto:linux- [email protected]] On Behalf Of Greg KH
Sent: 30 August 2006 07:51 PM
To: Jan Zwiegers
Cc: 'John Thomas'; [email protected]; 'Kay Sievers'; [email protected]; 'Ray Schumacher'
Subject: Re: issues getting I/O device to work with udev....

Quoted 11 lines · Jan Zwiegers
Quoted 11 lines

-----Original Message-----
From: [email protected] [mailto:linux- [email protected]] On Behalf Of Kay Sievers
Sent: 27 August 2006 02:18 AM
To: [email protected]
Cc: 'John Thomas'; [email protected]; 'Ray Schumacher'; [email protected]
Subject: RE: issues getting I/O device to work with udev....

Quoted 1 line · Jan Zwiegers
Quoted 1 line
Quoted 1 line
Quoted 1 line

Oh, that all sounds very much like you don't use the right

driver

Quoted 4 lines
Quoted 4 lines

core

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

functions and you create the "dev" file yourself in sysfs. You

must use

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

the right functions in the kernel and pass the correct dev_t

to

Quoted 2 lines
Quoted 2 lines

the

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

device registration. That will automatically create the "dev"

file

Quoted 2 lines
Quoted 2 lines

and

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

add the needed data to the uevent environment, to let udev

create

Quoted 4 lines
Quoted 4 lines

the

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

node.

But again, to verify this, we need the output of "udevmonitor

--

Quoted 6 lines
Quoted 6 lines

env",

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

while you plug in a device or re-trigger the event by writing

"add" to

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

the "uevent" file in the sysfs device directory.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines

I just create a simple device class by making use of:

'class_device_register' &
'class_device_createfile'
to create /sys/class/edredaq/device0 &
/sys/class/edredaq/device0/edredaq_nodename

See how class_device_create() works and fills in dev_t, you need

to

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

convert to that function or do the same with the dev_t value. You

also

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

need to set the 'device' pointer like that function does, to make userspace happy.

Do you say that I need to look at how I implemented the class_device_create_file? Mine seems the same as others. Do you

think

Quoted 4 lines
Quoted 4 lines

this

Quoted 1 line

is the cause of my problem?

I'm just guessing, but I expect you create the file with the name

"dev"

Quoted 1 line
Quoted 1 line

which contains the major/minor number yourself in your driver. If

that's

Quoted 3 lines
Quoted 3 lines

the case, you shouldn't do that and just set the dev_t value in the device structure before registering the device, that will instruct the driver core to create that file, along with environment variables

needed

Quoted 13 lines
Quoted 5 lines

for udev to create a node.

The best way to do this, would probably be to use the class_device_create() function in /linux/drivers/base/class.c, which expects all the needed values as parameters.

[Jan Zwiegers]
Hi Kay & Greg

Sorry for taking so long to get back to you.

The source code is downloadable at
http://www.eagle.co.za/download/download/edre_linux_drivers_2_0_8.tar.gz

Quoted 6 lines
Quoted 2 lines

If you can maybe have a quick look at the class driver. The code is very short, so you should be able to quickly understand what is wrong.

Just like Kay guessed, you are not using the proper function call. Please use the class_device_create() call instead of rolling your own. That will fix your problem.

[Jan Zwiegers]
Yes this was the problem indeed. I have updated the code to make use of class_device_create() and the problem is resolved.

http://www.eagle.co.za/download/download/edre_linux_drivers_2_0_8_tar.gz

Quoted 3 lines

And why aren't these drivers in the main kernel tree? That would make this a whole lot easier, and save you a lot of time on maintenance.

[Jan Zwiegers]
I do wish to add this code to the kernel tree. Due to lack of development time I have only played catch-up the last year or two. We add support and migrate to later kernel when only required. However the code is very stable now and minor changes are needed to support the latest kernel. The other issue is we package the driver code with our API, examples, docs and applications, but the kernel tree will be a much better solution.

Quoted 3 lines

As it is, I get a whole lot of warnings and errors when trying to build this code against the latest kernel version :(

[Jan Zwiegers]
Yes, I'm aware of this and as soon as I have a bit of spare time I will make the necessary updates.

Quoted 4 lines

If you want, I can help you out in getting this into the kernel tree. Overall the code looks pretty sane, only a few small cleanups would be needed (becides the warning fixes...)

[Jan Zwiegers]
Your help will be really appreciated. I don't really understand the process of getting it into the kernel tree, but if you can point me in the right direction I can do all the work and you can guide me. So maybe we can first start with updating the code to be able to integrate into the kernel tree.

Many thanks to Greg and Kay helping me to resolve this problem!

Quoted 5 lines

thanks,

greg k-h

Quoted 10 lines

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

-------------------------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel