diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-05-15 01:30:02 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-05-15 01:30:02 +0000 |
commit | 5b864019c5aeccf32d5ab83a856360e46e1436d9 (patch) | |
tree | 8180720fcf1be92ca1f006be535baed4f3b75861 /wcfxs.c | |
parent | 58d72a7794acc5d64a4d0580fca22aae04c149ca (diff) |
Initial "watchdog" support
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@180 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wcfxs.c')
-rwxr-xr-x | wcfxs.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -256,10 +256,9 @@ static void wcfxs_interrupt(int irq, void *dev_id, struct pt_regs *regs) return; if (ints & 0x10) { - /* Restart DMA */ - printk("PCI Master abort\n"); + /* Stop DMA, wait for watchdog */ + printk("FXS PCI Master abort\n"); wcfxs_stop_dma(wc); - wcfxs_restart_dma(wc); return; } @@ -1073,10 +1072,6 @@ static void wcfxs_restart_dma(struct wcfxs *wc) { int x; /* Reset Master and TDM */ - outb(0x0f, wc->ioaddr + WC_CNTL); - /* Can't really wait, so simulate a wait */ - for (x=0;x<100;x++) - inb(wc->ioaddr + WC_CNTL); outb(0x01, wc->ioaddr + WC_CNTL); outb(0x01, wc->ioaddr + WC_OPER); } @@ -1084,6 +1079,8 @@ static void wcfxs_restart_dma(struct wcfxs *wc) static void wcfxs_stop_dma(struct wcfxs *wc) { outb(0x00, wc->ioaddr + WC_OPER); + /* Reset TDM */ + outb(0x0f, wc->ioaddr + WC_CNTL); } static void wcfxs_disable_interrupts(struct wcfxs *wc) |