firmware_class: Do not warn that system is not ready from async loads
[linux-flexiantxendom0-3.2.10.git] / drivers / base / firmware_class.c
1 /*
2  * firmware_class.c - Multi purpose firmware loading support
3  *
4  * Copyright (c) 2003 Manuel Estrada Sainz
5  *
6  * Please see Documentation/firmware_class/ for more information.
7  *
8  */
9
10 #include <linux/capability.h>
11 #include <linux/device.h>
12 #include <linux/module.h>
13 #include <linux/init.h>
14 #include <linux/timer.h>
15 #include <linux/vmalloc.h>
16 #include <linux/interrupt.h>
17 #include <linux/bitops.h>
18 #include <linux/mutex.h>
19 #include <linux/kthread.h>
20 #include <linux/highmem.h>
21 #include <linux/firmware.h>
22 #include <linux/slab.h>
23
24 #define to_dev(obj) container_of(obj, struct device, kobj)
25
26 MODULE_AUTHOR("Manuel Estrada Sainz");
27 MODULE_DESCRIPTION("Multi purpose firmware loading support");
28 MODULE_LICENSE("GPL");
29
30 /* Builtin firmware support */
31
32 #ifdef CONFIG_FW_LOADER
33
34 extern struct builtin_fw __start_builtin_fw[];
35 extern struct builtin_fw __end_builtin_fw[];
36
37 static bool fw_get_builtin_firmware(struct firmware *fw, const char *name)
38 {
39         struct builtin_fw *b_fw;
40
41         for (b_fw = __start_builtin_fw; b_fw != __end_builtin_fw; b_fw++) {
42                 if (strcmp(name, b_fw->name) == 0) {
43                         fw->size = b_fw->size;
44                         fw->data = b_fw->data;
45                         return true;
46                 }
47         }
48
49         return false;
50 }
51
52 static bool fw_is_builtin_firmware(const struct firmware *fw)
53 {
54         struct builtin_fw *b_fw;
55
56         for (b_fw = __start_builtin_fw; b_fw != __end_builtin_fw; b_fw++)
57                 if (fw->data == b_fw->data)
58                         return true;
59
60         return false;
61 }
62
63 #else /* Module case - no builtin firmware support */
64
65 static inline bool fw_get_builtin_firmware(struct firmware *fw, const char *name)
66 {
67         return false;
68 }
69
70 static inline bool fw_is_builtin_firmware(const struct firmware *fw)
71 {
72         return false;
73 }
74 #endif
75
76 enum {
77         FW_STATUS_LOADING,
78         FW_STATUS_DONE,
79         FW_STATUS_ABORT,
80 };
81
82 static int loading_timeout = 60;        /* In seconds */
83
84 static inline long firmware_loading_timeout(void)
85 {
86         return loading_timeout > 0 ? loading_timeout * HZ : MAX_SCHEDULE_TIMEOUT;
87 }
88
89 /* fw_lock could be moved to 'struct firmware_priv' but since it is just
90  * guarding for corner cases a global lock should be OK */
91 static DEFINE_MUTEX(fw_lock);
92
93 struct firmware_priv {
94         struct completion completion;
95         struct firmware *fw;
96         unsigned long status;
97         struct page **pages;
98         int nr_pages;
99         int page_array_size;
100         struct timer_list timeout;
101         struct device dev;
102         bool nowait;
103         char fw_id[];
104 };
105
106 static struct firmware_priv *to_firmware_priv(struct device *dev)
107 {
108         return container_of(dev, struct firmware_priv, dev);
109 }
110
111 static void fw_load_abort(struct firmware_priv *fw_priv)
112 {
113         set_bit(FW_STATUS_ABORT, &fw_priv->status);
114         wmb();
115         complete(&fw_priv->completion);
116 }
117
118 static ssize_t firmware_timeout_show(struct class *class,
119                                      struct class_attribute *attr,
120                                      char *buf)
121 {
122         return sprintf(buf, "%d\n", loading_timeout);
123 }
124
125 /**
126  * firmware_timeout_store - set number of seconds to wait for firmware
127  * @class: device class pointer
128  * @attr: device attribute pointer
129  * @buf: buffer to scan for timeout value
130  * @count: number of bytes in @buf
131  *
132  *      Sets the number of seconds to wait for the firmware.  Once
133  *      this expires an error will be returned to the driver and no
134  *      firmware will be provided.
135  *
136  *      Note: zero means 'wait forever'.
137  **/
138 static ssize_t firmware_timeout_store(struct class *class,
139                                       struct class_attribute *attr,
140                                       const char *buf, size_t count)
141 {
142         loading_timeout = simple_strtol(buf, NULL, 10);
143         if (loading_timeout < 0)
144                 loading_timeout = 0;
145
146         return count;
147 }
148
149 static struct class_attribute firmware_class_attrs[] = {
150         __ATTR(timeout, S_IWUSR | S_IRUGO,
151                 firmware_timeout_show, firmware_timeout_store),
152         __ATTR_NULL
153 };
154
155 static void fw_dev_release(struct device *dev)
156 {
157         struct firmware_priv *fw_priv = to_firmware_priv(dev);
158         int i;
159
160         for (i = 0; i < fw_priv->nr_pages; i++)
161                 __free_page(fw_priv->pages[i]);
162         kfree(fw_priv->pages);
163         kfree(fw_priv);
164
165         module_put(THIS_MODULE);
166 }
167
168 static int firmware_uevent(struct device *dev, struct kobj_uevent_env *env)
169 {
170         struct firmware_priv *fw_priv = to_firmware_priv(dev);
171
172         if (add_uevent_var(env, "FIRMWARE=%s", fw_priv->fw_id))
173                 return -ENOMEM;
174         if (add_uevent_var(env, "TIMEOUT=%i", loading_timeout))
175                 return -ENOMEM;
176         if (add_uevent_var(env, "ASYNC=%d", fw_priv->nowait))
177                 return -ENOMEM;
178
179         return 0;
180 }
181
182 static struct class firmware_class = {
183         .name           = "firmware",
184         .class_attrs    = firmware_class_attrs,
185         .dev_uevent     = firmware_uevent,
186         .dev_release    = fw_dev_release,
187 };
188
189 static ssize_t firmware_loading_show(struct device *dev,
190                                      struct device_attribute *attr, char *buf)
191 {
192         struct firmware_priv *fw_priv = to_firmware_priv(dev);
193         int loading = test_bit(FW_STATUS_LOADING, &fw_priv->status);
194
195         return sprintf(buf, "%d\n", loading);
196 }
197
198 static void firmware_free_data(const struct firmware *fw)
199 {
200         int i;
201         vunmap(fw->data);
202         if (fw->pages) {
203                 for (i = 0; i < PFN_UP(fw->size); i++)
204                         __free_page(fw->pages[i]);
205                 kfree(fw->pages);
206         }
207 }
208
209 /* Some architectures don't have PAGE_KERNEL_RO */
210 #ifndef PAGE_KERNEL_RO
211 #define PAGE_KERNEL_RO PAGE_KERNEL
212 #endif
213 /**
214  * firmware_loading_store - set value in the 'loading' control file
215  * @dev: device pointer
216  * @attr: device attribute pointer
217  * @buf: buffer to scan for loading control value
218  * @count: number of bytes in @buf
219  *
220  *      The relevant values are:
221  *
222  *       1: Start a load, discarding any previous partial load.
223  *       0: Conclude the load and hand the data to the driver code.
224  *      -1: Conclude the load with an error and discard any written data.
225  **/
226 static ssize_t firmware_loading_store(struct device *dev,
227                                       struct device_attribute *attr,
228                                       const char *buf, size_t count)
229 {
230         struct firmware_priv *fw_priv = to_firmware_priv(dev);
231         int loading = simple_strtol(buf, NULL, 10);
232         int i;
233
234         mutex_lock(&fw_lock);
235
236         if (!fw_priv->fw)
237                 goto out;
238
239         switch (loading) {
240         case 1:
241                 firmware_free_data(fw_priv->fw);
242                 memset(fw_priv->fw, 0, sizeof(struct firmware));
243                 /* If the pages are not owned by 'struct firmware' */
244                 for (i = 0; i < fw_priv->nr_pages; i++)
245                         __free_page(fw_priv->pages[i]);
246                 kfree(fw_priv->pages);
247                 fw_priv->pages = NULL;
248                 fw_priv->page_array_size = 0;
249                 fw_priv->nr_pages = 0;
250                 set_bit(FW_STATUS_LOADING, &fw_priv->status);
251                 break;
252         case 0:
253                 if (test_bit(FW_STATUS_LOADING, &fw_priv->status)) {
254                         vunmap(fw_priv->fw->data);
255                         fw_priv->fw->data = vmap(fw_priv->pages,
256                                                  fw_priv->nr_pages,
257                                                  0, PAGE_KERNEL_RO);
258                         if (!fw_priv->fw->data) {
259                                 dev_err(dev, "%s: vmap() failed\n", __func__);
260                                 goto err;
261                         }
262                         /* Pages are now owned by 'struct firmware' */
263                         fw_priv->fw->pages = fw_priv->pages;
264                         fw_priv->pages = NULL;
265
266                         fw_priv->page_array_size = 0;
267                         fw_priv->nr_pages = 0;
268                         complete(&fw_priv->completion);
269                         clear_bit(FW_STATUS_LOADING, &fw_priv->status);
270                         break;
271                 }
272                 /* fallthrough */
273         default:
274                 dev_err(dev, "%s: unexpected value (%d)\n", __func__, loading);
275                 /* fallthrough */
276         case -1:
277         err:
278                 fw_load_abort(fw_priv);
279                 break;
280         }
281 out:
282         mutex_unlock(&fw_lock);
283         return count;
284 }
285
286 static DEVICE_ATTR(loading, 0644, firmware_loading_show, firmware_loading_store);
287
288 static ssize_t firmware_data_read(struct file *filp, struct kobject *kobj,
289                                   struct bin_attribute *bin_attr,
290                                   char *buffer, loff_t offset, size_t count)
291 {
292         struct device *dev = to_dev(kobj);
293         struct firmware_priv *fw_priv = to_firmware_priv(dev);
294         struct firmware *fw;
295         ssize_t ret_count;
296
297         mutex_lock(&fw_lock);
298         fw = fw_priv->fw;
299         if (!fw || test_bit(FW_STATUS_DONE, &fw_priv->status)) {
300                 ret_count = -ENODEV;
301                 goto out;
302         }
303         if (offset > fw->size) {
304                 ret_count = 0;
305                 goto out;
306         }
307         if (count > fw->size - offset)
308                 count = fw->size - offset;
309
310         ret_count = count;
311
312         while (count) {
313                 void *page_data;
314                 int page_nr = offset >> PAGE_SHIFT;
315                 int page_ofs = offset & (PAGE_SIZE-1);
316                 int page_cnt = min_t(size_t, PAGE_SIZE - page_ofs, count);
317
318                 page_data = kmap(fw_priv->pages[page_nr]);
319
320                 memcpy(buffer, page_data + page_ofs, page_cnt);
321
322                 kunmap(fw_priv->pages[page_nr]);
323                 buffer += page_cnt;
324                 offset += page_cnt;
325                 count -= page_cnt;
326         }
327 out:
328         mutex_unlock(&fw_lock);
329         return ret_count;
330 }
331
332 static int fw_realloc_buffer(struct firmware_priv *fw_priv, int min_size)
333 {
334         int pages_needed = ALIGN(min_size, PAGE_SIZE) >> PAGE_SHIFT;
335
336         /* If the array of pages is too small, grow it... */
337         if (fw_priv->page_array_size < pages_needed) {
338                 int new_array_size = max(pages_needed,
339                                          fw_priv->page_array_size * 2);
340                 struct page **new_pages;
341
342                 new_pages = kmalloc(new_array_size * sizeof(void *),
343                                     GFP_KERNEL);
344                 if (!new_pages) {
345                         fw_load_abort(fw_priv);
346                         return -ENOMEM;
347                 }
348                 memcpy(new_pages, fw_priv->pages,
349                        fw_priv->page_array_size * sizeof(void *));
350                 memset(&new_pages[fw_priv->page_array_size], 0, sizeof(void *) *
351                        (new_array_size - fw_priv->page_array_size));
352                 kfree(fw_priv->pages);
353                 fw_priv->pages = new_pages;
354                 fw_priv->page_array_size = new_array_size;
355         }
356
357         while (fw_priv->nr_pages < pages_needed) {
358                 fw_priv->pages[fw_priv->nr_pages] =
359                         alloc_page(GFP_KERNEL | __GFP_HIGHMEM);
360
361                 if (!fw_priv->pages[fw_priv->nr_pages]) {
362                         fw_load_abort(fw_priv);
363                         return -ENOMEM;
364                 }
365                 fw_priv->nr_pages++;
366         }
367         return 0;
368 }
369
370 /**
371  * firmware_data_write - write method for firmware
372  * @filp: open sysfs file
373  * @kobj: kobject for the device
374  * @bin_attr: bin_attr structure
375  * @buffer: buffer being written
376  * @offset: buffer offset for write in total data store area
377  * @count: buffer size
378  *
379  *      Data written to the 'data' attribute will be later handed to
380  *      the driver as a firmware image.
381  **/
382 static ssize_t firmware_data_write(struct file *filp, struct kobject *kobj,
383                                    struct bin_attribute *bin_attr,
384                                    char *buffer, loff_t offset, size_t count)
385 {
386         struct device *dev = to_dev(kobj);
387         struct firmware_priv *fw_priv = to_firmware_priv(dev);
388         struct firmware *fw;
389         ssize_t retval;
390
391         if (!capable(CAP_SYS_RAWIO))
392                 return -EPERM;
393
394         mutex_lock(&fw_lock);
395         fw = fw_priv->fw;
396         if (!fw || test_bit(FW_STATUS_DONE, &fw_priv->status)) {
397                 retval = -ENODEV;
398                 goto out;
399         }
400         retval = fw_realloc_buffer(fw_priv, offset + count);
401         if (retval)
402                 goto out;
403
404         retval = count;
405
406         while (count) {
407                 void *page_data;
408                 int page_nr = offset >> PAGE_SHIFT;
409                 int page_ofs = offset & (PAGE_SIZE - 1);
410                 int page_cnt = min_t(size_t, PAGE_SIZE - page_ofs, count);
411
412                 page_data = kmap(fw_priv->pages[page_nr]);
413
414                 memcpy(page_data + page_ofs, buffer, page_cnt);
415
416                 kunmap(fw_priv->pages[page_nr]);
417                 buffer += page_cnt;
418                 offset += page_cnt;
419                 count -= page_cnt;
420         }
421
422         fw->size = max_t(size_t, offset, fw->size);
423 out:
424         mutex_unlock(&fw_lock);
425         return retval;
426 }
427
428 static struct bin_attribute firmware_attr_data = {
429         .attr = { .name = "data", .mode = 0644 },
430         .size = 0,
431         .read = firmware_data_read,
432         .write = firmware_data_write,
433 };
434
435 static void firmware_class_timeout(u_long data)
436 {
437         struct firmware_priv *fw_priv = (struct firmware_priv *) data;
438
439         fw_load_abort(fw_priv);
440 }
441
442 static struct firmware_priv *
443 fw_create_instance(const struct firmware *firmware, const char *fw_name,
444                    struct device *device, bool uevent, bool nowait)
445 {
446         struct firmware_priv *fw_priv;
447         struct device *f_dev;
448         int error;
449
450         fw_priv = kzalloc(sizeof(*fw_priv) + strlen(fw_name) + 1 , GFP_KERNEL);
451         if (!fw_priv) {
452                 dev_err(device, "%s: kmalloc failed\n", __func__);
453                 error = -ENOMEM;
454                 goto err_out;
455         }
456
457         fw_priv->fw = (struct firmware *)firmware;
458         fw_priv->nowait = nowait;
459         strcpy(fw_priv->fw_id, fw_name);
460         init_completion(&fw_priv->completion);
461         setup_timer(&fw_priv->timeout,
462                     firmware_class_timeout, (u_long) fw_priv);
463
464         f_dev = &fw_priv->dev;
465
466         device_initialize(f_dev);
467         dev_set_name(f_dev, "%s", dev_name(device));
468         f_dev->parent = device;
469         f_dev->class = &firmware_class;
470
471         dev_set_uevent_suppress(f_dev, true);
472
473         /* Need to pin this module until class device is destroyed */
474         __module_get(THIS_MODULE);
475
476         error = device_add(f_dev);
477         if (error) {
478                 dev_err(device, "%s: device_register failed\n", __func__);
479                 goto err_put_dev;
480         }
481
482         error = device_create_bin_file(f_dev, &firmware_attr_data);
483         if (error) {
484                 dev_err(device, "%s: sysfs_create_bin_file failed\n", __func__);
485                 goto err_del_dev;
486         }
487
488         error = device_create_file(f_dev, &dev_attr_loading);
489         if (error) {
490                 dev_err(device, "%s: device_create_file failed\n", __func__);
491                 goto err_del_bin_attr;
492         }
493
494         if (uevent)
495                 dev_set_uevent_suppress(f_dev, false);
496
497         return fw_priv;
498
499 err_del_bin_attr:
500         device_remove_bin_file(f_dev, &firmware_attr_data);
501 err_del_dev:
502         device_del(f_dev);
503 err_put_dev:
504         put_device(f_dev);
505 err_out:
506         return ERR_PTR(error);
507 }
508
509 static void fw_destroy_instance(struct firmware_priv *fw_priv)
510 {
511         struct device *f_dev = &fw_priv->dev;
512
513         device_remove_file(f_dev, &dev_attr_loading);
514         device_remove_bin_file(f_dev, &firmware_attr_data);
515         device_unregister(f_dev);
516 }
517
518 static int _request_firmware_prepare(const struct firmware **firmware_p,
519                                      const char *name, struct device *device)
520 {
521         struct firmware *firmware;
522
523         if (!firmware_p)
524                 return -EINVAL;
525
526         *firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL);
527         if (!firmware) {
528                 dev_err(device, "%s: kmalloc(struct firmware) failed\n",
529                         __func__);
530                 return -ENOMEM;
531         }
532
533         if (fw_get_builtin_firmware(firmware, name)) {
534                 dev_dbg(device, "firmware: using built-in firmware %s\n", name);
535                 return 0;
536         }
537
538         return 1;
539 }
540
541 static void _request_firmware_cleanup(const struct firmware **firmware_p)
542 {
543         release_firmware(*firmware_p);
544         *firmware_p = NULL;
545 }
546
547 static int _request_firmware(const struct firmware *firmware,
548                              const char *name, struct device *device,
549                              bool uevent, bool nowait, long timeout)
550 {
551         struct firmware_priv *fw_priv;
552         int retval = 0;
553
554         if (uevent)
555                 dev_dbg(device, "firmware: requesting %s\n", name);
556
557         fw_priv = fw_create_instance(firmware, name, device, uevent, nowait);
558         if (IS_ERR(fw_priv))
559                 return PTR_ERR(fw_priv);
560
561         if (uevent) {
562                 if (timeout != MAX_SCHEDULE_TIMEOUT)
563                         mod_timer(&fw_priv->timeout,
564                                   round_jiffies_up(jiffies + timeout));
565
566                 kobject_uevent(&fw_priv->dev.kobj, KOBJ_ADD);
567         }
568
569         wait_for_completion(&fw_priv->completion);
570
571         set_bit(FW_STATUS_DONE, &fw_priv->status);
572         del_timer_sync(&fw_priv->timeout);
573
574         mutex_lock(&fw_lock);
575         if (!fw_priv->fw->size || test_bit(FW_STATUS_ABORT, &fw_priv->status))
576                 retval = -ENOENT;
577         fw_priv->fw = NULL;
578         mutex_unlock(&fw_lock);
579
580         fw_destroy_instance(fw_priv);
581         return retval;
582 }
583
584 /**
585  * request_firmware: - send firmware request and wait for it
586  * @firmware_p: pointer to firmware image
587  * @name: name of firmware file
588  * @device: device for which firmware is being loaded
589  *
590  *      @firmware_p will be used to return a firmware image by the name
591  *      of @name for device @device.
592  *
593  *      Should be called from user context where sleeping is allowed.
594  *
595  *      @name will be used as $FIRMWARE in the uevent environment and
596  *      should be distinctive enough not to be confused with any other
597  *      firmware image for this or any other device.
598  **/
599 int
600 request_firmware(const struct firmware **firmware_p, const char *name,
601                  struct device *device)
602 {
603         int ret;
604
605         ret = _request_firmware_prepare(firmware_p, name, device);
606         if (ret <= 0)
607                 return ret;
608
609         ret = usermodehelper_read_trylock();
610         if (WARN_ON(ret)) {
611                 dev_err(device, "firmware: %s will not be loaded\n", name);
612         } else {
613                 ret = _request_firmware(*firmware_p, name, device, true, false,
614                                         firmware_loading_timeout());
615                 usermodehelper_read_unlock();
616         }
617         if (ret)
618                 _request_firmware_cleanup(firmware_p);
619
620         return ret;
621 }
622
623 /**
624  * release_firmware: - release the resource associated with a firmware image
625  * @fw: firmware resource to release
626  **/
627 void release_firmware(const struct firmware *fw)
628 {
629         if (fw) {
630                 if (!fw_is_builtin_firmware(fw))
631                         firmware_free_data(fw);
632                 kfree(fw);
633         }
634 }
635
636 /* Async support */
637 struct firmware_work {
638         struct work_struct work;
639         struct module *module;
640         const char *name;
641         struct device *device;
642         void *context;
643         void (*cont)(const struct firmware *fw, void *context);
644         bool uevent;
645 };
646
647 static int request_firmware_work_func(void *arg)
648 {
649         struct firmware_work *fw_work = arg;
650         const struct firmware *fw;
651         long timeout;
652         int ret;
653
654         if (!arg) {
655                 WARN_ON(1);
656                 return 0;
657         }
658
659         ret = _request_firmware_prepare(&fw, fw_work->name, fw_work->device);
660         if (ret <= 0)
661                 goto out;
662
663         timeout = usermodehelper_read_lock_wait(firmware_loading_timeout());
664         if (timeout) {
665                 ret = _request_firmware(fw, fw_work->name, fw_work->device,
666                                         fw_work->uevent, true, timeout);
667                 usermodehelper_read_unlock();
668         } else {
669                 dev_dbg(fw_work->device, "firmware: %s loading timed out\n",
670                         fw_work->name);
671                 ret = -EAGAIN;
672         }
673         if (ret)
674                 _request_firmware_cleanup(&fw);
675
676  out:
677         fw_work->cont(fw, fw_work->context);
678
679         module_put(fw_work->module);
680         kfree(fw_work);
681
682         return ret;
683 }
684
685 /**
686  * request_firmware_nowait - asynchronous version of request_firmware
687  * @module: module requesting the firmware
688  * @uevent: sends uevent to copy the firmware image if this flag
689  *      is non-zero else the firmware copy must be done manually.
690  * @name: name of firmware file
691  * @device: device for which firmware is being loaded
692  * @gfp: allocation flags
693  * @context: will be passed over to @cont, and
694  *      @fw may be %NULL if firmware request fails.
695  * @cont: function will be called asynchronously when the firmware
696  *      request is over.
697  *
698  *      Asynchronous variant of request_firmware() for user contexts where
699  *      it is not possible to sleep for long time. It can't be called
700  *      in atomic contexts.
701  **/
702 int
703 request_firmware_nowait(
704         struct module *module, bool uevent,
705         const char *name, struct device *device, gfp_t gfp, void *context,
706         void (*cont)(const struct firmware *fw, void *context))
707 {
708         struct task_struct *task;
709         struct firmware_work *fw_work;
710
711         fw_work = kzalloc(sizeof (struct firmware_work), gfp);
712         if (!fw_work)
713                 return -ENOMEM;
714
715         fw_work->module = module;
716         fw_work->name = name;
717         fw_work->device = device;
718         fw_work->context = context;
719         fw_work->cont = cont;
720         fw_work->uevent = uevent;
721
722         if (!try_module_get(module)) {
723                 kfree(fw_work);
724                 return -EFAULT;
725         }
726
727         task = kthread_run(request_firmware_work_func, fw_work,
728                             "firmware/%s", name);
729         if (IS_ERR(task)) {
730                 fw_work->cont(NULL, fw_work->context);
731                 module_put(fw_work->module);
732                 kfree(fw_work);
733                 return PTR_ERR(task);
734         }
735
736         return 0;
737 }
738
739 static int __init firmware_class_init(void)
740 {
741         return class_register(&firmware_class);
742 }
743
744 static void __exit firmware_class_exit(void)
745 {
746         class_unregister(&firmware_class);
747 }
748
749 fs_initcall(firmware_class_init);
750 module_exit(firmware_class_exit);
751
752 EXPORT_SYMBOL(release_firmware);
753 EXPORT_SYMBOL(request_firmware);
754 EXPORT_SYMBOL(request_firmware_nowait);