[asterisk-users] zaptel 1.2.22.1 on kernel 2.6.22: wctdm24xxp.ko needs unknown symbol pci_module_init

Tzafrir Cohen tzafrir.cohen at xorcom.com
Wed Jan 2 05:32:00 CST 2008


On Wed, Jan 02, 2008 at 02:19:08AM -0800, Vieri wrote:
> 
> --- Stefan Guenther <asterisk01 at in-put.de> wrote:
> 
> > Hi,
> > 
> > > 
> > > The only module that seems to require the
> > deprecated
> > > function pci_module_init is wctdm24xxp.
> > > 
> > I had the same problem, when I tried to compile the
> > driver for an 
> > EICON/DIALOGIC card.
> > I'm not a kernel expert, but with a number of other
> > postings I found 
> > out, that with kernel version 2.6.22 that following
> > had changed:
> > 
> > Instead of "pci_module_init" the driver has to use 
> > "pci_register_driver". Kernel 2.6.22 obviously
> > doesn't use 
> > "pci_module_init" anymore.
> > Well I suggest you either use kernel version 2.6.20
> > or you replace 
> > "pci_module_init" with  "pci_register_driver" in
> > wctdm24xxp.
> 
> Thanks but I "suppose" that it's zaptel.h's job to do
> that, ie.:
> File: zaptel.h
> 
> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
> #define zap_pci_module pci_register_driver
> #else
> #define zap_pci_module pci_module_init
> #endif
> 
> and all C files seem to call it right:
> 
> ./pciradio.c:   res =
> zap_pci_module(&pciradio_driver);
> ./tor2.c:       res = zap_pci_module(&tor2_driver);
> ./wcfxo.c:      res = zap_pci_module(&wcfxo_driver);
> ./wct1xxp.c:    res = zap_pci_module(&t1xxp_driver);
> ./wct4xxp/base.c:       res =
> zap_pci_module(&t4_driver);
> ./wctc4xxp/base.c:      res =
> zap_pci_module(&wcdte_driver);
> ./wctdm.c:      res = zap_pci_module(&wctdm_driver);
> ./wctdm24xxp/base.c:    res =
> zap_pci_module(&wctdm_driver);
> ./wcte11xp.c:   res = zap_pci_module(&t1xxp_driver);
> ./wcte12xp.c:   res = zap_pci_module(&te12xp_driver);
> 
> So at compile time, something screws up ("if"
> conditional in zaptel.h?) and wctdm24xxp.ko calls
> pci_module_init instead of pci_register_driver.
> 
> Looks like a bug in the zaptel build/make process.

Fine. So let's trace it.

(that said, I'd appreciate it if someone more familiar with the driver
would step in. I might be doing something silly)

As I cannot replicate it here, I'd like to ask you to add the following
lines to wctm24xxp/base.c right before the call to zap_pci_module():

#warning version KERNEL_VERSION.
#warning will now call function zap_pci_module().

re-run 'make' and report here what warnings you got.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list