Skip to contentSkip to conversation

DVB USB device firmware requested in module_init()

Bug 827538 Antti Palosaari 3 participants 9 messages Jun 1, 2012 – Jun 4, 2012 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

-------- Original Message --------
Subject: [Bug 827538] DVB USB device firmware requested in module_init()
Date: Fri, 01 Jun 2012 19:44:17 +0000
From: [email protected]
To: [email protected]

https://bugzilla.redhat.com/show_bug.cgi?id=827538

Kay Sievers <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |[email protected],
                   |                            |[email protected],
                   |                            |[email protected],
                   |                            |[email protected]
          Component|udev                        |kernel
           Assignee|[email protected]       |[email protected]
            Summary|DVB USB device firmware     |DVB USB device firmware
                   |downloading takes 30        |requested in module_init()
                   |seconds                     |

--- Comment #1 from Kay Sievers <[email protected]> --- This is very likely a kernel driver issue.

Drivers must not load firmware in the module_init() path, or device probe()/bind() path. This creates a deadlock in the event handling.

We used to silently try to work around that, but recently started to log this error explicitely.

The firmware should in general be requested asynchronously, or at the first open() of the device.

Details are here:
http://thread.gmane.org/gmane.linux.network/217729

Signature · 2 lines
You are receiving this mail because:
You reported the bug.
#2 lore raw
Quoted 31 lines · Antti Palosaari

-------- Original Message --------
Subject: [Bug 827538] DVB USB device firmware requested in module_init()
Date: Fri, 01 Jun 2012 19:44:17 +0000
From: [email protected]
To: [email protected]

https://bugzilla.redhat.com/show_bug.cgi?id=827538

Kay Sievers <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

CC| |[email protected],
| |[email protected],
| |[email protected],
| |[email protected]
Component|udev |kernel
Assignee|[email protected] |[email protected]
Summary|DVB USB device firmware |DVB USB device firmware
|downloading takes 30 |requested in module_init()
|seconds |

--- Comment #1 from Kay Sievers <[email protected]> --- This is very likely a kernel driver issue.

Drivers must not load firmware in the module_init() path, or device probe()/bind() path. This creates a deadlock in the event handling.

Quoted 9 lines

We used to silently try to work around that, but recently started to log this error explicitely.

The firmware should in general be requested asynchronously, or at the first open() of the device.

Details are here:
http://thread.gmane.org/gmane.linux.network/217729

I suspect all of our DVB USB firmere downloading problems are coming from that issues. I mean especially those suspend / resume failings too.

What I think I will try to delay driver registertration using workqueue. Return just success for the USB driver probe and continue real probe from workqueue.

Antti

Signature · 1 line
http://palosaari.fi/
#3 lore raw
Quoted 44 lines · Antti Palosaari
Quoted 35 lines · Antti Palosaari

-------- Original Message --------
Subject: [Bug 827538] DVB USB device firmware requested in module_init()
Date: Fri, 01 Jun 2012 19:44:17 +0000
From: [email protected]
To: [email protected]

https://bugzilla.redhat.com/show_bug.cgi?id=827538

Kay Sievers <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

CC| |[email protected],
| |[email protected],
| |[email protected],
| |[email protected]
Component|udev |kernel
Assignee|[email protected] |[email protected]
Summary|DVB USB device firmware |DVB USB device firmware
|downloading takes 30 |requested in module_init()
|seconds |

--- Comment #1 from Kay Sievers <[email protected]> --- This is very likely a kernel driver issue.

Drivers must not load firmware in the module_init() path, or device probe()/bind() path. This creates a deadlock in the event handling.

We used to silently try to work around that, but recently started to log this error explicitely.

Quoted 7 lines

The firmware should in general be requested asynchronously, or at the first
open() of the device.

Details are here:
http://thread.gmane.org/gmane.linux.network/217729

Quoted 6 lines

I suspect all of our DVB USB firmere downloading problems are coming from that issues. I mean especially those suspend / resume failings too.

What I think I will try to delay driver registertration using workqueue. Return just success for the USB driver probe and continue real probe from workqueue.

That solves DVB USB firmware loading problems. I wonder why that udev requirement not to block module init was not informed for linux-media... Now it is much work to look thru all drivers and check those did not load firmware on attach or init.

regards
Antti

Signature · 1 line
http://palosaari.fi/
#4 lore raw
Quoted 2 lines · Antti Palosaari

That solves DVB USB firmware loading problems.

As in you have a patch that works or it's just solved "in theory". If you have a patch I'd love to apply it here and get this machine suspendable again.

Cheers,
b.

#5 lore raw
Quoted 7 lines · Brian J. Murrell
Quoted 2 lines · Antti Palosaari

That solves DVB USB firmware loading problems.

As in you have a patch that works or it's just solved "in theory". If you have a patch I'd love to apply it here and get this machine suspendable again.

I have patch which works but is as a proof-of-concept stage. I am just finalizing it. I will inform when it is ready, likely later tonight (as I would like to really see it fixes that suspend/resume problem as I am not able to reproduce it for some reason).

regards
Antit

Signature · 1 line
http://palosaari.fi/
#6 lore raw
Quoted 5 lines · Antti Palosaari
Quoted 4 lines · Brian J. Murrell
Quoted 2 lines · Antti Palosaari

That solves DVB USB firmware loading problems.

Quoted 8 lines
Quoted 3 lines

As in you have a patch that works or it's just solved "in theory". If you have a patch I'd love to apply it here and get this machine suspendable again.

I have patch which works but is as a proof-of-concept stage. I am just finalizing it. I will inform when it is ready, likely later tonight (as I would like to really see it fixes that suspend/resume problem as I am not able to reproduce it for some reason).

That firmware downloading patch is done top of my new dvb-usb development tree. I have converted very limited set of drivers for that tree, af9015, au6610, ec168 and anysee (and those are only on my local hard disk). I tried to backport patch for the current dvb-usb but I ran many problems and gave up. Looks like it is almost impossible to convert old dvb-usb without big changes...

So what driver you are using? It is possible I can convert your driver too and then it is possible to test.

Patch in question can be found from that tree:
http://git.linuxtv.org/anttip/media_tree.git/shortlog/refs/heads/dvb-usb

regards
Antti

Signature · 1 line
http://palosaari.fi/
#7 lore raw
Quoted 9 lines · Antti Palosaari

That firmware downloading patch is done top of my new dvb-usb development tree. I have converted very limited set of drivers for that tree, af9015, au6610, ec168 and anysee (and those are only on my local hard disk). I tried to backport patch for the current dvb-usb but I ran many problems and gave up. Looks like it is almost impossible to convert old dvb-usb without big changes...

So what driver you are using?

I'm using the hvr-950q per
https://bugzilla.kernel.org/show_bug.cgi?id=43145 and
https://bugzilla.kernel.org/show_bug.cgi?id=43146.

Quoted 2 lines

It is possible I can convert your driver
too and then it is possible to test.

Great. Ideally it would be great to get this backported and applied to the linux 3.2.0 release stream.

Cheers,
b.

#8 lore raw
Quoted 15 lines · Brian J. Murrell
Quoted 9 lines · Antti Palosaari

That firmware downloading patch is done top of my new dvb-usb development tree. I have converted very limited set of drivers for that tree, af9015, au6610, ec168 and anysee (and those are only on my local hard disk). I tried to backport patch for the current dvb-usb but I ran many problems and gave up. Looks like it is almost impossible to convert old dvb-usb without big changes...

So what driver you are using?

I'm using the hvr-950q per
https://bugzilla.kernel.org/show_bug.cgi?id=43145 and
https://bugzilla.kernel.org/show_bug.cgi?id=43146.

Quoted 5 lines
Quoted 2 lines

It is possible I can convert your driver
too and then it is possible to test.

Great.  Ideally it would be great to get this backported and applied to the linux 3.2.0 release stream.

The 950q doesn't use the dvb-usb framework (nor does it load the firmware at init). Whatever is going on there is completely unrelated to what Antti is debugging.

Devin

Signature · 2 lines
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
#9 lore raw
Quoted 4 lines · Devin Heitmueller

The 950q doesn't use the dvb-usb framework (nor does it load the firmware at init). Whatever is going on there is completely unrelated to what Antti is debugging.

Ahhh. Pity. I was almost giddy there for a second. :-/

Cheers,
b.