From 06540855fcef856139272e707d93c950ea05737b Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Fri, 12 Sep 2003 18:56:57 +0000 Subject: [PATCH] apply dma init fix that worked so well with cb_pcidas64.c --- comedi/drivers/gsc_hpdi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/comedi/drivers/gsc_hpdi.c b/comedi/drivers/gsc_hpdi.c index ce681f16..071f9b50 100644 --- a/comedi/drivers/gsc_hpdi.c +++ b/comedi/drivers/gsc_hpdi.c @@ -818,6 +818,13 @@ static int di_cmd(comedi_device *dev,comedi_subdevice *s) priv(dev)->dma_desc_index = 0; + /* These register are supposedly unused during chained dma, + * but I have found that left over values from last operation + * occasionally cause problems with transfer of first dma + * block. Initializing them to zero seems to fix the problem. */ + writel(0, priv(dev)->plx9080_iobase + PLX_DMA0_TRANSFER_SIZE_REG); + writel(0, priv(dev)->plx9080_iobase + PLX_DMA0_PCI_ADDRESS_REG); + writel(0, priv(dev)->plx9080_iobase + PLX_DMA0_LOCAL_ADDRESS_REG); // give location of first dma descriptor bits = priv(dev)->dma_desc_phys_addr | PLX_DESC_IN_PCI_BIT | PLX_INTR_TERM_COUNT | PLX_XFER_LOCAL_TO_PCI; writel( bits, priv(dev)->plx9080_iobase + PLX_DMA0_DESCRIPTOR_REG ); -- 2.26.2