--- margi2/margi.c 2001/01/22 05:01:52 1.4 +++ margi2/margi.c 2001/01/31 14:19:02 1.5 @@ -346,7 +346,7 @@ static int ringDMA (struct cvdv_cards *c count = ring_read_rest(&(card->rbuf)); if (count < 2048) { - card->DMAABusy = 0; + //card->DMAABusy = 0; wake_up_interruptible(&(card->wqA)); return 0; } @@ -372,17 +372,19 @@ static int ringDMA (struct cvdv_cards *c if (count > size) count = size & 0xfffffffc; if (count>=2048) count &=0xfffff800; count &=0xfffffffc; - + if (!size && - !card->DecoderOpen){ + !card->DecoderOpen ){ printk(KERN_DEBUG LOGNAME ": -- PREPARE IT ALREADY\n"); Prepare(card); + card->startingV = 1; + card->startingA = 1; } - + if (count > size) count = size & 0xfffffffc; - /* - printk(KERN_DEBUG LOGNAME + + /* printk(KERN_DEBUG LOGNAME ": -- stat: %d length: %d size: %d startV: %d startA: %d\n", stat,count,size, card->startingV, card->startingA); */ @@ -487,6 +489,7 @@ void L64014Intr(int irq, void *dev_id, s u_char dio_index, lsi_index_low, lsi_index_high; u8 control,mask,stat; int try; + int count; //save registers dio_index = inb(margi->link.io.BasePort1 + DIO_CONTROL_INDEX); @@ -522,6 +525,8 @@ void L64014Intr(int irq, void *dev_id, s if(card->use_ring){ L64021Intr(card); } + count = ring_read_rest(&(card->rbuf)); + if (count) card->DMAABusy=1; if (card->DMAABusy){ #ifdef USE_BH @@ -621,7 +626,7 @@ int L64014Init(struct cvdv_cards *card) L64021Init(card); // Find out how much DRAM we have - card->DRAMSize = 0x00200000; // maximum size + card->DRAMSize = 0x00100000; // maximum size do { printk(KERN_DEBUG LOGNAME ": Probing DRAM Size: 0x%08X (%d kByte) ... ",