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

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

diff -u --recursive --new-file v2.1.36/linux/drivers/net/pcnet32.c linux/drivers/net/pcnet32.c
@@ -594,12 +594,12 @@
 
 	/* Block a timer-based transmit from overlapping.  This could better be
 	   done with atomic_swap(1, dev->tbusy), but set_bit() works as well. */
-	if (set_bit(0, (void*)&dev->tbusy) != 0) {
+	if (test_and_set_bit(0, (void*)&dev->tbusy) != 0) {
 		printk("%s: Transmitter access conflict.\n", dev->name);
 		return 1;
 	}
 
-	if (set_bit(0, (void*)&lp->lock) != 0) {
+	if (test_and_set_bit(0, (void*)&lp->lock) != 0) {
 		if (pcnet32_debug > 0)
 			printk("%s: tx queue lock!.\n", dev->name);
 		/* don't clear dev->tbusy flag. */

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