firmware: teach the kernel to load firmware files directly from the filesystem
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Oct 2012 22:58:32 +0000 (15:58 -0700)
committerThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Mon, 25 Apr 2016 01:52:31 +0000 (01:52 +0000)
commita168da208a9533d820270f4534790619f0ee3b42
tree2942f567553a5ab5d42a358d70c0e65b098dc0fa
parent017f4dadf0d08bb957770e9cc62f977326f354e4
firmware: teach the kernel to load firmware files directly from the filesystem

This is a first step in allowing people to by-pass udev for loading
device firmware.  Current versions of udev will deadlock (causing us to
block for the 30 second timeout) under some circumstances if the
firmware is loaded as part of the module initialization path, and this
is causing problems for media drivers in particular.

The current patch hardcodes the firmware path that udev uses by default,
and will fall back to the legacy udev mode if the firmware cannot be
found there.  We'd like to add support for both configuring the paths
and the fallback behaviour, but in the meantime this hopefully fixes the
immediate problem, while also giving us a way forward.

[ v2: Some VFS layer interface cleanups suggested by Al Viro ]
[ v3: use the default udev paths suggested by Kay Sievers ]

Suggested-by: Ivan Kalvachev <ikalvachev@gmail.com>
Acked-by: Greg KH <gregkh@linuxfoundation.org>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kay Sievers <kay@redhat.com>
Cc: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/base/firmware_class.c