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

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

diff -u --recursive --new-file v2.1.36/linux/drivers/net/sdla_ppp.c linux/drivers/net/sdla_ppp.c
@@ -286,7 +286,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->hw.fwid == SFID_PPP502) ? config502(card) : config508(card))
@@ -365,7 +365,7 @@
 {
 	sdla_t* card = dev->priv;
 
-	if (set_bit(0, (void*)&card->wandev.critical))
+	if (test_and_set_bit(0, (void*)&card->wandev.critical))
 		return -EAGAIN;
 	;
 	dev->start = 0;
@@ -441,7 +441,7 @@
 	sdla_t* card = dev->priv;
 	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",
@@ -451,7 +451,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