diff options
-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 */ |