Fixed memory barrier bug in 8139too drivers.
authorFlorian Pose <fp@igh-essen.com>
Fri, 03 Nov 2006 10:00:08 +0000
changeset 474 9850c3fb3865
parent 473 e34754cd973e
child 475 e712a42446af
Fixed memory barrier bug in 8139too drivers.
devices/8139too-2.6.13-ethercat.c
devices/8139too-2.6.17-ethercat.c
--- a/devices/8139too-2.6.13-ethercat.c	Thu Nov 02 19:08:06 2006 +0000
+++ b/devices/8139too-2.6.13-ethercat.c	Fri Nov 03 10:00:08 2006 +0000
@@ -1969,11 +1969,12 @@
 	}
 #endif /* RTL8139_NDEBUG */
 
-	if (dev != rtl_ec_net_dev) {
-		/* only wake the queue if we did work, and the queue is stopped */
-		if (tp->dirty_tx != dirty_tx) {
-			tp->dirty_tx = dirty_tx;
-			mb();
+	/* only wake the queue if we did work, and the queue is stopped */
+	if (tp->dirty_tx != dirty_tx) {
+		tp->dirty_tx = dirty_tx;
+		mb();
+
+		if (dev != rtl_ec_net_dev) {
 			netif_wake_queue (dev);
 		}
 	}
--- a/devices/8139too-2.6.17-ethercat.c	Thu Nov 02 19:08:06 2006 +0000
+++ b/devices/8139too-2.6.17-ethercat.c	Fri Nov 03 10:00:08 2006 +0000
@@ -1976,11 +1976,12 @@
 	}
 #endif /* RTL8139_NDEBUG */
 
-	if (dev != rtl_ec_net_dev) {
-		/* only wake the queue if we did work, and the queue is stopped */
-		if (tp->dirty_tx != dirty_tx) {
-			tp->dirty_tx = dirty_tx;
-			mb();
+	/* only wake the queue if we did work, and the queue is stopped */
+	if (tp->dirty_tx != dirty_tx) {
+		tp->dirty_tx = dirty_tx;
+		mb();
+
+		if (dev != rtl_ec_net_dev) {
 			netif_wake_queue (dev);
 		}
 	}