* cm4000 device creation again
@ 2006-03-12 12:39 Joachim Breitner
2006-03-13 7:02 ` Kay Sievers
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: Joachim Breitner @ 2006-03-12 12:39 UTC (permalink / raw)
To: linux-hotplug
[Please CC: me on replys, I'm not on the list]
Hi,
some time ago, I asked for help WRT device creation for the cm4000 card
reader. Since then, the (probably) necessary bits have been added to the
driver and included in 2.6.16-rc6. I just installed this version, but
the device is still not created.
Here is the syslog with udevcontrol log_priorityÞbug upon inserting
the card:
Mar 12 13:34:32 otto kernel: pccard: PCMCIA card inserted into slot 0
Mar 12 13:34:32 otto kernel: pcmcia: registering new device pcmcia0.0
Mar 12 13:34:32 otto udevd[948]: udev_event_run: seq 1774 forked, pid [5908], 'add' 'pcmcia', 0 seconds old
Mar 12 13:34:32 otto udevd-event[5908]: wait_for_sysfs: file '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0.0/bus' appeared after 0 loops
Mar 12 13:34:32 otto udevd-event[5908]: pass_env_to_socket: passed 299 bytes to socket '/org/freedesktop/hal/udev_event',
Mar 12 13:34:32 otto udevd-event[5908]: run_program: '/lib/udev/pcmcia-check-broken-cis'
Mar 12 13:34:32 otto udevd-event[5908]: run_program: '/lib/udev/pcmcia-check-broken-cis' returned with status 0
Mar 12 13:34:32 otto udevd-event[5908]: run_program: '/bin/sh -c 'echo 1 > /sys//devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0.0/allow_func_id_match''
Mar 12 13:34:32 otto udevd-event[5908]: run_program: '/bin/sh' returned with status 0
Mar 12 13:34:32 otto udevd-event[5908]: pass_env_to_socket: passed 299 bytes to socket '/org/kernel/udev/monitor',
Mar 12 13:34:32 otto udevd-event[5908]: run_program: '/sbin/modprobe pcmcia:m0223c0002f00fn00pfn00pa2FB368CApbA2BD8C39pc00000000pd00000000'
Mar 12 13:34:32 otto udevd[948]: udev_event_run: seq 1775 forked, pid [5912], 'add' 'module', 0 seconds old
Mar 12 13:34:32 otto kernel: cm4000_cs.c v2.4.0gm6 - All bugs added by Harald Welte
Mar 12 13:34:32 otto udevd[948]: udev_event_run: seq 1776 forked, pid [5913], 'add' 'drivers', 0 seconds old
Mar 12 13:34:32 otto udevd[948]: udev_event_run: seq 1777 forked, pid [5914], 'add' 'cardman_4000', 0 seconds old
Mar 12 13:34:32 otto udevd-event[5908]: run_program: '/sbin/modprobe' returned with status 0
Mar 12 13:34:32 otto udevd-event[5908]: run_program: 'udev_run_hotplugd pcmcia'
Mar 12 13:34:32 otto udevd-event[5908]: run_program: '/lib/udev/udev_run_hotplugd' returned with status 0
Mar 12 13:34:32 otto udevd-event[5908]: run_program: 'udev_run_devd pcmcia'
Mar 12 13:34:32 otto udevd-event[5908]: run_program: '/lib/udev/udev_run_devd' returned with status 0
Mar 12 13:34:32 otto udevd-event[5908]: udev_event_run: seq 1774 finished
Mar 12 13:34:32 otto udevd[948]: udev_done: seq 1774, pid [5908] exit with 0, 0 seconds old
Mar 12 13:34:32 otto udevd-event[5912]: pass_env_to_socket: passed 113 bytes to socket '/org/freedesktop/hal/udev_event',
Mar 12 13:34:32 otto udevd-event[5912]: pass_env_to_socket: passed 113 bytes to socket '/org/kernel/udev/monitor',
Mar 12 13:34:32 otto udevd-event[5912]: udev_event_run: seq 1775 finished
Mar 12 13:34:32 otto udevd[948]: udev_done: seq 1775, pid [5912] exit with 0, 0 seconds old
Mar 12 13:34:32 otto udevd-event[5913]: pass_env_to_socket: passed 138 bytes to socket '/org/freedesktop/hal/udev_event',
Mar 12 13:34:32 otto udevd-event[5913]: pass_env_to_socket: passed 138 bytes to socket '/org/kernel/udev/monitor',
Mar 12 13:34:32 otto udevd-event[5913]: udev_event_run: seq 1776 finished
Mar 12 13:34:32 otto udevd[948]: udev_done: seq 1776, pid [5913] exit with 0, 0 seconds old
Mar 12 13:34:32 otto udevd-event[5914]: pass_env_to_socket: passed 133 bytes to socket '/org/freedesktop/hal/udev_event',
Mar 12 13:34:32 otto udevd-event[5914]: pass_env_to_socket: passed 133 bytes to socket '/org/kernel/udev/monitor',
Mar 12 13:34:32 otto udevd-event[5914]: run_program: 'udev_run_hotplugd cardman_4000'
Mar 12 13:34:32 otto udevd-event[5914]: run_program: '/lib/udev/udev_run_hotplugd' returned with status 0
Mar 12 13:34:32 otto udevd-event[5914]: run_program: 'udev_run_devd cardman_4000'
Mar 12 13:34:32 otto udevd-event[5914]: run_program: '/lib/udev/udev_run_devd' returned with status 0
Mar 12 13:34:32 otto udevd-event[5914]: udev_event_run: seq 1777 finished
Mar 12 13:34:32 otto udevd[948]: udev_done: seq 1777, pid [5914] exit with 0, 0 seconds old
and here is the corresponding udevmonitor output:
UEVENT[1142166872.360451] add@/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0.0
UDEV [1142166872.418777] add@/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0.0
UEVENT[1142166872.488393] add@/module/cm4000_cs
UEVENT[1142166872.489073] add@/bus/pcmcia/drivers/cm4000_cs
UEVENT[1142166872.584816] add@/class/cardman_4000/cmm0
UDEV [1142166872.590873] add@/module/cm4000_cs
UDEV [1142166872.611633] add@/bus/pcmcia/drivers/cm4000_cs
UDEV [1142166872.614490] add@/class/cardman_4000/cmm0
I'm running debian unstable. Any hints on where I might find the problem?
Thanks,
Joachim
--
Joachim "nomeata" Breitner
mail: mail@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
JID: joachimbreitner@amessage.de | http://www.joachim-breitner.de/
Debian Developer: nomeata@debian.org
-------------------------------------------------------
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] 11+ messages in thread
* Re: cm4000 device creation again
2006-03-12 12:39 cm4000 device creation again Joachim Breitner
@ 2006-03-13 7:02 ` Kay Sievers
2006-03-13 21:33 ` Joachim Breitner
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2006-03-13 7:02 UTC (permalink / raw)
To: linux-hotplug
On Sun, Mar 12, 2006 at 01:39:29PM +0100, Joachim Breitner wrote:
> some time ago, I asked for help WRT device creation for the cm4000 card
> reader. Since then, the (probably) necessary bits have been added to the
> driver and included in 2.6.16-rc6. I just installed this version, but
> the device is still not created.
But this looks good:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;hgbc620006a30cf5dcbf409dbbd4fd93179ddfb1
What does:
cat /sys/class/cardman_4000/cmm0/dev
print?
Does:
udevmonitor --env
show:
...
MAJOR MINOR ...
if you trigger the device event with:
echo add > /sys/class/cardman_4000/cmm0/uevent
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] 11+ messages in thread
* Re: cm4000 device creation again
2006-03-12 12:39 cm4000 device creation again Joachim Breitner
2006-03-13 7:02 ` Kay Sievers
@ 2006-03-13 21:33 ` Joachim Breitner
2006-04-02 20:58 ` Joachim Breitner
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Joachim Breitner @ 2006-03-13 21:33 UTC (permalink / raw)
To: linux-hotplug
Hi,
Am Montag, den 13.03.2006, 08:02 +0100 schrieb Kay Sievers:
> What does:
> cat /sys/class/cardman_4000/cmm0/dev
> print?
I only have
# ls /sys/class/cardman_4000/cmm0/
uevent
> Does:
> udevmonitor --env
> show:
> ...
> MAJOR> MINOR> ...
> if you trigger the device event with:
> echo add > /sys/class/cardman_4000/cmm0/uevent
No, it doesn't:
# udevmonitor --env
udevmonitor prints the received event from the kernel [UEVENT]
and the event which udev sends out after rule processing [UDEV]
UEVENT[1142285497.051124] add@/class/cardman_4000/cmm0
ACTIONd
DEVPATH=/class/cardman_4000/cmm0
SUBSYSTEMÊrdman_4000
SEQNUM\x1973
UDEV [1142285497.147727] add@/class/cardman_4000/cmm0
UDEV_LOG=3
ACTIONd
DEVPATH=/class/cardman_4000/cmm0
SUBSYSTEMÊrdman_4000
SEQNUM\x1973
UDEVD_EVENT=1
I hope that helps debugging it.
Thanks!
Joachim
--
Joachim "nomeata" Breitner
mail: mail@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
JID: joachimbreitner@amessage.de | http://www.joachim-breitner.de/
Debian Developer: nomeata@debian.org
-------------------------------------------------------
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] 11+ messages in thread
* Re: cm4000 device creation again
2006-03-12 12:39 cm4000 device creation again Joachim Breitner
2006-03-13 7:02 ` Kay Sievers
2006-03-13 21:33 ` Joachim Breitner
@ 2006-04-02 20:58 ` Joachim Breitner
2006-04-04 17:01 ` Greg KH
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Joachim Breitner @ 2006-04-02 20:58 UTC (permalink / raw)
To: linux-hotplug
Hi linux-hotplug list,
I did not get a reply on the following diagnostics. The bug is either
still in the stable 2.6.16 release, or it is not a kernel bug at all, in
which case I'd like to hear pointers where to continue looking.
BTW, after creating the device node by hand, everything seems to work
fine.
Thanks,
Joachim
Am Montag, den 13.03.2006, 22:33 +0100 schrieb Joachim Breitner:
> Am Montag, den 13.03.2006, 08:02 +0100 schrieb Kay Sievers:
> > What does:
> > cat /sys/class/cardman_4000/cmm0/dev
> > print?
> I only have
> # ls /sys/class/cardman_4000/cmm0/
> uevent
>
> > Does:
> > udevmonitor --env
> > show:
> > ...
> > MAJOR> > MINOR> > ...
> > if you trigger the device event with:
> > echo add > /sys/class/cardman_4000/cmm0/uevent
> No, it doesn't:
> # udevmonitor --env
> udevmonitor prints the received event from the kernel [UEVENT]
> and the event which udev sends out after rule processing [UDEV]
>
> UEVENT[1142285497.051124] add@/class/cardman_4000/cmm0
> ACTIONd
> DEVPATH=/class/cardman_4000/cmm0
> SUBSYSTEMÊrdman_4000
> SEQNUM\x1973
>
> UDEV [1142285497.147727] add@/class/cardman_4000/cmm0
> UDEV_LOG=3
> ACTIONd
> DEVPATH=/class/cardman_4000/cmm0
> SUBSYSTEMÊrdman_4000
> SEQNUM\x1973
> UDEVD_EVENT=1
>
> I hope that helps debugging it.
>
> Thanks!
> Joachim
--
Joachim "nomeata" Breitner
mail: mail@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
JID: joachimbreitner@amessage.de | http://www.joachim-breitner.de/
Debian Developer: nomeata@debian.org
-------------------------------------------------------
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] 11+ messages in thread
* Re: cm4000 device creation again
2006-03-12 12:39 cm4000 device creation again Joachim Breitner
` (2 preceding siblings ...)
2006-04-02 20:58 ` Joachim Breitner
@ 2006-04-04 17:01 ` Greg KH
2006-04-06 13:57 ` Harald Welte
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2006-04-04 17:01 UTC (permalink / raw)
To: linux-hotplug
On Mon, Mar 13, 2006 at 10:33:10PM +0100, Joachim Breitner wrote:
> Hi,
>
> Am Montag, den 13.03.2006, 08:02 +0100 schrieb Kay Sievers:
> > What does:
> > cat /sys/class/cardman_4000/cmm0/dev
> > print?
> I only have
> # ls /sys/class/cardman_4000/cmm0/
> uevent
That's the problem then. The driver needs to export the device
major:minor in order for udev to work properly. Please contact the
author of the driver to have them use the class_device_create() function
properly to achive this.
thanks,
greg k-h
-------------------------------------------------------
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] 11+ messages in thread
* Re: cm4000 device creation again
2006-03-12 12:39 cm4000 device creation again Joachim Breitner
` (3 preceding siblings ...)
2006-04-04 17:01 ` Greg KH
@ 2006-04-06 13:57 ` Harald Welte
2006-04-06 14:02 ` Harald Welte
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Harald Welte @ 2006-04-06 13:57 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 978 bytes --]
On Tue, Apr 04, 2006 at 10:01:02AM -0700, Greg KH wrote:
> On Mon, Mar 13, 2006 at 10:33:10PM +0100, Joachim Breitner wrote:
> > Hi,
> >
> > Am Montag, den 13.03.2006, 08:02 +0100 schrieb Kay Sievers:
> > > What does:
> > > cat /sys/class/cardman_4000/cmm0/dev
> > > print?
> > I only have
> > # ls /sys/class/cardman_4000/cmm0/
> > uevent
>
> That's the problem then. The driver needs to export the device
> major:minor in order for udev to work properly. Please contact the
> author of the driver to have them use the class_device_create() function
> properly to achive this.
that would be me. I'll investigate and cook up a patch asap.
--
- Harald Welte <laforge@gnumonks.org> http://gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: cm4000 device creation again
2006-03-12 12:39 cm4000 device creation again Joachim Breitner
` (4 preceding siblings ...)
2006-04-06 13:57 ` Harald Welte
@ 2006-04-06 14:02 ` Harald Welte
2006-04-06 14:53 ` Greg KH
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Harald Welte @ 2006-04-06 14:02 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]
Hi Greg,
On Thu, Apr 06, 2006 at 03:57:28PM +0200, Harald Welte wrote:
> On Tue, Apr 04, 2006 at 10:01:02AM -0700, Greg KH wrote:
>
> > That's the problem then. The driver needs to export the device
> > major:minor in order for udev to work properly. Please contact the
> > author of the driver to have them use the class_device_create() function
> > properly to achive this.
>
> that would be me. I'll investigate and cook up a patch asap.
the question is: what is wrong about the current code?
it uses:
cmm_class = class_create(THIS_MODULE, "cardman_4000");
major = register_chrdev(0, DEVICE_NAME, &cm4000_fops);
class_device_create(cmm_class, NULL, MKDEV(major, i), NULL, "cmm%d", i);
where 'i' is the minor number.
Any suggestions are welcome.
--
- Harald Welte <laforge@gnumonks.org> http://gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: cm4000 device creation again
2006-03-12 12:39 cm4000 device creation again Joachim Breitner
` (5 preceding siblings ...)
2006-04-06 14:02 ` Harald Welte
@ 2006-04-06 14:53 ` Greg KH
2006-04-06 16:21 ` Joachim Breitner
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2006-04-06 14:53 UTC (permalink / raw)
To: linux-hotplug
On Thu, Apr 06, 2006 at 04:02:26PM +0200, Harald Welte wrote:
> Hi Greg,
>
> On Thu, Apr 06, 2006 at 03:57:28PM +0200, Harald Welte wrote:
> > On Tue, Apr 04, 2006 at 10:01:02AM -0700, Greg KH wrote:
> >
> > > That's the problem then. The driver needs to export the device
> > > major:minor in order for udev to work properly. Please contact the
> > > author of the driver to have them use the class_device_create() function
> > > properly to achive this.
> >
> > that would be me. I'll investigate and cook up a patch asap.
>
> the question is: what is wrong about the current code?
>
> it uses:
>
> cmm_class = class_create(THIS_MODULE, "cardman_4000");
> major = register_chrdev(0, DEVICE_NAME, &cm4000_fops);
> class_device_create(cmm_class, NULL, MKDEV(major, i), NULL, "cmm%d", i);
>
> where 'i' is the minor number.
Hm, that seems just fine. And no "dev" file is being created in the
sysfs directory? That should work...
Do you happen to have a pointer to the struct device for this class
device? You might want to link to that in the above
class_device_create() function (but that should not matter about the
"dev" file creation.)
Hm, can you enable CONFIG_DEBUG_DRIVER and see if the driver core is
complaining about anything when you do the above class_device_create()?
Also, the CONFIG_DEBUG_KOBJECT option might provide more info too (but
be warned, it spits out a lot of stuff...)
thanks,
greg k-h
-------------------------------------------------------
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] 11+ messages in thread
* Re: cm4000 device creation again
2006-03-12 12:39 cm4000 device creation again Joachim Breitner
` (6 preceding siblings ...)
2006-04-06 14:53 ` Greg KH
@ 2006-04-06 16:21 ` Joachim Breitner
2006-04-07 13:58 ` Jan Niehusmann
2006-04-07 14:25 ` Jan Niehusmann
9 siblings, 0 replies; 11+ messages in thread
From: Joachim Breitner @ 2006-04-06 16:21 UTC (permalink / raw)
To: linux-hotplug
Hi,
Am Donnerstag, den 06.04.2006, 16:02 +0200 schrieb Harald Welte:
> the question is: what is wrong about the current code?
>
> Any suggestions are welcome.
Can you reproduce the problem on your machine, or does it depend on the
actual built kernel?
Greetings,
Joachim
--
Joachim "nomeata" Breitner
mail: mail@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
JID: joachimbreitner@amessage.de | http://www.joachim-breitner.de/
Debian Developer: nomeata@debian.org
-------------------------------------------------------
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] 11+ messages in thread
* Re: cm4000 device creation again
2006-03-12 12:39 cm4000 device creation again Joachim Breitner
` (7 preceding siblings ...)
2006-04-06 16:21 ` Joachim Breitner
@ 2006-04-07 13:58 ` Jan Niehusmann
2006-04-07 14:25 ` Jan Niehusmann
9 siblings, 0 replies; 11+ messages in thread
From: Jan Niehusmann @ 2006-04-07 13:58 UTC (permalink / raw)
To: linux-hotplug
Greg KH wrote:
> On Thu, Apr 06, 2006 at 04:02:26PM +0200, Harald Welte wrote:
>> cmm_class = class_create(THIS_MODULE, "cardman_4000");
>> major = register_chrdev(0, DEVICE_NAME, &cm4000_fops);
>> class_device_create(cmm_class, NULL, MKDEV(major, i), NULL, "cmm%d", i);
>>
>> where 'i' is the minor number.
>
> Hm, that seems just fine. And no "dev" file is being created in the
> sysfs directory? That should work...
Maybe the code is in the wrong location or doesn't get called for some
other reason? I observed the following:
If I have the card plugged in at bootup, no /dev/cmm0 gets created, and
/sys/class/cardman_4000/cmm0/ only contains uevent, no file called dev.
But if I first load the cm4000_cs module manually and plug in the card
after that, both /sys/class/cardman_4000/cmm0/dev and /dev/cmm0 appear.
So it looks to me like either class_device_create doesn't get called if
the cm4000_cs gets loaded in response to the card being inserted, or it
does get called but doesn't work because something else is not yet
properly initialized at that time.
Does that make sense?
Jan
-------------------------------------------------------
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] 11+ messages in thread
* Re: cm4000 device creation again
2006-03-12 12:39 cm4000 device creation again Joachim Breitner
` (8 preceding siblings ...)
2006-04-07 13:58 ` Jan Niehusmann
@ 2006-04-07 14:25 ` Jan Niehusmann
9 siblings, 0 replies; 11+ messages in thread
From: Jan Niehusmann @ 2006-04-07 14:25 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 756 bytes --]
Sorry for replying to my own posting ;-)
Jan Niehusmann wrote:
> So it looks to me like either class_device_create doesn't get called if
> the cm4000_cs gets loaded in response to the card being inserted, or it
> does get called but doesn't work because something else is not yet
> properly initialized at that time.
Looks like it's the second: Calling major=register_chrdev(...) before
calling pcmcia_register_driver(...) in cmm_init() does help.
So the problem was that cm4000_probe got called in response to
pcmcia_register_driver, even before register_chrdev got called.
Therefore, class_device_create didn't get a proper major number and failed.
Patch attached, but as I'm writing this through gmane, I'm not sure if
the patch will survive.
Jan
[-- Attachment #2: cm4000-udev.diff --]
[-- Type: text/plain, Size: 635 bytes --]
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 02114a0..0550038 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -1981,10 +1981,6 @@ static int __init cmm_init(void)
if (!cmm_class)
return -1;
- rc = pcmcia_register_driver(&cm4000_driver);
- if (rc < 0)
- return rc;
-
major = register_chrdev(0, DEVICE_NAME, &cm4000_fops);
if (major < 0) {
printk(KERN_WARNING MODULE_NAME
@@ -1992,6 +1988,11 @@ static int __init cmm_init(void)
return -1;
}
+ rc = pcmcia_register_driver(&cm4000_driver);
+ if (rc < 0)
+ return rc;
+
+
return 0;
}
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-04-07 14:25 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-12 12:39 cm4000 device creation again Joachim Breitner
2006-03-13 7:02 ` Kay Sievers
2006-03-13 21:33 ` Joachim Breitner
2006-04-02 20:58 ` Joachim Breitner
2006-04-04 17:01 ` Greg KH
2006-04-06 13:57 ` Harald Welte
2006-04-06 14:02 ` Harald Welte
2006-04-06 14:53 ` Greg KH
2006-04-06 16:21 ` Joachim Breitner
2006-04-07 13:58 ` Jan Niehusmann
2006-04-07 14:25 ` Jan Niehusmann
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).