Subject: [PATCH 07/16] myri10ge: add barrier in myri10ge_send_cmd

From: Brice Goglin <[email-masked]>
Date: Fri, 09 May 2008 02:18:45 +0200

Add a barrier() in the usleep() loop in  myri10ge_send_cmd().
Without the barrier, some mips machine never notices that the
firmware has DMA'ed the response.

Signed-off-by: Brice Goglin <[email-masked]>
Signed-off-by: Andrew Gallatin <[email-masked]>
---
 drivers/net/myri10ge/myri10ge.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/net/myri10ge/myri10ge.c
===================================================================
--- linux-2.6.orig/drivers/net/myri10ge/myri10ge.c    2008-05-09
00:04:48.000000000 +0200
+++ linux-2.6/drivers/net/myri10ge/myri10ge.c    2008-05-09
00:05:30.000000000 +0200
@@ -361,8 +361,10 @@
         for (sleep_total = 0;
              sleep_total < 1000
              && response->result == htonl(MYRI10GE_NO_RESPONSE_RESULT);
-             sleep_total += 10)
+             sleep_total += 10) {
             udelay(10);
+            mb();
+        }
     } else {
         /* use msleep for most command */
         for (sleep_total = 0;