patch-2.1.37 linux/drivers/net/sdla_fr.c

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

diff -u --recursive --new-file v2.1.36/linux/drivers/net/sdla_fr.c linux/drivers/net/sdla_fr.c
@@ -440,7 +440,7 @@
 	if (dev->start)
 		return -EBUSY		/* only one open is allowed */
 	;
-	if (set_bit(0, (void*)&card->wandev.critical))
+	if (test_and_set_bit(0, (void*)&card->wandev.critical))
 		return -EAGAIN;
 	;
 	if (!card->open_cnt)
@@ -489,7 +489,7 @@
 	fr_channel_t* chan = dev->priv;
 	sdla_t* card = chan->card;
 
-	if (set_bit(0, (void*)&card->wandev.critical))
+	if (test_and_set_bit(0, (void*)&card->wandev.critical))
 		return -EAGAIN;
 	;
 	dev->start = 0;
@@ -574,7 +574,7 @@
 	sdla_t* card = chan->card;
 	int retry = 0;
 
-	if (set_bit(0, (void*)&card->wandev.critical))
+	if (test_and_set_bit(0, (void*)&card->wandev.critical))
 	{
 #ifdef _DEBUG_
 		printk(KERN_INFO "%s: if_send() hit critical section!\n",
@@ -584,7 +584,7 @@
 		return 1;
 	}
 
-	if (set_bit(0, (void*)&dev->tbusy))
+	if (test_and_set_bit(0, (void*)&dev->tbusy))
 	{
 #ifdef _DEBUG_
 		printk(KERN_INFO "%s: Tx collision on interface %s!\n",

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