[Asterisk-bsd] wcfxs does not probe my TDM11B

Staffan Ulfberg staffan at ulfberg.se
Thu Feb 17 19:31:38 CST 2005


Jeff Rizzo <riz+asterisk at boogers.sf.ca.us> writes:

> This sounds like an issue I ran across with one of my boards when
> porting the wcfxs driver to NetBSD.  Based on what I saw, I think some
> of the TDM boards have a problem where they don't return a consistent
> PCI subvendor ID.  You can force the wcfxs driver to match it by editing
> wcfxs.c and adding a line to the wcfxs_ident with a subvendor ID of -1
> (I've attached a patch below).  The reason this isn't on by default is
> because it makes the wcfxs driver wrongly match some wcfxo boards.
>
> Here's the patch - you should be able to apply it by hand if it doesn't
> apply cleanly.
>
> [snip]
>
> +     { 0xe159, 0x0001, -1,           &wcfxsh },
> [...]

I did try your patch, even if I have to admit I didn't really believe
in it.  The reason is that it seems wcfxs_probe() isn't called at all
in my system.  I added a printf like the following:

static int
wcfxs_probe(device_t dev)
{
        uint16_t                                vid;
        uint16_t                                devid;
        uint16_t                                svid;
        struct wcfxs_ident              *ident;

        vid             = pci_get_vendor(dev);
        devid   = pci_get_device(dev);
        svid    = pci_get_subvendor(dev);

        printf("wcfxs_probe called\n");


And, there's nothing in my dmesg:(

Since I didn't see anything from the module, I also added the printf
below:

        switch (cmd) {
                case MOD_LOAD:
                  printf("Loading wcfxs\n");
                err = driver_module_handler(mod, cmd, arg);
                  printf("driver_module_handler: err=%d\n", err);
                        if(!err)
                                wcfxs_sysctl_init();
                break;

The "Loading wcfxs" message appears, as expected, in my dmesg.  (And,
the wcfxs is called, since the "zaptel.wcfxs.debug" appears after
loading the module.)

It would seem there's a higher level problem showing itself.

How would I start to debug this?  (I do not have any FreeBSD kernel
hacking experience, but I do know userland FreeBSD and C programming
quite well, so I believe I could track this down if someone could give
me a start.)

Staffan


More information about the Asterisk-BSD mailing list