patch-2.1.126 linux/drivers/net/lance.c
Next file: linux/drivers/net/ltpc.c
Previous file: linux/drivers/net/hostess_sv11.c
Back to the patch index
Back to the overall index
- Lines: 53
- Date:
Fri Oct 9 11:56:59 1998
- Orig file:
v2.1.125/linux/drivers/net/lance.c
- Orig date:
Tue Jul 28 14:21:08 1998
diff -u --recursive --new-file v2.1.125/linux/drivers/net/lance.c linux/drivers/net/lance.c
@@ -377,6 +377,7 @@
unsigned char hpJ2405A = 0; /* HP ISA adaptor */
int hp_builtin = 0; /* HP on-board ethernet. */
static int did_version = 0; /* Already printed version info. */
+ unsigned long flags;
/* First we look for special cases.
Check for HP's on-board ethernet by looking for 'HP' in the BIOS.
@@ -563,8 +564,11 @@
outw(0x7f04, ioaddr+LANCE_DATA); /* Clear the memory error bits. */
if (request_dma(dma, chipname))
continue;
+
+ flags=claim_dma_lock();
set_dma_mode(dma, DMA_MODE_CASCADE);
enable_dma(dma);
+ release_dma_lock(flags);
/* Trigger an initialization. */
outw(0x0001, ioaddr+LANCE_DATA);
@@ -576,7 +580,9 @@
printk(", DMA %d.\n", dev->dma);
break;
} else {
+ flags=claim_dma_lock();
disable_dma(dma);
+ release_dma_lock(flags);
free_dma(dma);
}
}
@@ -649,8 +655,10 @@
/* The DMA controller is used as a no-operation slave, "cascade mode". */
if (dev->dma != 4) {
+ unsigned long flags=claim_dma_lock();
enable_dma(dev->dma);
set_dma_mode(dev->dma, DMA_MODE_CASCADE);
+ release_dma_lock(flags);
}
/* Un-Reset the LANCE, needed only for the NE2100. */
@@ -1121,7 +1129,11 @@
outw(0x0004, ioaddr+LANCE_DATA);
if (dev->dma != 4)
+ {
+ unsigned long flags=claim_dma_lock();
disable_dma(dev->dma);
+ release_dma_lock(flags);
+ }
free_irq(dev->irq, dev);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov