patch-2.1.37 linux/drivers/net/3c505.c
Next file: linux/drivers/net/3c507.c
Previous file: linux/drivers/net/3c501.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Mon May 12 10:35:40 1997
- Orig file:
v2.1.36/linux/drivers/net/3c505.c
- Orig date:
Wed Apr 23 19:01:18 1997
diff -u --recursive --new-file v2.1.36/linux/drivers/net/3c505.c linux/drivers/net/3c505.c
@@ -412,7 +412,7 @@
return FALSE;
/* Avoid contention */
- if (set_bit(1, &adapter->send_pcb_semaphore)) {
+ if (test_and_set_bit(1, &adapter->send_pcb_semaphore)) {
if (elp_debug >= 3) {
printk("%s: send_pcb entered while threaded\n", dev->name);
}
@@ -545,7 +545,7 @@
}
if (pcb->command == CMD_RECEIVE_PACKET_COMPLETE) {
- if (set_bit(0, (void *) &adapter->busy)) {
+ if (test_and_set_bit(0, (void *) &adapter->busy)) {
if (backlog_next(adapter->rx_backlog.in) == adapter->rx_backlog.out) {
set_hsf(dev, HSF_PCB_NAK);
printk("%s: PCB rejected, transfer in progress and backlog full\n", dev->name);
@@ -621,7 +621,7 @@
}
/* if this happens, we die */
- if (set_bit(0, (void *) &adapter->dmaing))
+ if (test_and_set_bit(0, (void *) &adapter->dmaing))
printk("%s: rx blocked, DMA in progress, dir %d\n", dev->name, adapter->current_dma.direction);
skb->dev = dev;
@@ -1031,7 +1031,7 @@
*/
unsigned int nlen = (((skb->len < 60) ? 60 : skb->len) + 1) & (~1);
- if (set_bit(0, (void *) &adapter->busy)) {
+ if (test_and_set_bit(0, (void *) &adapter->busy)) {
if (elp_debug >= 2)
printk("%s: transmit blocked\n", dev->name);
return FALSE;
@@ -1054,7 +1054,7 @@
return FALSE;
}
/* if this happens, we die */
- if (set_bit(0, (void *) &adapter->dmaing))
+ if (test_and_set_bit(0, (void *) &adapter->dmaing))
printk("%s: tx: DMA %d in progress\n", dev->name, adapter->current_dma.direction);
adapter->current_dma.direction = 1;
@@ -1119,7 +1119,7 @@
if (elp_debug >= 3)
printk("%s: request to send packet of length %d\n", dev->name, (int) skb->len);
- if (set_bit(0, (void *) &dev->tbusy)) {
+ if (test_and_set_bit(0, (void *) &dev->tbusy)) {
printk("%s: transmitter access conflict\n", dev->name);
return 1;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov