<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/firmware_class.c, branch v3.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-08-24T22:55:30Z</updated>
<entry>
<title>firmware loader: allow builtin firmware load even if usermodehelper is disabled</title>
<updated>2011-08-24T22:55:30Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-08-24T22:55:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=caca9510ff4e5d842c0589110243d60927836222'/>
<id>urn:sha1:caca9510ff4e5d842c0589110243d60927836222</id>
<content type='text'>
In commit a144c6a6c924 ("PM: Print a warning if firmware is requested
when tasks are frozen") we not only printed a warning if somebody tried
to load the firmware when tasks are frozen - we also failed the load.

But that check was done before the check for built-in firmware, and then
when we disallowed usermode helpers during bootup (commit 288d5abec831:
"Boot up with usermodehelper disabled"), that actually means that
built-in modules can no longer load their firmware even if the firmware
is built in too.  Which used to work, and some people depended on it for
the R100 driver.

So move the test for usermodehelper_is_disabled() down, to after
checking the built-in firmware.

This should fix:

	https://bugzilla.kernel.org/show_bug.cgi?id=40952

Reported-by: James Cloos &lt;cloos@hjcloos.com&gt;
Bisected-by: Elimar Riesebieter &lt;riesebie@lxtec.de&gt;
Cc: Michel Dänzer &lt;michel@daenzer.net&gt;
Cc: Rafael Wysocki &lt;rjw@sisk.pl&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Cc: Valdis Kletnieks &lt;valdis.kletnieks@vt.edu&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>PM: Print a warning if firmware is requested when tasks are frozen</title>
<updated>2011-05-17T21:19:17Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-05-06T18:09:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a144c6a6c924aa1da04dd77fb84b89927354fdff'/>
<id>urn:sha1:a144c6a6c924aa1da04dd77fb84b89927354fdff</id>
<content type='text'>
Some drivers erroneously use request_firmware() from their -&gt;resume()
(or -&gt;thaw(), or -&gt;restore()) callbacks, which is not going to work
unless the firmware has been built in.  This causes system resume to
stall until the firmware-loading timeout expires, which makes users
think that the resume has failed and reboot their machines
unnecessarily.  For this reason, make _request_firmware() print a
warning and return immediately with error code if it has been called
when tasks are frozen and it's impossible to start any new usermode
helpers.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Reviewed-by: Valdis Kletnieks &lt;valdis.kletnieks@vt.edu&gt;
</content>
</entry>
<entry>
<title>firmware_classs: change val uevent's type to bool</title>
<updated>2011-02-03T23:39:17Z</updated>
<author>
<name>Bob Liu</name>
<email>lliubbo@gmail.com</email>
</author>
<published>2011-01-26T10:33:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=072fc8f0a8df9bf36392f15b729044cb2ad27332'/>
<id>urn:sha1:072fc8f0a8df9bf36392f15b729044cb2ad27332</id>
<content type='text'>
Some place in firmware_class.c using "int uevent" define, but others use "bool
uevent".
This patch replace all int uevent define to bool.

Signed-off-by: Bob Liu &lt;lliubbo@gmail.com&gt;
Acked-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>firmware_class: fix typo in error path</title>
<updated>2010-08-24T01:12:46Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2010-08-18T15:15:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f45f3c1f3f616ca1d1e1eb5e7a720ca63cb59550'/>
<id>urn:sha1:f45f3c1f3f616ca1d1e1eb5e7a720ca63cb59550</id>
<content type='text'>
In the error path, _request_firmware sets
firmware_p to NULL rather than *firmware_p,
which leads to passing a freed firmware
struct to drivers when the firmware file
cannot be found. Fix this.

Broken by commit f8a4bd3456b988fc73b2c.

Reported-by: Wey-Yi Guy &lt;wey-yi.w.guy@intel.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Pekka Enberg &lt;penberg@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>firmware loader: embed device into firmware_priv structure</title>
<updated>2010-08-05T20:53:34Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2010-06-04T07:54:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f8a4bd3456b988fc73b2c291b9e01b434c8fa940'/>
<id>urn:sha1:f8a4bd3456b988fc73b2c291b9e01b434c8fa940</id>
<content type='text'>
Both these structures have the same lifetime rules so instead of allocating
and managing them separately embed struct device into struct firmware_priv.
Also make sure to delete sysfs attributes ourselves instead of expecting
sysfs to clean up our mess.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>firmware loader: use statically initialized data attribute</title>
<updated>2010-08-05T20:53:34Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2010-06-04T07:54:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0983ca2d0f0ff645bc86899aefb936cffb314839'/>
<id>urn:sha1:0983ca2d0f0ff645bc86899aefb936cffb314839</id>
<content type='text'>
There is no reason why we are using a template for binary attribute
and copying it into per-firmware data before registering. Using the
original works as well.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>sysfs: add struct file* to bin_attr callbacks</title>
<updated>2010-05-21T16:37:31Z</updated>
<author>
<name>Chris Wright</name>
<email>chrisw@sous-sol.org</email>
</author>
<published>2010-05-13T01:28:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2c3c8bea608866d8bd9dcf92657d57fdcac011c5'/>
<id>urn:sha1:2c3c8bea608866d8bd9dcf92657d57fdcac011c5</id>
<content type='text'>
This allows bin_attr-&gt;read,write,mmap callbacks to check file specific data
(such as inode owner) as part of any privilege validation.

Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>firmware loader: do not allocate firmare id separately</title>
<updated>2010-05-21T16:37:30Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2010-03-14T07:49:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e177123f0c2d77ed2fde724ca352166ca9464619'/>
<id>urn:sha1:e177123f0c2d77ed2fde724ca352166ca9464619</id>
<content type='text'>
fw_id has the same life time as firmware_priv so it makes sense to move
it into firmware_priv structure instead of allocating separately.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>firmware loader: split out builtin firmware handling</title>
<updated>2010-05-21T16:37:30Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2010-03-14T07:49:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bcb9bd18e397eabe14b45f4dc4283359ab148d79'/>
<id>urn:sha1:bcb9bd18e397eabe14b45f4dc4283359ab148d79</id>
<content type='text'>
Split builtin firmware handling into separate functions to clean up the
main body of code.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>firmware loader: rely on driver core to create class attribute</title>
<updated>2010-05-21T16:37:30Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2010-03-14T07:49:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=673fae90d5ee4ae2b6403f9d45af7ff640f06a60'/>
<id>urn:sha1:673fae90d5ee4ae2b6403f9d45af7ff640f06a60</id>
<content type='text'>
Do not create 'timeout' attribute manually, let driver core do it for us.
This also ensures that attribute is cleaned up properly.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
