On Fri, May 12, 2006, Trent Piepho wrote: > On Fri, 12 May 2006, Johannes Stezenbach wrote: > > Looks like I didn't get something... > > > > What is a "chained frontend"? How is this handled currently > > First, let me say that chained frontends *isn't* something new that is > mixed in with this attach/detach stuff. It's already there. See the > lnbp21 driver for an example. OK, got it. We used to call this "override", av7110.c even has a FE_FUNC_OVERRIDE macro... > Here is where Andrew first mentions the problem with chaining: > http://article.gmane.org/gmane.linux.drivers.dvb/25599 > > Here is a bit more info: > http://article.gmane.org/gmane.linux.drivers.dvb/25662 > http://article.gmane.org/gmane.linux.drivers.dvb/25701 > > See that last message for an example for how chaining can be made to work > with or without dvb_attach() for same frontend. > > > without dvb_attach()? Why does it need to be handled > > differently with dvb_attach()? > > See those messages I linked to for a better discussion, but in a nutshell, > the function pointers in fe->ops can be changed to point to a module other > than the original dvb_attach()ed frontend. symbol_put_addr() would put > this new module that has chained itself in front of the original FE > module, and not the orignal FE module. > > > > (*) This assumes, currently correctly, that foo_attach() and foo_release() are > > > in the same module > > > > why? dvb_attach() incs the frontend module ref count, dvb_detach() > > decs it -- no matter where they are called from > > I mean that the frontend_attach() and frontend_release() functions must be > in the same module. dvb_attach(FEfoo_attach,...) incs the ref count of the > module that FEfoo_attach() is in. If fe->obs->release points to > FEfoo_release(), then symbol_put_addr(fe->obs->release) would put the > module that FEfoo_release() is in. If there was a frontend driver that was > made of multiple modules, those two functions might not be in the same > module. Thanks, I now see what the problem is. However, I still don't see why you think it needs to be solved by changing all frontend drivers. It is the PCI/USB card driver which does the overrides, certainly one can save the original FE pointer there before doing the override? But it's late, I need to look a bit more at the code, probably I still didn't get it completely. Johannes _______________________________________________ linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb