Re: Unable to remove stv0299

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 8 Aug 2006, Andrew de Quincey wrote:
> On Tuesday 08 August 2006 03:26, Oliver Endriss wrote:
> > Stone wrote:
> > > After updating the v4l-dvb tree yesterday, I am unable to unload the
> > > stv0299 module after loading it.
> > >
> > > ERROR: Module stv0299 is in use
> > > ERROR: Module dvb_core is in use by stv0299
> > >
> > > This is what it looks like when the dvb modules are loaded:
> > >
> > > Module                  Size  Used by
> > > ves1x93                 7172  0
> > > dvb_ttpci             107780  17
> > > saa7146_vv             51456  1 dvb_ttpci
> > > video_buf              25028  1 saa7146_vv
> > > saa7146                18312  2 dvb_ttpci,saa7146_vv
> > > videodev               26560  1 saa7146_vv
> > > v4l1_compat            14212  2 saa7146_vv,videodev
> > > v4l2_common            22912  2 saa7146_vv,videodev
> > > ttpci_eeprom            2432  1 dvb_ttpci
> > > stv0299                11272  1
> > > dvb_core               85608  2 dvb_ttpci,stv0299
> > > crc32                   4288  2 dvb_ttpci,dvb_core

With dvb_attach(), the 'Used by' column doesn't show the user.  In this
case, dvb_ttpci is the module that calls dvb_attach() on stv0299 and so you
need to unload dvb_ttpci first.  Of course, now you must figure out what is
using dvb_ttpci...

This is no different than if you weren't using dvb_attach, except then
'Used by' would list dvb_ttpci instead of just saying 1.

> > I can confirm this bug with CONFIG_DVB_CORE_ATTACH=y and kernel 2.6.17.
> >
> > @Andrew:
> > Imho the problem is that
> > - dvb_attach calls symbol_request(fe_attach)
> > - dvb_detach calls symbol_put_addr(fe_release)
> > i.e. two different symbols are used...
> >
> > What do you think?
>
> Crap, looks like something got lost in that /LONG/ discussion, because thats
> never going to work is it?

I remember I brought this up.  It's ok as long as the attach and release
functions are in the same module, as the kernel only does module level
refcounting, not symbol level ref couting.  Look at the thread from this
post to see what discussion there was on it:

http://thread.gmane.org/gmane.linux.drivers.dvb/25229/focus=25599

_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux