Issue with mdev and firmware handling
Juha Kuikka
juha.kuikka at gmail.com
Thu Mar 19 18:02:05 UTC 2009
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090319/f9237a24/attachment.htm>
More information about the busybox
mailing list