patch-2.1.126 linux/drivers/net/sktr.c

Next file: linux/drivers/net/syncppp.c
Previous file: linux/drivers/net/sdlamain.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.125/linux/drivers/net/sktr.c linux/drivers/net/sktr.c
@@ -298,6 +298,7 @@
 __initfunc(static int sktr_isa_chk_card(struct device *dev, int ioaddr))
 {
 	int i, err;
+	unsigned long flags;
 
 	err = sktr_isa_chk_ioaddr(ioaddr);
 	if(err < 0)
@@ -373,9 +374,11 @@
                 }
         }
 
+	flags=claim_dma_lock();
 	disable_dma(dev->dma);
         set_dma_mode(dev->dma, DMA_MODE_CASCADE);
         enable_dma(dev->dma);
+        release_dma_lock(flags);
 
 	printk("%s: %s found at %#4x, using IRQ %d and DMA %d.\n",
                 dev->name, AdapterName, ioaddr, dev->irq, dev->dma);
@@ -1446,7 +1449,12 @@
 	sktr_disable_interrupts(dev);
    
 	if(dev->dma > 0) 
+	{
+		unsigned long flags=claim_dma_lock();
 		disable_dma(dev->dma);
+		release_dma_lock(flags);
+	}
+	
 	outw(0xFF00, dev->base_addr + SIFCMD);
 	if(dev->dma > 0)
 		outb(0xff, dev->base_addr + POSREG);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov