diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:01:00 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:01:00 +0000 |
commit | 78df431c6c5a1f21587b520196df7e0522fd3051 (patch) | |
tree | 18d7c97e2d269ac722c1185a358a681d33607b12 | |
parent | 67a814e9f9797570b520ca7499bc82684dc481a0 (diff) |
wct4xxp: Move the check for the VPM to module load time.
This allows dahdi-base to know whether or not there is a VPM attached to
the module as soon as it's registered as opposed to waiting for start
span. This will simplify dahdi_genconf's task of creating a valid
configuration file.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9933 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | drivers/dahdi/wct4xxp/base.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 2233cdc..47c5ed3 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -2776,18 +2776,6 @@ static int t4_startup(struct dahdi_span *span) dev_info(&wc->dev->dev, "SPAN %d: Quaternary Sync " "Source\n", span->spanno); } -#ifdef VPM_SUPPORT - if (!alreadyrunning && !wc->vpm) { - wait_a_little(); - t4_vpm400_init(wc); - if (!wc->vpm) - t4_vpm450_init(wc); - wc->dmactrl |= wc->vpm; - t4_pci_out(wc, WC_DMACTRL, wc->dmactrl); - if (wc->vpm) - set_span_devicetype(wc); - } -#endif if (debug) dev_info(&wc->dev->dev, "Completed startup!\n"); clear_bit(T4_IGNORE_LATENCY, &wc->checkflag); @@ -4840,6 +4828,19 @@ static int __devinit t4_init_one(struct pci_dev *pdev, const struct pci_device_i t4_gpio_setdir(wc, (1 << 17), (1 << 17)); t4_gpio_setdir(wc, (0xff), (0xff)); +#ifdef VPM_SUPPORT + if (!wc->vpm) { + wait_a_little(); + t4_vpm400_init(wc); + if (!wc->vpm) + t4_vpm450_init(wc); + wc->dmactrl |= wc->vpm; + t4_pci_out(wc, WC_DMACTRL, wc->dmactrl); + if (wc->vpm) + set_span_devicetype(wc); + } +#endif + create_sysfs_files(wc); #if 0 |