diff options
-rwxr-xr-x | wcfxo.c | 17 | ||||
-rwxr-xr-x | wcfxs.c | 16 | ||||
-rwxr-xr-x | wctdm.c | 16 |
3 files changed, 43 insertions, 6 deletions
@@ -363,7 +363,7 @@ static void wcfxo_tasklet(unsigned long data) #endif static void wcfxo_stop_dma(struct wcfxo *wc); -static void wcfxo_start_dma(struct wcfxo *wc); +static void wcfxo_restart_dma(struct wcfxo *wc); static void wcfxo_interrupt(int irq, void *dev_id, struct pt_regs *regs) { @@ -406,7 +406,7 @@ static void wcfxo_interrupt(int irq, void *dev_id, struct pt_regs *regs) printk("PCI Master abort\n"); /* Stop DMA and start it again */ wcfxo_stop_dma(wc); - wcfxo_start_dma(wc); + wcfxo_restart_dma(wc); return; } @@ -664,6 +664,19 @@ static void wcfxo_start_dma(struct wcfxo *wc) outb(0x01, wc->ioaddr + WC_OPER); } +static void wcfxo_restart_dma(struct wcfxo *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); +} + + static void wcfxo_stop_dma(struct wcfxo *wc) { outb(0x00, wc->ioaddr + WC_OPER); @@ -241,7 +241,7 @@ static inline void wcfxs_receiveprep(struct wcfxs *wc, unsigned char ints) static inline void wcfxs_check_hook(struct wcfxs *wc, int card); static void wcfxs_stop_dma(struct wcfxs *wc); -static void wcfxs_start_dma(struct wcfxs *wc); +static void wcfxs_restart_dma(struct wcfxs *wc); static void wcfxs_interrupt(int irq, void *dev_id, struct pt_regs *regs) { @@ -259,7 +259,7 @@ static void wcfxs_interrupt(int irq, void *dev_id, struct pt_regs *regs) /* Restart DMA */ printk("PCI Master abort\n"); wcfxs_stop_dma(wc); - wcfxs_start_dma(wc); + wcfxs_restart_dma(wc); return; } @@ -1069,6 +1069,18 @@ static void wcfxs_start_dma(struct wcfxs *wc) outb(0x01, wc->ioaddr + WC_OPER); } +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); +} + static void wcfxs_stop_dma(struct wcfxs *wc) { outb(0x00, wc->ioaddr + WC_OPER); @@ -241,7 +241,7 @@ static inline void wcfxs_receiveprep(struct wcfxs *wc, unsigned char ints) static inline void wcfxs_check_hook(struct wcfxs *wc, int card); static void wcfxs_stop_dma(struct wcfxs *wc); -static void wcfxs_start_dma(struct wcfxs *wc); +static void wcfxs_restart_dma(struct wcfxs *wc); static void wcfxs_interrupt(int irq, void *dev_id, struct pt_regs *regs) { @@ -259,7 +259,7 @@ static void wcfxs_interrupt(int irq, void *dev_id, struct pt_regs *regs) /* Restart DMA */ printk("PCI Master abort\n"); wcfxs_stop_dma(wc); - wcfxs_start_dma(wc); + wcfxs_restart_dma(wc); return; } @@ -1069,6 +1069,18 @@ static void wcfxs_start_dma(struct wcfxs *wc) outb(0x01, wc->ioaddr + WC_OPER); } +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); +} + static void wcfxs_stop_dma(struct wcfxs *wc) { outb(0x00, wc->ioaddr + WC_OPER); |