summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wcfxo.c
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2009-08-14 15:47:39 +0000
committerShaun Ruffell <sruffell@digium.com>2009-08-14 15:47:39 +0000
commitbd0c66fa0c1b426fc45ef9995e6eef8bfdffadc2 (patch)
treecec063a79a6eddec51699b50c1aa084bba0d418a /drivers/dahdi/wcfxo.c
parent84447941bab301ca7f213a8749d5a352785e1a05 (diff)
wcfxo: Reset the DAA on module initialization.
The X100p and clones will sometimes work and sometimes not depending on wether the DAA powers up in running state- this seems to be related to the power supply. This problem is caused by the driver not reseting the DAA and may be the source of a great many intermittent problems with this card. (closes issue #14232) Reported by: tallen8840 Patch by: tallen8840 Tested by: explidous, Flavio git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7008 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wcfxo.c')
-rw-r--r--drivers/dahdi/wcfxo.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/dahdi/wcfxo.c b/drivers/dahdi/wcfxo.c
index 69b42a0..5e61edb 100644
--- a/drivers/dahdi/wcfxo.c
+++ b/drivers/dahdi/wcfxo.c
@@ -674,6 +674,16 @@ static int wcfxo_hardware_init(struct wcfxo *wc)
/* Hardware stuff */
/* Reset PCI Interface chip and registers */
outb(0x0e, wc->ioaddr + WC_CNTL);
+
+ /* Set all to outputs except AUX 4, which is an input */
+ outb(0xef, wc->ioaddr + WC_AUXC);
+
+ /* Reset the DAA (DAA uses AUX5 for reset) */
+ outb(0x00, wc->ioaddr + WC_AUXD);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(1 + HZ / 800);
+
+ /* Set hook state to on hook & un-reset the DAA */
if (wc->flags & FLAG_RESET_ON_AUX5) {
/* Set hook state to on hook for when we switch.
Make sure reset is high */
@@ -682,8 +692,6 @@ static int wcfxo_hardware_init(struct wcfxo *wc)
/* Set hook state to on hook for when we switch */
outb(0x24, wc->ioaddr + WC_AUXD);
}
- /* Set all to outputs except AUX 4, which is an input */
- outb(0xef, wc->ioaddr + WC_AUXC);
/* Back to normal, with automatic DMA wrap around */
outb(0x01, wc->ioaddr + WC_CNTL);