mdev not loading firmware for marvel chip
Ram kumar
ramkumar.research at gmail.com
Tue May 27 21:41:17 UTC 2008
Hi,
Can you elaborate? Howplug upload is rather straightforwardly coded:
>
> /* Hotplug:
> * env ACTION=... DEVPATH=... mdev
> * ACTION can be "add" or "remove"
> * DEVPATH is like "/block/sda" or "/class/input/mice"
> */
> action = getenv("ACTION");
> env_path = getenv("DEVPATH");
> if (!action || !env_path)
> bb_show_usage();
>
> snprintf(temp, PATH_MAX, "/sys%s", env_path);
> if (!strcmp(action, "remove"))
> make_device(temp, 1);
> else if (!strcmp(action, "add")) {
> make_device(temp, 0);
>
> if (ENABLE_FEATURE_MDEV_LOAD_FIRMWARE) {
> char *fw = getenv("FIRMWARE");
> if (fw)
> load_firmware(fw, temp);
> }
> }
The kernel is able to detect the wifi SDIO card and it creates the entry
/sys/bus/sdio/devices/mmc0:0001:1.The kernel also invokes the libertas
drivers for the wifi SDIO card.The libertas driver calls the function
request_firmware.
int *request_firmware * (const struct firmware ** *firmware_p*,
const char * *name*, struct device * *device*);Now i guess the mdev should
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.
"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 ?
Please guide me where iam going wrong ?
Regards,
Ram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20080528/d7f03efc/attachment-0002.htm
More information about the busybox
mailing list