[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Issue with mdev and firmware handling
From:       Juha Kuikka <juha.kuikka () gmail ! com>
Date:       2009-03-19 18:02:05
Message-ID: a46a26fd0903191102y888663ci42b146296118531d () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Using: Busybox 1.12.1
Problem:
I am using mdev as the hotplug handler. After handling firmware request from
my driver mdev removes the corresponding device node in /dev.

Analysis:
I whipped up a quick wrapper script to mdev as th hotplug handler and I see
this:

ACTION=add
DEVPATH=/class/firmware/mydev
FIRMWARE=img.bin
SUBSYSTEM=firmware

ACTION=remove
DEVPATH=/class/firmware/mydev
FIRMWARE= img.bin
SUBSYSTEM=firmware

Kernel sends both add and remove events for the firmware kobject and looking
at mdev sources it does not seem to differentiate between subsystems so the
latter message seems to cause the removal of the device node.

I replaced mdev hotplug handler with a wrapper script at the end of this
email and it seems to work around the problem.

What is weird here is that I have used mdev before for firmware handling on
different systems without this issue so I'm not sure what has changed.

I'm not sure this kind of fix is the right way to proceed as I'm hardly an
expert on mdev/udev.

 - Juha

"
# cat /sbin/mdev.sh#!/bin/sh

if  [ "$SUBSYSTEM" == "firmware" ]; then
        if [ "$ACTION" == "remove" ] ; then
                echo "Bailing" >> /tmp/mdev.log
                exit 0
        fi
fi

/sbin/mdev
"

-- 
Madness takes it's toll. Please have exact change.

[Attachment #5 (text/html)]

Using: Busybox 1.12.1<div><br></div><div>Problem:</div><div>I am using mdev as the \
hotplug handler. After handling firmware request from my driver mdev removes the \
corresponding device node in /dev.</div><div><br></div><div> Analysis:</div><div>I \
whipped up a quick wrapper script to mdev as th hotplug handler and I see \
this:<br></div><div><br></div><div><div>ACTION=add</div><div>DEVPATH=/class/firmware/mydev</div><div>FIRMWARE=img.bin</div><div>
 SUBSYSTEM=firmware</div><div><br></div><div>ACTION=remove</div><div>DEVPATH=/class/firmware/mydev</div><div>FIRMWARE= \
img.bin</div><div>SUBSYSTEM=firmware</div><div><br></div><div>Kernel sends both add \
and remove events for the firmware kobject and looking at mdev sources it does not \
seem to differentiate between subsystems so the latter message seems to cause the \
removal of the device node.</div> </div><div><br></div><div>I replaced mdev hotplug \
handler with a wrapper script at the end of this email and it seems to work around \
the problem.</div><div><br></div><div>What is weird here is that I have used mdev \
before for firmware handling on different systems without this issue so I&#39;m not \
sure what has changed.</div> <div><br></div><div>I&#39;m not sure this kind of fix is \
the right way to proceed as I&#39;m hardly an expert on \
mdev/udev.</div><div><br></div><div> - \
Juha</div><div><br></div><div>&quot;<br></div><div># cat /sbin/mdev.sh<div> \
#!/bin/sh</div><div><br></div><div>if  [ &quot;$SUBSYSTEM&quot; == \
&quot;firmware&quot; ]; then<br></div><div>        if [ &quot;$ACTION&quot; == \
&quot;remove&quot; ] ; then</div><div>                echo &quot;Bailing&quot; \
&gt;&gt; /tmp/mdev.log</div> <div>                exit 0</div><div>        \
fi</div><div>fi</div><div><br></div><div>/sbin/mdev</div><div>&quot;</div><br>-- \
<br>Madness takes it&#39;s toll. Please have exact change.<br> </div>



_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic