patch-2.2.11 linux/drivers/net/z85230.c
Next file: linux/drivers/pci/oldproc.c
Previous file: linux/drivers/net/yellowfin.c
Back to the patch index
Back to the overall index
- Lines: 70
- Date:
Mon Aug 9 12:04:39 1999
- Orig file:
v2.2.10/linux/drivers/net/z85230.c
- Orig date:
Sat Apr 24 17:51:48 1999
diff -u --recursive --new-file v2.2.10/linux/drivers/net/z85230.c linux/drivers/net/z85230.c
@@ -187,7 +187,6 @@
1, EXT_INT_ENAB|TxINT_ENAB|INT_ALL_Rx,
9, NV|MIE|NORESET,
23, 3, /* Extended mode AUTO TX and EOM*/
- 31, 3, /* Extended mode AUTO TX and EOM*/
255
};
@@ -673,6 +672,7 @@
{
kfree(c->rx_buf[0]);
c->rx_buf[0]=NULL;
+ c->rx_buf[1]=NULL;
return -ENOBUFS;
}
@@ -834,6 +834,8 @@
int z8530_sync_txdma_open(struct device *dev, struct z8530_channel *c)
{
+ unsigned long flags;
+
printk("Opening sync interface for TX-DMA\n");
c->sync = 1;
c->mtu = dev->mtu+64;
@@ -889,14 +891,21 @@
c->regs[R14]|= DTRREQ;
write_zsreg(c, R14, c->regs[R14]);
+ c->regs[R1]&= ~TxINT_ENAB;
+ write_zsreg(c, R1, c->regs[R1]);
+
/*
* Set up the DMA configuration
*/
+ flags = claim_dma_lock();
+
disable_dma(c->txdma);
clear_dma_ff(c->txdma);
set_dma_mode(c->txdma, DMA_MODE_WRITE);
disable_dma(c->txdma);
+
+ release_dma_lock(flags);
/*
* Select the DMA interrupt handlers
@@ -918,6 +927,7 @@
int z8530_sync_txdma_close(struct device *dev, struct z8530_channel *c)
{
+ unsigned long flags;
u8 chk;
c->irqs = &z8530_nop;
c->max = 0;
@@ -927,10 +937,14 @@
* Disable the PC DMA channels
*/
+ flags = claim_dma_lock();
+
disable_dma(c->txdma);
clear_dma_ff(c->txdma);
c->txdma_on = 0;
c->tx_dma_used = 0;
+
+ release_dma_lock(flags);
/*
* Disable DMA control mode
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)