Johannes Stezenbach schrieb:
On Mon, Mar 13, 2006, Ole Reinartz wrote:
I'm struggling to automate the loading of saa7134-dvb for my Avermedia 777.
I'm using Jose Alberto Reguero's patch to get the 777 working, and it is
working well. However, whenever the system starts up, it detects the
card and loads the saa7134 module, but not the saa7134-dvb. After I
modprobe this module, everything is ok.
Is that working automatically at someones system? How can that be done?
Now I searched the source for a reason and found out that someone
(probably Gerd Knorr himself) added a mechanism to load the saa7134-dvb
from the saa7134 whenever that detects a dvb- card.
The saa7134-dvb is dependent on saa7134, so it cannot be loaded while
the saa7134 itself is being loaded. So the code registers a notifier to
get notified after it got 'live' (i.e. its state changed to
MODULE_STATE_LIVE) I guess. And this notifier never gets called.
Looking in module.c (of kernel 2.6.15, which is the kernel I use) I find
that in sys_init_module() the notification mechanism is called only
before the module actually gets initialised, but not after that. That
confuses me a bit. Does someone know how this is going to work? Can the
module somehow act at the time it got 'live'?
Well, I reported a bug (modprobe saa7134 deadlocked) which
lead to some discussion on lkml and finally Gerd's changes.
I suggest you look up the date of Gerd's change from the
hg or cvs history, and then search for the lkml discussion
around that time. Probably a piece of code from the module
notification stuff went missing. It would be nice to get
this fixed.
I searched in the hg history on linuxtv.org. I guess the change you are
refering to is the one introducing the use of this notification
mechanism (register_module_depend() and related). Then I searched
through the kernel versions to find out how this notification works and
how it evolved. I didn't get to the version where this got introduced,
but with all versions I saw the mechanism in saa7134-core.c can't ever
have been working:
The notifier call chain is only called once in sys_init_module() in
kernel/module.c, and only with MODULE_STATE_COMING as the notfied state.
However the function registered as notifier (pending_call() in
saa7134-core.c) only acts when MODULE_STATE_LIVE is notified, which I
found done nowhere in the kernel.
So I ask myself (and the list, of course): has this ever worked? Was
there once a notification mechanism that sent this notification?
BTW I tried sending such a notification in sys_init_module() just before
the return, after the modules lock got released. But this only produces
a deadlock while startup.So now I'm stuck. Maybe I should ask in the
kernel list?
At a loss
Ole
_______________________________________________
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb