All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Dave Jones <davej@redhat.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Chaoming Li <chaoming_li@realsil.com.cn>,
	"John W. Linville" <linville@tuxdriver.com>,
	Matthew Garrett <mjg@redhat.com>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	USB list <linux-usb@vger.kernel.org>,
	Linux Wireless List <linux-wireless@vger.kernel.org>
Subject: Re: loading firmware while usermodehelper disabled.
Date: Sat, 31 Dec 2011 21:49:10 -0600	[thread overview]
Message-ID: <4EFFD7B6.407@lwfinger.net> (raw)
In-Reply-To: <CA+55aFyqm4FbW=--7U4ULk1EBb6RLP0sRgtokODBYnZNiJXWew@mail.gmail.com>

On 12/30/2011 06:22 PM, Linus Torvalds wrote:
> On Fri, Dec 30, 2011 at 3:54 PM, Dave Jones<davej@redhat.com>  wrote:
>> We're getting a bunch of reports against Fedora 16
>> (still using 3.1) which look like some drivers are trying to
>> load firmware on resume from suspend, while usermodehelper
>> is disabled.
>
> Ok, buggy drivers. You *must*not* load firmware in your resume path,
> since there is no actual guarantee that any particular device will be
> resumed after the disk that contains the firmware images.
>
> So it's very simple: drivers that load firmware at resume time are
> buggy. No ifs, buts, or maybes about it.
>
>> Here are some example traces:
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=746411
>
> It's isight_firmware_load(), in the isight_firmware driver. The driver
> doesn't actually do anything but load the firmware, and is apparently
> not very good at that either.
>
> It should either fake a disconnect and reconnect of the device (and
> let the reconnect then load the firmware through udev or something) or
> it should just save the firmware image in memory from the original
> load, and make the resume just re-initialize it - not load it.
>
> It's also possible that it could be considered a USB layer bug, and
> the USB layer should just not rebind the devices directly in the
> resume function, but do it somehow later. HOWEVER, that would only
> work for "random" USB devices that aren't in use by user space (like
> disks etc might be). So I think that in general the real solution is
> always just "make sure that the firmware is in memory before the
> suspend even happens".
>
> Greg - has the USB resume logic been changed lately?
>
> Matthew? Any comments about that particular driver?
>
>> https://bugzilla.redhat.com/show_bug.cgi?id=771002
>
> Same issue, different driver. Again, it's USB, and it's possible that
> USB just makes it really hard to do this correctly (ie the "save
> firmware image across suspend so that you don't have to load it at
> resume time").
>
> It's also possible that we should blame the firmware code, which is
> expressly written to encourage these kinds of bugs. It may be that i
> tshould be the firmware code that has a "get_firmware()" +
> "put_firmware()" model, and it should cache the firmware explicitly if
> the config supports suspend, so that a firmware read at resume time
> would actually work. The whole "request_firmware()" interface really
> is very prone to these kinds of bugs.
>
> But it's possible this could be fixed at the driver level by doing the
> caching there.
>
> In this case it's the rtl8192cu driver, so Larry, Chaoming, John etc
> added to the cc for that one.

A patch that delays the firmware reading until the upload is needed when the 
interface is brought up will be sent to John very soon. My box loses its video 
when a suspend/resume cycle is done, but the WARNING is no longer printed by 
rtl8192cu.

Larry



  parent reply	other threads:[~2012-01-01  3:49 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-30 23:54 loading firmware while usermodehelper disabled Dave Jones
2011-12-31  0:22 ` Linus Torvalds
2011-12-31  0:40   ` Matthew Garrett
2011-12-31 15:33     ` Alan Stern
2011-12-31 15:59       ` Oliver Neukum
2012-01-01  2:21         ` Alan Stern
2012-01-01 12:22           ` Oliver Neukum
2012-01-01 16:17             ` Alan Stern
2012-01-01 16:25               ` Michael Büsch
2012-01-01 20:30               ` Linus Torvalds
2012-01-01 21:27                 ` Oliver Neukum
2012-01-01 21:39                   ` Michael Büsch
2012-01-02  3:33                     ` Matthew Garrett
2012-01-02  7:56                     ` Oliver Neukum
2012-01-02  4:17                 ` Marek Vasut
2012-01-02  5:35                   ` Gábor Stefanik
2012-01-02  8:38                     ` Marek Vasut
2012-01-02 16:54                 ` Alan Stern
2012-01-02 20:41                   ` Jack Stone
2012-01-02 20:48                     ` Linus Torvalds
2012-01-02 20:55                       ` Jack Stone
2012-01-02 21:00                         ` Linus Torvalds
2012-01-02 21:09                           ` Jack Stone
2012-01-02 21:23                             ` Linus Torvalds
2012-01-02 21:31                               ` Jack Stone
2012-01-02 21:52                                 ` Marek Vasut
2012-01-02 21:57                                   ` Jack Stone
2012-01-02 22:31                                     ` Marek Vasut
2012-01-02 23:25                                       ` Jack Stone
2012-01-03  0:31                                         ` Marek Vasut
2012-01-03  0:44                                           ` Jack Stone
2012-01-03  0:58                                             ` Alan Cox
2012-01-03  7:17                                               ` Marek Vasut
2012-01-03  7:41                                             ` Oliver Neukum
2012-01-03  0:35                                 ` Alan Cox
2012-01-03  0:50                           ` Alan Cox
2012-01-02 21:19                       ` Matthew Garrett
2012-01-02 21:26                         ` Jack Stone
2012-01-03  0:42                           ` Alan Cox
2012-01-03 11:57                             ` Oliver Neukum
2012-01-03 12:19                               ` Jack Stone
2012-01-03 13:20                                 ` Alan Cox
2012-01-03 13:30                                   ` Oliver Neukum
2012-01-03 13:36                                     ` Alan Cox
2012-01-02 21:27                         ` Linus Torvalds
2012-01-02 21:50                           ` Matthew Garrett
2012-01-02 22:03                             ` Linus Torvalds
2012-01-02 22:12                               ` Matthew Garrett
2012-01-02 22:19                                 ` Linus Torvalds
2012-01-02 22:29                                   ` Matthew Garrett
2012-01-02 22:46                                     ` Linus Torvalds
2012-01-02 23:00                                       ` Matthew Garrett
2012-01-02 23:31                                         ` Jack Stone
2012-01-03  0:13                                           ` Matthew Garrett
2012-01-03  0:20                                             ` Alan Cox
2012-01-03  0:37                                               ` Matthew Garrett
2012-01-03  0:22                                             ` Jack Stone
2012-01-03  0:31                                               ` Alan Cox
2012-01-03  0:41                                                 ` Jack Stone
2012-01-03  0:38                                               ` Matthew Garrett
2012-01-03  0:47                                                 ` Alan Cox
2012-01-03  0:18                                           ` Alan Cox
2012-01-03  8:26                                             ` Ingo Molnar
2012-01-03  2:45                             ` Alan Stern
2012-01-03  3:25                               ` Matthew Garrett
2012-01-03  5:53                                 ` Linus Torvalds
2012-01-03 11:50                                   ` Oliver Neukum
2012-01-03 15:16                                     ` Alan Stern
2012-01-03 12:24                                   ` Matthew Garrett
2012-01-03 16:29                                     ` Linus Torvalds
2012-01-03 15:09                                 ` Alan Stern
2012-01-03  9:16                             ` Alexander E. Patrakov
2012-01-03  9:16                               ` Alexander E. Patrakov
2012-01-03  9:24                               ` david
2012-01-03 13:43                               ` Alan Cox
2012-01-03 14:12                               ` Bernd Petrovitsch
2012-01-03  0:00                           ` Alan Cox
2012-01-02 23:50                       ` Alan Cox
2012-01-02 23:53                     ` Alan Cox
2011-12-31 16:27       ` Matthew Garrett
2011-12-31 14:20   ` Martin Schleier
2011-12-31 18:39   ` Marek Vasut
2012-01-01  9:48     ` Oliver Neukum
2012-01-01  9:54       ` Marek Vasut
2012-01-01 12:28         ` Oliver Neukum
2012-01-01 16:32           ` Marek Vasut
2012-01-01 17:06             ` Marek Vasut
2012-01-01 20:39             ` Alan Cox
2012-01-01 20:50               ` Michael Büsch
2012-01-02  3:24                 ` Marek Vasut
2012-01-02  3:29               ` Marek Vasut
2012-01-01  3:49   ` Larry Finger [this message]
2012-01-01 22:45   ` Jack Stone
  -- strict thread matches above, loose matches on Subject: below --
2011-12-31 15:01 drahemmaps
2011-12-31 19:29 ` Linus Torvalds
2011-12-31 20:15   ` Matthew Garrett
2011-12-31 20:26     ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EFFD7B6.407@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=chaoming_li@realsil.com.cn \
    --cc=davej@redhat.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mjg@redhat.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.