mdev not loading firmware for marvel chip
Denys Vlasenko
vda.linux at googlemail.com
Tue May 27 23:50:10 UTC 2008
On Tuesday 27 May 2008 23:41, Ram kumar wrote:
> load the firmware and return the appropriate firmware to the kernel.Since
> mdev is not able to load the firmware the libertas driver throws two errors:
> and fails ?
>
> device: 'mmc0:0001:1':
> device_unregister
>
> libertas: can't load helper
> firmware
>
> libertas: failed to load helper firmware.
>
> Note: my $cat proc/sys/kernel/hotplug gives /sbin/mdev.
>
> > and load_firmware() does this:
> >
> > /* For the full gory details, see linux/Documentation/firmware_class/README
> > *
> > * Firmware loading works like this:
> > * - kernel sets FIRMWARE env var
> > * - userspace checks /lib/firmware/$FIRMWARE
> > * - userspace waits for /sys/$DEVPATH/loading to appear
> > * - userspace writes "1" to /sys/$DEVPATH/loading
> > * - userspace copies /lib/firmware/$FIRMWARE into /sys/$DEVPATH/data
> > * - userspace writes "0" (worked) or "-1" (failed) to
> > /sys/$DEVPATH/loading
> > * - kernel loads firmware into device
> > */
> > static void load_firmware(const char *const firmware, const char *const
> > sysfs_path)
> > {...}
> >
> > Can you add debug printouts to mdev.c and determine what step doesn't work?
> >
> > I guess the load_firmware function itself is not getting triggered.
Can you check it by adding these lines to mdev.c?
if (ENABLE_FEATURE_MDEV_LOAD_FIRMWARE) {
char *fw = getenv("FIRMWARE");
if (fw)
==> { bb_error_msg("calling load_firmware('%s','%s')", fw, temp);
load_firmware(fw, temp);
==> bb_error_msg("load_firmware returned");
==> }
}
> "userspace waits for /sys/$DEVPATH/loading to appear"
>
> Is it the function of the kernel to make this entry appear in the file
> system or is it mdev which is responsible for creating the entry?
Looks like kernel creates it. I'd expect that it is done by load_firmware(),
you do not need to do it yourself.
Also, you can trivially check whether this file has appeared or not.
--
vda
More information about the busybox
mailing list