diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-11-15 15:29:27 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-11-15 15:29:27 +0000 |
commit | 99b0ac36f5f327f8dedd4ca8686f913cc52cc75e (patch) | |
tree | 93f1dedcfde88eec4ef61cbaccc6f2368d3d29f6 /tor2.c | |
parent | d2c19c45aae73b039c21c5a19b68fca82e7f2830 (diff) |
Version 0.3.3 from FTP
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@130 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'tor2.c')
-rwxr-xr-x | tor2.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -264,16 +264,18 @@ static void init_spans(struct tor2 *tor) tor->spans[x].maint = tor2_maint; tor->spans[x].open = tor2_open; tor->spans[x].close = tor2_close; - if (tor->cardtype == TYPE_T1) + if (tor->cardtype == TYPE_T1) { tor->spans[x].channels = 24; - else + tor->spans[x].deflaw = ZT_LAW_MULAW; + } else { tor->spans[x].channels = 31; + tor->spans[x].deflaw = ZT_LAW_ALAW; + } tor->spans[x].chans = tor->chans[x]; tor->spans[x].flags = ZT_FLAG_RBS; tor->spans[x].linecompat = ZT_CONFIG_AMI | ZT_CONFIG_B8ZS | ZT_CONFIG_D4 | ZT_CONFIG_ESF; tor->spans[x].ioctl = tor2_ioctl; tor->spans[x].pvt = &tor->tspans[x]; - tor->spans[x].deflaw = ZT_LAW_MULAW; tor->tspans[x].tor = tor; tor->tspans[x].span = x; init_waitqueue_head(&tor->spans[x].maintq); @@ -293,6 +295,8 @@ static void init_spans(struct tor2 *tor) static int __devinit tor2_launch(struct tor2 *tor) { + if (tor->spans[0].flags & ZT_FLAG_REGISTERED) + return 0; printk("tor2: Launching card: %d\n", tor->order); if (zt_register(&tor->spans[0], 0)) { printk(KERN_ERR "Unable to register span %s\n", tor->spans[0].name); @@ -516,9 +520,10 @@ static int __devinit tor2_probe(struct pci_dev *pdev, const struct pci_device_id /* Find a card to activate */ f = 0; for (x=0;cards[x];x++) { - if (cards[x]->order == highestorder) { + if (cards[x]->order <= highestorder) { tor2_launch(cards[x]); - f = 1; + if (cards[x]->order == highestorder) + f = 1; } } /* If we found at least one, increment the highest order and search again, otherwise stop */ |